POST
POST /threads/{thread_id}/runs/{run_id}/submit_tool_outputs — OpenAI API
OpenAI API key (required); https://api.openai.com/v1
OpenAI APISubmit tool outputs to run
- Base URL
- https://api.openai.com/v1
- Auth
- Authorization: Bearer <OPENAI_API_KEY>
- Last verified
- 2026-10-20 · upstream hash matched
Actions Try in browser→
Agents: curl -H "Accept: text/markdown" this URL
→ 273 tokens · Vary: Accept
→ 273 tokens · Vary: Accept
Critical gotchas
The Responses API is the primary interface for new text and tool workflows; Chat Completions remains a separate compatibility API.
Audio transcription uploads use multipart form data rather than a JSON request body.
cURL
curl -X POST 'https://api.openai.com/v1/threads/thread-id/runs/run-id/submit_tool_outputs' \ -H "Authorization: Bearer $OPENAI_API_KEY" \ -H 'Content-Type: application/json' \ -d '{ "tool_outputs": [ { "tool_call_id": "example-tool-call-id", "output": "example-output" } ]}'
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| thread_id | path | string | Yes | The ID of the [thread](https://developers.openai.com/api/docs/assistants/migration) to which this run belongs. |
| run_id | path | string | Yes | The ID of the run that requires the tool output submission. |
| tool_outputs | body | object[] | Yes | A list of tools for which the outputs are being submitted. |
| stream | body | boolean | No | If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message. |
Response 200 OK
{
"id": "string",
"object": "thread.run",
"created_at": 0,
"thread_id": "string",
"assistant_id": "string",
"status": "queued",
"required_action": {
"type": "submit_tool_outputs",
"submit_tool_outputs": {
"tool_calls": [
{
"id": "string",
"type": "function",
"function": {
"name": "[recursive or deeply nested schema]",
"arguments": "[recursive or deeply nested schema]"
}
}
]
}
},
"last_error": {
"code": "server_error",
"message": "string"
},
"expires_at": 0,
"started_at": 0,
"cancelled_at": 0,
"failed_at": 0,
"completed_at": 0,
"incomplete_details": {
"reason": "max_completion_tokens"
},
"model": "string",
"instructions": "string",
"tools": [],
"metadata": {},
"usage": {
"completion_tokens": 0,
"prompt_tokens": 0,
"total_tokens": 0
},
"temperature": 0,
"top_p": 0,
"max_prompt_tokens": 0,
"max_completion_tokens": 0,
"truncation_strategy": {
"type": "auto",
"last_messages": 0
},
"tool_choice": "none",
"parallel_tool_calls": true,
"response_format": "auto"
} Get a free OpenAI API key → sponsored Affiliate link - we may earn a commission, at no extra cost to you.