Thread API

This page provides api schemas and descriptions for Threads API methods.

Threads serve as conversation containers that store Messages exchanged between a user and an Assistant, maintaining context and continuity across interactions.

This page provides API schemas for the following methods:

https://api.aimlapi.com/threads

https://api.aimlapi.com/threads/{threadId}

https://api.aimlapi.com/threads/{threadId}

https://api.aimlapi.com/threads/{threadId}

After each API schema, you'll find a short example demonstrating how to correctly call the described method in code using the OpenAI SDK.

API Schemas

Create a Thread

post
Authorizations
AuthorizationstringRequired

Bearer key

Body
Responses
post
/threads
default

Python + OpenAI SDK Example:


Retrieve information about a specific Thread by its ID

get
Authorizations
AuthorizationstringRequired

Bearer key

Path parameters
threadIdstringRequired
Responses
get
/threads/{threadId}
default

Python + OpenAI SDK Example:


Modify a specific Thread by its ID

post
Authorizations
AuthorizationstringRequired

Bearer key

Path parameters
threadIdstringRequired
Body
Responses
post
/threads/{threadId}
default

Python + OpenAI SDK Example:


Delete a specific Thread by its ID

delete
Authorizations
AuthorizationstringRequired

Bearer key

Path parameters
threadIdstringRequired
Responses
delete
/threads/{threadId}
default

Python + OpenAI SDK Example:

Last updated

Was this helpful?