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.
Note that the method names in the API schema and the SDK often differ. Accordingly, when calling these methods via the REST API, you should use the names from the API schema, while for calls through the OpenAI SDK, use the names from the examples.
API Schemas
Create a Thread
Bearer key
Python + OpenAI SDK Example:
Retrieve information about a specific Thread by its ID
Bearer key
Python + OpenAI SDK Example:
Modify a specific Thread by its ID
Bearer key
Python + OpenAI SDK Example:
Delete a specific Thread by its ID
Bearer key
Python + OpenAI SDK Example:
Last updated
Was this helpful?