Skip to main content
POST
The Assistants API is deprecated in favor of the Responses API.
Create a thread for conversations with an assistant.

Create Thread

Request Body

array
A list of messages to start the thread with.
object
A set of resources that are made available to the assistant’s tools in this thread. The resources are specific to the type of tool. For example, the code_interpreter tool requires a list of file IDs, while the file_search tool requires a list of vector store IDs.
object
Set of 16 key-value pairs that can be attached to an object.Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.

Response

Returns a Thread object.
string
The thread identifier.
string
The object type, always thread.
integer
The Unix timestamp (in seconds) for when the thread was created.
object
Set of 16 key-value pairs attached to the object.

Retrieve Thread

GET https://api.openai.com/v1/threads/{thread_id} Retrieves a thread.

Update Thread

POST https://api.openai.com/v1/threads/{thread_id} Modifies a thread.

Delete Thread

DELETE https://api.openai.com/v1/threads/{thread_id} Delete a thread.