Claim a generated agent template
import requests
url = "https://api.datagrid.com/v1/agents/claim"
payload = { "claim_token": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
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({claim_token: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.datagrid.com/v1/agents/claim', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.datagrid.com/v1/agents/claim \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"claim_token": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'{
"id": "<string>",
"title": "<string>",
"description": "<string>",
"emoji": "<string>",
"category": "<string>",
"connectors": [
{}
],
"prompt_examples": [
"<string>"
],
"is_curated_template": true,
"config": {
"prompt": "<string>",
"custom_prompt": "<string>",
"tools": [
{
"tool": "<string>"
}
]
}
}Agents
Claim a generated agent template
Redeem a claim_token from a prior POST /agents/generate call to retrieve the generated agent template. The token is consumed (single-use). Use the returned template to pre-populate the agent creation dialog.
POST
/
agents
/
claim
Claim a generated agent template
import requests
url = "https://api.datagrid.com/v1/agents/claim"
payload = { "claim_token": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
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({claim_token: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.datagrid.com/v1/agents/claim', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.datagrid.com/v1/agents/claim \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"claim_token": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'{
"id": "<string>",
"title": "<string>",
"description": "<string>",
"emoji": "<string>",
"category": "<string>",
"connectors": [
{}
],
"prompt_examples": [
"<string>"
],
"is_curated_template": true,
"config": {
"prompt": "<string>",
"custom_prompt": "<string>",
"tools": [
{
"tool": "<string>"
}
]
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
The claim token returned from POST /agents/generate