API reference · Agents
Cancel a run, or answer its tool calls, from the dashboard
POST/api/account/agents/{id}/runs/{run}/{action}Signed in session
action is cancel or tool_outputs, as on /v1. A 404 while hosted runs are off on the deployment.
Parameters
| Field | Type | What it is |
|---|---|---|
| id (path)required | string | The agent's id; self on an agent's own key. |
| run (path)required | string | The run's id, run_ and 24 hex digits. |
| action (path)required | string | cancel or tool_outputs. One of "cancel", "tool_outputs". |
Answer 200
The run.
| Field | Type | What it is |
|---|---|---|
| object | string | One of "agent.run". |
| id | string | |
| agent_id | integer | |
| status | string | One of "queued", "in_progress", "requires_action", "cancelling", "completed", "incomplete", "failed", "cancelled", "expired". |
| model | string | |
| created | integer | |
| started_at | integer or null | |
| completed_at | integer or null | |
| expires_at | integer | |
| steps | integer | |
| max_steps | integer | |
| max_wall_seconds | integer | |
| cost_micros | integer | |
| max_cost_micros | integer | |
| usage | object | |
| usage. | integer | |
| usage. | integer | |
| output_text | string or null | |
| required_action | object or null | |
| required_action. | string | One of "submit_tool_outputs". |
| required_action. | object | |
| required_action. | array of object | |
| required_action. | string | |
| required_action. | string | One of "function". |
| required_action. | object | |
| required_action. | integer or null | |
| last_error | object or null | |
| last_error. | string | |
| last_error. | string | |
| incomplete_details | object or null | |
| incomplete_details. | string | One of "max_steps", "max_wall_time", "max_cost". |
| metadata | object or null |
Errors
- 400OpenAI shaped error.
- 401OpenAI shaped error.
- 404OpenAI shaped error.
- 409OpenAI shaped error.
Every error answers in one shape, with its type, code and the field it names. The whole list is in the docs' Errors section.