Path parameters
-
The ID of the thread to modify. Only the
metadata
can be modified.
Body Required
-
tool_resources object | null
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 thefile_search
tool requires a list of vector store IDs. -
metadata object | null
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.
POST
/threads/{thread_id}
curl \
-X POST https://api.openai.com/v1/threads/{thread_id} \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"tool_resources":{"code_interpreter":{"file_ids":[]},"file_search":{"vector_store_ids":["string"]}},"metadata":{}}'
Request example
{
"tool_resources": {
"code_interpreter": {
"file_ids": []
},
"file_search": {
"vector_store_ids": [
"string"
]
}
},
"metadata": {}
}
Response examples (200)
{
"id": "string",
"object": "thread",
"created_at": 42,
"tool_resources": {
"code_interpreter": {
"file_ids": []
},
"file_search": {
"vector_store_ids": [
"string"
]
}
},
"metadata": {}
}