data: {
"id": "cmpl-26a1e10db8544bc3adb488d2d205288b",
"object": "text_completion",
"choices": [
{
"index": 0,
"text": " such",
"token": 1778,
"finish_reason": null,
"logprobs": null
}
],
"created": 1733382157
}
data: {
"id": "cmpl-26a1e10db8544bc3adb488d2d205288b",
"object": "text_completion",
"choices": [
{
"index": 0,
"text": " as",
"token": 439,
"finish_reason": null,
"logprobs": null
}
],
"created": 1733382157
}
...
data: {
"id": "cmpl-26a1e10db8544bc3adb488d2d205288b",
"object": "text_completion",
"choices": [
{
"index": 0,
"text": "",
"finish_reason": "length",
"logprobs": null
}
],
"created": 1733382157
}
data: {
"id": "cmpl-26a1e10db8544bc3adb488d2d205288b",
"object": "text_completion",
"choices": [],
"usage": {
"prompt_tokens": 5,
"completion_tokens": 10,
"total_tokens": 15
},
"created": 1733382157
}
data: [DONE]
string
required
A unique ID of the completion.
string
required
The object type, which is always set to
text_completion.string
The model to generate the completion.
object[]
required
Show child attributes
Show child attributes
integer
required
The index of the choice in the list of generated choices.
string
required
The text.
integer | null
The token.
enum<string> | null
Termination condition of the generation.
stop means the API returned the full completions generated by the model without running into any limits.
length means the generation exceeded max_tokens or the conversation exceeded the max context length.Available options: stop, lengthobject | null
Log probability information for the choice.
Show child attributes
Show child attributes
integer[]
required
The starting character position of each token in the generated text, useful for mapping tokens back to their exact location for detailed analysis.
number[]
required
The log probabilities of each generated token, indicating the model’s confidence in selecting each token.
string[]
required
A list of individual tokens generated in the completion, representing segments of text such as words or pieces of words.
object[]
required
A list of dictionaries, where each dictionary represents the top alternative tokens considered by the model at a specific position in the generated text, along with their log probabilities. The number of items in each dictionary matches the value of
logprobs.object | null
integer
required
The Unix timestamp (in seconds) for when the token is sampled.