Assistant API
API Schemas
Create an Assistant
Bearer key
The description of the Assistant. The maximum length is 512 characters.
The system instructions that the Assistant uses. The maximum length is 256,000 characters. Instructions can indeed be very large and complex, including full action frameworks, example messages, response formatting guidelines, topic restrictions, and stylistic rules.
The name of the Assistant. The maximum length is 256 characters.
Constrains effort on reasoning for reasoning models.
Specifies the format that the model must output.
What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
We generally recommend altering this or temperature but not both.
Python + OpenAI SDK Example:
Retrieve a list of Assistants along with their parameters
Bearer key
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.
Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.
A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.
A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.
Python + OpenAI SDK Example:
Retrieve information about a specific Assistant by its ID
Bearer key
Python + OpenAI SDK Example:
Modify a specific Assistant by its ID
Bearer key
Python + OpenAI SDK Example:
Delete a specific Assistant by its ID
Bearer key
Python + OpenAI SDK Example:
Last updated
Was this helpful?