Completions
Create a Text Completion
ModelsExpand Collapse
Completion { id, completion, model, 2 more }
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.
"claude-opus-4-6" | "claude-sonnet-4-6" | "claude-opus-4-5-20251101" | 19 more
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
stop_reason: string | nullThe 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: "completion"Object type.
Object type.
For Text Completions, this is always "completion".