Represents the completion response object from the API. Note: The streaming and non-streaming response objects have the same structure (unlike the chat endpoint).
Parameter
Type
Description
id
string
Unique identifier for the completion
choices
array
List of completion choices generated by the model for the input prompt
created
integer
Unix timestamp (in seconds) when the completion was created
model
string
Model used for the completion
system_fingerprint
string
Fingerprint representing the backend configuration where the model is running
object
string
Object type, always "text_completion"
usage
object
Usage statistics for the completion request
completion_tokens
integer
Number of tokens in the generated completion
prompt_tokens
integer
Number of tokens in the prompt
total_tokens
integer
Total number of tokens used in the request (prompt + completion)