v6

latestSwagger 2.02026-07-1340109191.2 KB

Creates a new assistant.

post/assistants

Request body

modelstring required

The ID of the model to use.

namestring nullable

The name of the new assistant.

descriptionstring nullable

The description of the new assistant.

instructionsstring nullable

The system instructions for the new assistant to use.

temperaturenumber float nullable

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.

top_pnumber float nullable

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.

{"stackTrail":"components:schemas:AssistantsApiResponseFormatOption","oasType":"schema","type":"unknown"}
metadataobject nullable

A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length.

Response

The new assistant instance.

idstring required

The identifier, which can be referenced in API endpoints.

object'assistant' required

The object type, which is always assistant.

created_atinteger required

The Unix timestamp, in seconds, representing when this object was created.

namestring nullable required

The name of the assistant.

descriptionstring nullable required

The description of the assistant.

modelstring required

The ID of the model to use.

instructionsstring nullable required

The system instructions for the assistant to use.

temperaturenumber float nullable required

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.

top_pnumber float nullable required

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.

{"stackTrail":"components:schemas:AssistantsApiResponseFormatOption","oasType":"schema","type":"unknown"}
metadataobject nullable required

A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length.