Retrieve thread

GEThttps:/api.openai.com/v1/threads/{thread_id}

Retrieves a thread.

Path parameters

  • thread_id
    string
    Required
    The ID of the thread to retrieve.

Response

The thread object matching the specified ID.

Example request
1
curl https://api.openai.com/v1/threads/thread_abc123 \
2
-H "Content-Type: application/json" \
3
-H "Authorization: Bearer $OPENAI_API_KEY" \
4
-H "OpenAI-Beta: assistants=v2"
Example response
1
{
2
"id": "thread_abc123",
3
"object": "thread",
4
"created_at": 1699014083,
5
"metadata": {},
6
"tool_resources": {
7
"code_interpreter": {
8
"file_ids": []
9
}
10
}
11
}
Built with