v1
latestOpenAPI 3.1.02026-07-265094114.0 KBTasks
Run an agent task
Execute an agent task by ID to generate AI output. Provide the necessary context items and configuration in the request body.
post/v1/tasks/{id}/run
Path parameters
idstring required
Example:agt_0190f3a1b2c34d5e6f7a8b9c0d1e2f3a
The external ID (agt_…) or internal UUID of the agent task to run
Request body
Example request
{
"contextItems": [
{
"id": "70346737-878b-4329-a4d6-9a054efef508",
"value": [
"Registration reminder email",
"Confirmation email"
]
},
{
"name": "Greeting",
"question": "Who is the person that you want me to greet in the registration reminder email?",
"answer": "John Doe"
}
],
"version": 1,
"toLanguage": "EN-US",
"knowledgeIds": [
"kno_123",
"kno_456"
],
"attachmentIds": [
"tmp_2ee766eaa4ef48e59da1d9602bfecf2d"
],
"toneId": "ton_2ee766eaa4ef48e59da1d9602bfecf2d",
"audienceId": "aud_123",
"additionalAudienceIds": [
"aud_456",
"aud_789"
],
"styleGuideId": "sty_123",
"tools": [
"WEB_SEARCH",
"KNOWLEDGE_SEARCH"
]
}Response
Successfully executed agent task and generated output
Example response
{
"requestId": "bce766ea-a4ef-48e5-9da1-d9602bfecf2d",
"resource": "tasks",
"data": {
"output": [
{
"type": "TEXT",
"value": "This is the generated content from the agent..."
}
],
"metadata": {
"credits": {
"cost": 40
},
"translation": {
"tmsMatches": [
{
"sourceSegment": "Click Save to continue.",
"matches": [
{
"target": "Klicken Sie auf Speichern, um fortzufahren.",
"score": 1
}
]
}
]
}
}
}
}