API Reference
Chat Completions
Generate a model response for a given chat conversation. Supports streaming and non-streaming responses.
POST
This API endpoint allows you to send text and images as inputs, and the model will generate the next message in the conversation.
Create Chat Completion
To create a chat completion, use the following endpoint:POST /v1/chat/completions
Request Body
An array of message objects that form the conversation
The maximum number of tokens to generate
Sampling temperature, a value between 0 and 2.
Whether to enable streaming responses
Tells the model not to repeat a word that has already been used multiple times
in the conversation.
Prevents the model from repeating a word, even if it’s only been used once
Up to 4 sequences where the API will stop generating further tokens. The
returned text will not contain the stop sequence.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Body
application/json
Minimum array length:
1- TextResponseFormat
- JsonObjectResponseFormat
- JsonSchemaResponseFormat
Required range:
0 <= x <= 2Required range:
0 <= x <= 1Required range:
x >= 1Required range:
x >= 1Required range:
-2 <= x <= 2Required range:
-2 <= x <= 2Available options:
none, minimal, low, medium, high, xhigh Response
Successful Response
A unique identifier for the chat completion.
The Unix timestamp (in seconds) of when the chat completion was created.
The model used for the chat completion.
A list of chat completion choices.
Usage statistics for the completion request.
The object type, which is always chat.completion.
Allowed value:
"chat.completion"This fingerprint represents the backend configuration that the model runs with.