API reference · Agents
Answer a run's client function calls
POST/v1/agents/{id}/runs/{run}/tool_outputsAPI key
Every call required_action lists, each once; then the run goes on. 409 run_not_waiting when it is not in requires_action. 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. |
Request body
application/json, required
| Field | Type | What it is |
|---|---|---|
| tool_outputsrequired | array of object | |
| tool_outputs[] | string | |
| tool_outputs[] | string |
Example
{
"tool_outputs": [
{
"tool_call_id": "string",
"output": "string"
}
]
}Answer 200
The run, going on.
| 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.
- 403OpenAI 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.