Hide response attributes Show response attributes object
-
A unique identifier for the chat completion. Each chunk has the same ID.
-
A list of chat completion choices. Can contain more than one elements if
n
is greater than 1. Can also be empty for the last chunk if you setstream_options: {"include_usage": true}
.Hide choices attributes Show choices attributes object
-
A chat completion delta generated by streamed model responses.
Hide delta attributes Show delta attributes object
-
The contents of the chunk message.
-
Deprecated and replaced by
tool_calls
. The name and arguments of a function that should be called, as generated by the model.Hide function_call attributes Show function_call attributes object
Deprecated -
The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.
-
The name of the function to call.
-
-
Hide tool_calls attributes Show tool_calls attributes object
-
The ID of the tool call.
-
The type of the tool. Currently, only
function
is supported.Value is
function
. -
Hide function attributes Show function attributes object
-
The name of the function to call.
-
The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.
-
-
The role of the author of this message.
Values are
developer
,system
,user
,assistant
, ortool
. -
The refusal message generated by the model.
-
-
Log probability information for the choice.
Hide logprobs attributes Show logprobs attributes object | null
-
A list of message content tokens with log probability information.
Hide content attributes Show content attributes object
-
The token.
-
The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value
-9999.0
is used to signify that the token is very unlikely. -
A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be
null
if there is no bytes representation for the token. -
List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested
top_logprobs
returned.Hide top_logprobs attributes Show top_logprobs attributes object
-
The token.
-
The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value
-9999.0
is used to signify that the token is very unlikely. -
A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be
null
if there is no bytes representation for the token.
-
-
-
A list of message refusal tokens with log probability information.
Hide refusal attributes Show refusal attributes object
-
The token.
-
The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value
-9999.0
is used to signify that the token is very unlikely. -
A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be
null
if there is no bytes representation for the token. -
List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested
top_logprobs
returned.Hide top_logprobs attributes Show top_logprobs attributes object
-
The token.
-
The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value
-9999.0
is used to signify that the token is very unlikely. -
A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be
null
if there is no bytes representation for the token.
-
-
-
-
The reason the model stopped generating tokens. This will be
stop
if the model hit a natural stop point or a provided stop sequence,length
if the maximum number of tokens specified in the request was reached,content_filter
if content was omitted due to a flag from our content filters,tool_calls
if the model called a tool, orfunction_call
(deprecated) if the model called a function.Values are
stop
,length
,tool_calls
,content_filter
, orfunction_call
. -
The index of the choice in the list of choices.
-
-
The Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp.
-
The model to generate the completion.
-
The service tier used for processing the request.
Values are
scale
ordefault
. -
This fingerprint represents the backend configuration that the model runs with. Can be used in conjunction with the
seed
request parameter to understand when backend changes have been made that might impact determinism. -
The object type, which is always
chat.completion.chunk
.Value is
chat.completion.chunk
. -
Usage statistics for the completion request.
Hide usage attributes Show usage attributes object
-
Number of tokens in the generated completion.
Default value is
0
. -
Number of tokens in the prompt.
Default value is
0
. -
Total number of tokens used in the request (prompt + completion).
Default value is
0
. -
Breakdown of tokens used in a completion.
Hide completion_tokens_details attributes Show completion_tokens_details attributes object
-
When using Predicted Outputs, the number of tokens in the prediction that appeared in the completion.
Default value is
0
. -
Audio input tokens generated by the model.
Default value is
0
. -
Tokens generated by the model for reasoning.
Default value is
0
. -
When using Predicted Outputs, the number of tokens in the prediction that did not appear in the completion. However, like reasoning tokens, these tokens are still counted in the total completion tokens for purposes of billing, output, and context window limits.
Default value is
0
.
-
-
Breakdown of tokens used in the prompt.
-