Completions
List available chat completion models
GET/v5/chat/completions/models
Generate OpenAI chat completion from messages
POST/v5/chat/completions
ModelsExpand Collapse
ChatCompletion object { id, choices, created, 5 more }
ChatCompletion object { id, choices, created, 5 more }
choices: array of object { finish_reason, index, message, logprobs }
choices: array of object { finish_reason, index, message, logprobs }
message: object { role, annotations, audio, 4 more } A chat completion message generated by the model.
message: object { role, annotations, audio, 4 more }
A chat completion message generated by the model.
audio: optional object { id, data, expires_at, transcript } If the audio output modality is requested, this object contains data
about the audio response from the model. Learn more.
audio: optional object { id, data, expires_at, transcript }
If the audio output modality is requested, this object contains data about the audio response from the model. Learn more.
function_call: optional object { arguments, name } Deprecated and replaced by tool_calls.
The name and arguments of a function that should be called, as generated by the model.
function_call: optional object { arguments, name }
Deprecated and replaced by tool_calls.
The name and arguments of a function that should be called, as generated by the model.
ChatCompletionChunk object { id, choices, created, 5 more }
ChatCompletionChunk object { id, choices, created, 5 more }
choices: array of object { delta, index, finish_reason, logprobs }
choices: array of object { delta, index, finish_reason, logprobs }
delta: object { content, function_call, refusal, 2 more } A chat completion delta generated by streamed model responses.
delta: object { content, function_call, refusal, 2 more }
A chat completion delta generated by streamed model responses.
CompletionCreateResponse = ChatCompletion { id, choices, created, 5 more } or ChatCompletionChunk { id, choices, created, 5 more }
CompletionCreateResponse = ChatCompletion { id, choices, created, 5 more } or ChatCompletionChunk { id, choices, created, 5 more }
One of the following:
ChatCompletion object { id, choices, created, 5 more }
ChatCompletion object { id, choices, created, 5 more }
choices: array of object { finish_reason, index, message, logprobs }
choices: array of object { finish_reason, index, message, logprobs }
message: object { role, annotations, audio, 4 more } A chat completion message generated by the model.
message: object { role, annotations, audio, 4 more }
A chat completion message generated by the model.
audio: optional object { id, data, expires_at, transcript } If the audio output modality is requested, this object contains data
about the audio response from the model. Learn more.
audio: optional object { id, data, expires_at, transcript }
If the audio output modality is requested, this object contains data about the audio response from the model. Learn more.
function_call: optional object { arguments, name } Deprecated and replaced by tool_calls.
The name and arguments of a function that should be called, as generated by the model.
function_call: optional object { arguments, name }
Deprecated and replaced by tool_calls.
The name and arguments of a function that should be called, as generated by the model.
ChatCompletionChunk object { id, choices, created, 5 more }
ChatCompletionChunk object { id, choices, created, 5 more }
choices: array of object { delta, index, finish_reason, logprobs }
choices: array of object { delta, index, finish_reason, logprobs }
delta: object { content, function_call, refusal, 2 more } A chat completion delta generated by streamed model responses.
delta: object { content, function_call, refusal, 2 more }
A chat completion delta generated by streamed model responses.