Completions
ModelsExpand Collapse
type Completion struct{…}
ID stringUnique object identifier.
Unique object identifier.
The format and length of IDs may change over time.
The resulting completion up to and excluding the stop sequences.
Model ModelThe model that will complete your prompt.
The model that will complete your prompt.
See models for additional details and options.
type Model stringThe model that will complete your prompt.
The model that will complete your prompt.
See models for additional details and options.
Most intelligent model for building agents and coding
Frontier intelligence at scale — built for coding, agents, and enterprise workflows
Premium model combining maximum intelligence with practical performance
Premium model combining maximum intelligence with practical performance
High-performance model with early extended thinking
High-performance model with early extended thinking
Fastest and most compact model for near-instant responsiveness
Our fastest model
Hybrid model, capable of near-instant responses and extended thinking
Hybrid model, capable of near-instant responses and extended thinking
High-performance model with extended thinking
High-performance model with extended thinking
High-performance model with extended thinking
Our best model for real-world agents and coding
Our best model for real-world agents and coding
Our most capable model
Our most capable model
Our most capable model
Our most capable model
Excels at writing and complex tasks
Excels at writing and complex tasks
Our previous most fast and cost-effective
StopReason stringThe reason that we stopped.
The reason that we stopped.
This may be one the following values:
"stop_sequence": we reached a stop sequence — either provided by you via thestop_sequencesparameter, or a stop sequence built into the model"max_tokens": we exceededmax_tokens_to_sampleor the model's maximum
Type CompletionObject type.
Object type.
For Text Completions, this is always "completion".