Create a chat completion (OpenAI compatible).
Request body
The identifier of the model to use for generating completions. This can be a model ID or an alias.
A value between -2.0 and 2.0 that penalizes new tokens based on their frequency in the text so far. Higher values decrease the likelihood of the model repeating the same tokens.
The maximum number of tokens to generate in the completion. If null, will use the model's maximum context length. This is the maximum number of tokens that will be generated.
A value between -2.0 and 2.0 that penalizes new tokens based on whether they appear in the text so far. Higher values increase the likelihood of the model talking about new topics.
A seed value for deterministic sampling. Using the same seed with the same parameters will generate the same completion.
If true, partial message deltas will be sent as server-sent events. Useful for showing progressive generation in real-time.
Controls randomness in the model's output. Values between 0 and 2. Lower values make the output more focused and deterministic, higher values make it more random and creative.
An alternative to temperature for controlling randomness. Controls the cumulative probability of tokens to consider. Lower values make output more focused.
Response
chat completion response
A unique identifier for this chat completion response. Can be used for tracking or debugging.
The Unix timestamp (in seconds) indicating when this completion was generated by the API.
The specific model used to generate this completion. This will be the model's full identifier string.
A unique identifier for the system state that generated this response. Useful for tracking model behavior across requests.
The type of object returned, always "chat.completion" for chat completion responses.