Generate skill drafts
import requests
url = "https://api.datagrid.com/v1/skills/generate"
payload = {
"prompt": "<string>",
"file_ids": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({prompt: '<string>', file_ids: ['<string>']})
};
fetch('https://api.datagrid.com/v1/skills/generate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.datagrid.com/v1/skills/generate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "<string>",
"file_ids": [
"<string>"
]
}
'{
"object": "list",
"data": [
{
"object": "skill_draft",
"name": "<string>",
"slash_key": "<string>",
"description": "<string>",
"instructions": "<string>",
"category": "document_analysis",
"required_tools": [
"<string>"
],
"preferred_tools": [
"<string>"
]
}
],
"has_more": true
}{
"status_code": 123,
"error": "rate_limit_exceeded",
"message": "<string>",
"retryable": true,
"statusCode": 123,
"mitigation": "<string>",
"details": {
"reason": "<string>"
}
}Skills
Generate skill drafts
Generate one or more skill drafts from a natural-language prompt and/or previously uploaded SOP files (POST /v1/files). Drafts are returned as a list and are not persisted — use POST /v1/skills to create each draft you want to keep. Requires ep:skills:write.
POST
/
skills
/
generate
Generate skill drafts
import requests
url = "https://api.datagrid.com/v1/skills/generate"
payload = {
"prompt": "<string>",
"file_ids": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({prompt: '<string>', file_ids: ['<string>']})
};
fetch('https://api.datagrid.com/v1/skills/generate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.datagrid.com/v1/skills/generate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "<string>",
"file_ids": [
"<string>"
]
}
'{
"object": "list",
"data": [
{
"object": "skill_draft",
"name": "<string>",
"slash_key": "<string>",
"description": "<string>",
"instructions": "<string>",
"category": "document_analysis",
"required_tools": [
"<string>"
],
"preferred_tools": [
"<string>"
]
}
],
"has_more": true
}{
"status_code": 123,
"error": "rate_limit_exceeded",
"message": "<string>",
"retryable": true,
"statusCode": 123,
"mitigation": "<string>",
"details": {
"reason": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Natural-language description of the skill(s) to generate. At least one of prompt or file_ids must be non-empty.
Maximum string length:
16000IDs of previously uploaded files to use as source material (e.g. SOP documents). Obtain file IDs via POST /v1/files. At least one of prompt or file_ids must be non-empty.
Maximum array length:
16Response
Generated skill drafts.