Crie thread e run (v1)
POST
https://api.openai.com/v1/threads/runs
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.openai.com/v1/threads/runs' \
--header 'Authorization: Bearer $OPENAI_API_KEY' \
--header 'OpenAI-Beta: assistants=v1' \
--header 'Content-Type: application/json' \
--data-raw ''
Response Response Example
{
"id": "string",
"object": "string",
"created_at": 0,
"assistant_id": "string",
"thread_id": "string",
"status": "string",
"started_at": null,
"expires_at": 0,
"cancelled_at": null,
"failed_at": null,
"completed_at": null,
"last_error": null,
"model": "string",
"instructions": "string",
"tools": [
"string"
],
"file_ids": [
"string"
],
"metadata": {},
"usage": null,
"temperature": 0
}
Request
Header Params
Authorization
string
optional
Example:
Bearer $OPENAI_API_KEY
Content-Type
string
optional
Example:
application/json
OpenAI-Beta
string
optional
Example:
assistants=v1
Body Params application/json
Responses
Modified at 2025-01-26 08:42:25