Represents a completion response object from the API. Note: Streaming response and non-streaming response objects have the same structure (unlike the chat endpoint).
Parameters
Type
Description
id
string
Completed unique identifier
choices
array
A list of completion options generated by the model for the input prompt
created
integer
Unix timestamp of completion of creation (seconds)
model
string
The model to use for completion
system_fingerprint
string
The fingerprint represents the backend configuration of the model running
object
string
Object type, always "text_completion"
usage
object
Usage statistics for completing requests
completion_tokens
integer
Number of tokens in generated completions
prompt_tokens
integer
Number of tokens in the prompt
total_tokens
integer
Total number of tokens used in the request (prompt + completed)
{"id":"cmpl-uqkvlQyYK7bGYrRHQ0eXlWi7","object":"text_completion","created":1589478378,"model":"gpt-3.5-turbo","choices":[{"text":"\n\nThis is indeed a test","index":0,"logprobs":null,"finish_reason":"length"}],"usage":{"prompt_tokens":5,"completion_tokens":7,"total_tokens":12}}