Authorization: Bearer ********************curl --location '/threads/runs' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"assistant_id": "string",
"thread": {
"messages": [
{
"role": "user",
"content": "string",
"attachments": [
{
"file_id": "string",
"tools": [
{
"type": "code_interpreter"
}
]
}
],
"metadata": {
"property1": "string",
"property2": "string"
}
}
],
"tool_resources": {
"code_interpreter": {
"file_ids": []
},
"file_search": {}
},
"metadata": {
"property1": "string",
"property2": "string"
}
},
"model": "string",
"instructions": "string",
"tools": [
{
"type": "code_interpreter"
}
],
"tool_resources": {
"code_interpreter": {
"file_ids": []
},
"file_search": {
"vector_store_ids": [
"string"
]
}
},
"metadata": {
"property1": "string",
"property2": "string"
},
"temperature": 1,
"top_p": 1,
"stream": true,
"max_prompt_tokens": 256,
"max_completion_tokens": 256,
"truncation_strategy": {
"type": "auto",
"last_messages": 1
},
"tool_choice": "none",
"parallel_tool_calls": true,
"response_format": "auto"
}'{
"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": "string",
"arguments": "string"
}
}
]
}
},
"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": {
"property1": "string",
"property2": "string"
},
"usage": {
"completion_tokens": 0,
"prompt_tokens": 0,
"total_tokens": 0
},
"temperature": 0,
"top_p": 0,
"max_prompt_tokens": 256,
"max_completion_tokens": 256,
"truncation_strategy": {
"type": "auto",
"last_messages": 1
},
"tool_choice": "none",
"parallel_tool_calls": true,
"response_format": "auto"
}