Completions
ModelsExpand Collapse
type Completion struct{…}
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.
Model Model
The model that will complete your prompt.
See models for additional details and options.
type Model string
The model that will complete your prompt.
See models for additional details and options.
const ModelClaudeOpus4_5_20251101 Model = "claude-opus-4-5-20251101"
Premium model combining maximum intelligence with practical performance
const ModelClaudeOpus4_5 Model = "claude-opus-4-5"
Premium model combining maximum intelligence with practical performance
const ModelClaude3_7SonnetLatest Model = "claude-3-7-sonnet-latest"
High-performance model with early extended thinking
const ModelClaude3_7Sonnet20250219 Model = "claude-3-7-sonnet-20250219"
High-performance model with early extended thinking
const ModelClaude3_5HaikuLatest Model = "claude-3-5-haiku-latest"
Fastest and most compact model for near-instant responsiveness
const ModelClaude3_5Haiku20241022 Model = "claude-3-5-haiku-20241022"
Our fastest model
const ModelClaudeHaiku4_5 Model = "claude-haiku-4-5"
Hybrid model, capable of near-instant responses and extended thinking
const ModelClaudeHaiku4_5_20251001 Model = "claude-haiku-4-5-20251001"
Hybrid model, capable of near-instant responses and extended thinking
const ModelClaudeSonnet4_20250514 Model = "claude-sonnet-4-20250514"
High-performance model with extended thinking
const ModelClaudeSonnet4_0 Model = "claude-sonnet-4-0"
High-performance model with extended thinking
const ModelClaude4Sonnet20250514 Model = "claude-4-sonnet-20250514"
High-performance model with extended thinking
const ModelClaudeSonnet4_5 Model = "claude-sonnet-4-5"
Our best model for real-world agents and coding
const ModelClaudeSonnet4_5_20250929 Model = "claude-sonnet-4-5-20250929"
Our best model for real-world agents and coding
const ModelClaudeOpus4_0 Model = "claude-opus-4-0"
Our most capable model
const ModelClaudeOpus4_20250514 Model = "claude-opus-4-20250514"
Our most capable model
const ModelClaude4Opus20250514 Model = "claude-4-opus-20250514"
Our most capable model
const ModelClaudeOpus4_1_20250805 Model = "claude-opus-4-1-20250805"
Our most capable model
const ModelClaude3OpusLatest Model = "claude-3-opus-latest"
Excels at writing and complex tasks
const ModelClaude_3_Opus_20240229 Model = "claude-3-opus-20240229"
Excels at writing and complex tasks
const ModelClaude_3_Haiku_20240307 Model = "claude-3-haiku-20240307"
Our previous most fast and cost-effective
StopReason 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".