Completions
Create a Text Completion
ModelsExpand Collapse
Completion = object { id, completion, model, 2 more }
Unique object identifier.
The format and length of IDs may change over time.
The resulting completion up to and excluding the stop sequences.
UnionMember0 = "claude-3-7-sonnet-latest" or "claude-3-7-sonnet-20250219" or "claude-3-5-haiku-latest" or 15 moreThe model that will complete your prompt.
See models for additional details and options.
The model that will complete your prompt.
See models for additional details and options.
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
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.
For Text Completions, this is always "completion".
Object type.
For Text Completions, this is always "completion".