Skip to main content
POST
/
threads
/
{thread_id}
/
runs
Create a run in thread
curl --request POST \
  --url https://api.anyapi.ai/v1/threads/{thread_id}/runs \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "assistant_id": "<string>"
}
'
{
  "id": "<string>",
  "object": "run",
  "thread_id": "<string>",
  "assistant_id": "<string>",
  "status": "queued",
  "created_at": 123
}

Authorizations

Authorization
string
header
required

Bearer token authentication. Get your API key from the dashboard.

Path Parameters

thread_id
string
required

The ID of the thread

Body

application/json
assistant_id
string

ID of the assistant to run

Response

Run created successfully

id
string

Run ID

object
string
Example:

"run"

thread_id
string

Thread ID

assistant_id
string

Assistant ID

status
enum<string>

Run status

Available options:
queued,
in_progress,
requires_action,
completed,
failed
created_at
integer

Creation timestamp