Completions
Create a Text Completion
ModelsExpand Collapse
class Completion { id, completion, model, 2 more }
id: String
Unique object identifier.
The format and length of IDs may change over time.
completion: String
The resulting completion up to and excluding the stop sequences.
The model that will complete your prompt.
See models for additional details and options.
:"claude-opus-4-5-20251101" | :"claude-opus-4-5" | :"claude-3-7-sonnet-latest" | 17 more
The model that will complete your prompt.
See models for additional details and options.
:"claude-opus-4-5-20251101"
Premium model combining maximum intelligence with practical performance
:"claude-opus-4-5"
Premium model combining maximum intelligence with practical performance
:"claude-3-7-sonnet-latest"
High-performance model with early extended thinking
:"claude-3-7-sonnet-20250219"
High-performance model with early extended thinking
:"claude-3-5-haiku-latest"
Fastest and most compact model for near-instant responsiveness
:"claude-3-5-haiku-20241022"
Our fastest model
:"claude-haiku-4-5"
Hybrid model, capable of near-instant responses and extended thinking
:"claude-haiku-4-5-20251001"
Hybrid model, capable of near-instant responses and extended thinking
:"claude-sonnet-4-20250514"
High-performance model with extended thinking
:"claude-sonnet-4-0"
High-performance model with extended thinking
:"claude-4-sonnet-20250514"
High-performance model with extended thinking
:"claude-sonnet-4-5"
Our best model for real-world agents and coding
:"claude-sonnet-4-5-20250929"
Our best model for real-world agents and coding
:"claude-opus-4-0"
Our most capable model
:"claude-opus-4-20250514"
Our most capable model
:"claude-4-opus-20250514"
Our most capable model
:"claude-opus-4-1-20250805"
Our most capable model
:"claude-3-opus-latest"
Excels at writing and complex tasks
:"claude-3-opus-20240229"
Excels at writing and complex tasks
:"claude-3-haiku-20240307"
Our previous most fast and cost-effective
stop_reason: String
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".