For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
WebsiteModelsPricingGet Started
DocumentationAPI Reference
DocumentationAPI Reference
  • API Reference
      • POSTStart an agent task
      • GETRetrieve an agent task
      • GETList agent task messages
      • POSTStop an agent task
Logo
WebsiteModelsPricingGet Started
API ReferenceAgent Tasks

Stop an agent task

POST
https://api.empiriolabs.ai/v1/agents/:task_id/stop
POST
/v1/agents/:task_id/stop
$curl -X POST https://api.empiriolabs.ai/v1/agents/task_id/stop \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{}'
200Successful
1{
2 "task_id": "a1b2c3d4-e5f6-7890-ab12-cdef34567890",
3 "status": "stopped",
4 "output": "Agent task terminated successfully after completing 3 steps.",
5 "usage": {
6 "prompt_tokens": 45,
7 "completion_tokens": 30,
8 "total_tokens": 75
9 }
10}
Was this page helpful?
Previous

Classify or detect text

Next
Built with

Authentication

AuthorizationBearer

Pass your EmpirioLabs API key as a bearer token. The Anthropic-style x-api-key header is also accepted on every endpoint.

Path parameters

task_idstringRequired

Response

Task stopped. Final state and partial output included in the response.
task_idstring
statusstring
outputstring
usageobject