docs/minds/rest_api/create_thread.mdx
This API endpoint creates a Thread to contain Messages using the POST method.
None.
Unique identifier for the thread.
</ResponseField> <ResponseField name="created_at" type="integer" required>Timestamp of when the thread was created.
</ResponseField> <ResponseField name="metadata" type="object">Optional metadata associated with the thread.
</ResponseField> <ResponseField name="object" type="string" required>The type of the object returned, which is "thread".
Information about any associated tool resources.
</ResponseField>A valid API key must be passed in the Authorization header:
Authorization: Bearer MINDS_API_KEY
Generate your API key here.
None.
<RequestExample>curl -X POST "https://mdb.ai/threads" \
-H "Authorization: Bearer MINDS_API_KEY"
from openai import OpenAI
client = OpenAI(
api_key='MINDS_API_KEY',
base_url='https://mdb.ai/'
)
thread = client.beta.threads.create()
print(thread)
import OpenAI from "openai";
const openai = new OpenAI(
api_key='MINDS_API_KEY',
baseURL='https://mdb.ai/'
);
async function main() {
const emptyThread = await openai.beta.threads.create();
console.log(emptyThread);
}
main();
{
"id": "mdb_thread_d79c95547e5f4501a32df6f492ad5be9",
"created_at": 1718884196,
"metadata": null,
"object": "thread",
"tool_resources": null
}