- Get started
- Introduction
- Authentication
- Making requests
- Streaming
- Audio
- Batch
- Models
- Invites
- Chat
- Users
- Projects
- Project users
- Project service accounts
- Project API keys
- Audit logs
- Usage
- Project rate limits
- Completions
- Uploads
- Embeddings
- Files
- Moderations
- Assistants (v1)
- Threads (v1)
- Messages (v1)
- Runs (v1)
- Images
- Fine-tuning
List runs (v1)
GET
https://api.openai.com/v1/threads/thread_abc123/runs
Request
Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.Example:
Authorization: Bearer ********************
Header Params
Authorization
stringÂ
required
Example:
Bearer $OPENAI_API_KEY
Content-Type
stringÂ
required
Example:
application/json
OpenAI-Beta
stringÂ
required
Example:
assistants=v1
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://api.openai.com/v1/threads/thread_abc123/runs' \
--header 'Authorization: Bearer $OPENAI_API_KEY' \
--header 'OpenAI-Beta: assistants=v1' \
--header 'Content-Type: application/json' \
--data-raw ''
Responses
🟢200Success
application/json
Body
object
stringÂ
required
data
array [object {26}]Â
required
id
stringÂ
required
object
stringÂ
required
created_at
integerÂ
required
assistant_id
stringÂ
required
thread_id
stringÂ
required
status
stringÂ
required
started_at
integerÂ
required
expires_at
nullÂ
required
cancelled_at
nullÂ
required
failed_at
nullÂ
required
completed_at
integerÂ
required
last_error
nullÂ
required
model
stringÂ
required
instructions
nullÂ
required
incomplete_details
nullÂ
required
tools
array [object {1}]Â
required
file_ids
array[string]
required
metadata
objectÂ
required
usage
objectÂ
required
temperature
integerÂ
required
top_p
integerÂ
required
max_prompt_tokens
integerÂ
required
max_completion_tokens
integerÂ
required
truncation_strategy
objectÂ
required
response_format
stringÂ
required
tool_choice
stringÂ
required
first_id
stringÂ
required
last_id
stringÂ
required
has_more
booleanÂ
required
Example
{
"object": "list",
"data": [
{
"id": "run_abc123",
"object": "thread.run",
"created_at": 1699075072,
"assistant_id": "asst_abc123",
"thread_id": "thread_abc123",
"status": "completed",
"started_at": 1699075072,
"expires_at": null,
"cancelled_at": null,
"failed_at": null,
"completed_at": 1699075073,
"last_error": null,
"model": "gpt-4-turbo",
"instructions": null,
"incomplete_details": null,
"tools": [
{
"type": "code_interpreter"
}
],
"file_ids": [
"file-abc123",
"file-abc456"
],
"metadata": {},
"usage": {
"prompt_tokens": 123,
"completion_tokens": 456,
"total_tokens": 579
},
"temperature": 1,
"top_p": 1,
"max_prompt_tokens": 1000,
"max_completion_tokens": 1000,
"truncation_strategy": {
"type": "auto",
"last_messages": null
},
"response_format": "auto",
"tool_choice": "auto"
},
{
"id": "run_abc456",
"object": "thread.run",
"created_at": 1699063290,
"assistant_id": "asst_abc123",
"thread_id": "thread_abc123",
"status": "completed",
"started_at": 1699063290,
"expires_at": null,
"cancelled_at": null,
"failed_at": null,
"completed_at": 1699063291,
"last_error": null,
"model": "gpt-4-turbo",
"instructions": null,
"incomplete_details": null,
"tools": [
{
"type": "code_interpreter"
}
],
"file_ids": [
"file-abc123",
"file-abc456"
],
"metadata": {},
"usage": {
"prompt_tokens": 123,
"completion_tokens": 456,
"total_tokens": 579
},
"temperature": 1,
"top_p": 1,
"max_prompt_tokens": 1000,
"max_completion_tokens": 1000,
"truncation_strategy": {
"type": "auto",
"last_messages": null
},
"response_format": "auto",
"tool_choice": "auto"
}
],
"first_id": "run_abc123",
"last_id": "run_abc456",
"has_more": false
}
Modified at 2024-12-13 10:20:37