curl -X POST "https://mdb.ai/threads/mdb_thread_4d3f3805c95f4c1a9d77d32cbdfbe3d9/runs" \
  -H "Authorization: Bearer MINDS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "assistant_id": "<name of the mind that you created>",
    "stream": true
  }'
{
    "id": "mdb_run_8b425f3bf0a04ca584ad11106d37330c",
    "assistant_id": "mdb_asst_cfde04f34a5e47548b705fbf091e06bc",
    "cancelled_at": null,
    "completed_at": null,
    "created_at": 1718885800,
    "expires_at": null,
    "failed_at": null,
    "incomplete_details": null,
    "instructions": "",
    "last_error": null,
    "max_completion_tokens": null,
    "max_prompt_tokens": null,
    "metadata": null,
    "model": "",
    "object": "thread.run",
    "required_action": null,
    "response_format": null,
    "started_at": null,
    "status": "queued",
    "thread_id": "mdb_thread_cfa0fac64cd94faab3ae269d768c0cb0",
    "tool_choice": null,
    "tools": [],
    "truncation_strategy": null,
    "usage": null,
    "temperature": null,
    "top_p": null
}

This API endpoint creates a Run on a specific Thread using the POST method.

Body

assistant_id
string
required

ID of the Assistant (Mind) that will be used to run the Thread.

stream
array

Stream Mind’s thoughts by setting this parameter to true.

Response

id
string
required

Unique identifier for the run.

assistant_id
string
required

ID of the Assistant associated with the run.

cancelled_at
number

Timestamp when the run was cancelled.

completed_at
number

Timestamp when the run was completed.

created_at
number
required

Timestamp when the run was created.

expires_at
number

Expiration time for the run.

failed_at
number

Timestamp when the run failed.

incomplete_details
object

Details about why the run was incomplete, if applicable.

instructions
string

Instructions sent to the Assistant.

last_error
object

Details about the last error, if any.

max_completion_tokens
number

Maximum number of tokens for the completion.

max_prompt_tokens
number

Maximum number of tokens for the prompt.

metadata
object

Additional metadata for the run.

model
string

Model name used for the run.

object
string
required

Type of the returned object (e.g., “thread.run”).

required_action
object

Actions required before proceeding.

response_format
string

Format of the response.

started_at
number

Timestamp when the run started.

status
string
required

Current status of the run (e.g., “queued”, “in_progress”).

thread_id
string
required

ID of the thread associated with the run.

tool_choice
string

Chosen tool for the run.

tools
array

List of tools used during the run.

truncation_strategy
string

Strategy used to truncate input.

usage
object

Usage statistics for the run.

temperature
number

Sampling temperature for randomness.

top_p
number

Top-p sampling parameter.

Authorization

A valid API key must be passed in the Authorization header:

Authorization: Bearer MINDS_API_KEY

Generate your API key here.

Path Parameters

thread_id
string
required

ID of the Thread to run.

curl -X POST "https://mdb.ai/threads/mdb_thread_4d3f3805c95f4c1a9d77d32cbdfbe3d9/runs" \
  -H "Authorization: Bearer MINDS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "assistant_id": "<name of the mind that you created>",
    "stream": true
  }'
{
    "id": "mdb_run_8b425f3bf0a04ca584ad11106d37330c",
    "assistant_id": "mdb_asst_cfde04f34a5e47548b705fbf091e06bc",
    "cancelled_at": null,
    "completed_at": null,
    "created_at": 1718885800,
    "expires_at": null,
    "failed_at": null,
    "incomplete_details": null,
    "instructions": "",
    "last_error": null,
    "max_completion_tokens": null,
    "max_prompt_tokens": null,
    "metadata": null,
    "model": "",
    "object": "thread.run",
    "required_action": null,
    "response_format": null,
    "started_at": null,
    "status": "queued",
    "thread_id": "mdb_thread_cfa0fac64cd94faab3ae269d768c0cb0",
    "tool_choice": null,
    "tools": [],
    "truncation_strategy": null,
    "usage": null,
    "temperature": null,
    "top_p": null
}