Anthropic Claude Opus 4 (subscription) API parameters
These are the API parameters modelparams.dev tracks for Anthropic Claude Opus 4 when you reach it through a subscription rather than an API key — the settings you send in a request. Each row gives the type, default, valid range or values, and the conditions that gate it. It's the same data the JSON API serves.
After the parameter count instead — how many weights Claude Opus 4 has? That's a different number, and we don't track it. Here's the difference.
Length
1 param
| Parameter | Type | Default | Description | Condition |
|---|---|---|---|---|
|
Max tokens
max_tokens
|
integer (1…+∞) | 4096 | Maximum number of output tokens the model may generate. | — |
Sampling
3 params
| Parameter | Type | Default | Description | Condition |
|---|---|---|---|---|
|
Temperature
temperature
|
number (0…1 step 0.1) | 1 | Controls randomness. Lower values make outputs more focused; higher values make them more varied. |
Not when thinking.type ∈ {"adaptive", "enabled"}
|
|
Top P
top_p
|
number (0…1 step 0.01) | 1 | Controls nucleus sampling by limiting generation to tokens whose cumulative probability reaches this value. |
Not when thinking.type ∈ {"adaptive", "enabled"} or temperature ≠1
|
|
Top K
top_k
|
integer (0…+∞) | 0 | Limits token sampling to the top K most likely next tokens. |
Not when thinking.type ∈ {"adaptive", "enabled"}
|
Reasoning
2 params
| Parameter | Type | Default | Description | Condition |
|---|---|---|---|---|
|
Thinking mode
thinking.type
|
enum (disabled | adaptive | enabled) | "disabled" | Controls the Anthropic thinking mode values supported by this model. | — |
|
Budget tokens
thinking.budget_tokens
|
integer (1024…+∞) | 4096 | Maximum token budget Anthropic may use for extended thinking before producing the final answer. |
Only when thinking.type = "enabled"
|
Anthropic Claude Opus 4 API parameters in brief
Anthropic Claude Opus 4 via subscription documents 6 API parameters, grouped by what they control:
-
Length:
max_tokensdefaults to 4096, minimum 1. -
Sampling:
temperaturedefaults to 1, range 0–1, not when thinking.type ∈ {"adaptive", "enabled"};top_pdefaults to 1, range 0–1, not when thinking.type ∈ {"adaptive", "enabled"} or temperature ≠1;top_kdefaults to 0, minimum 0, not when thinking.type ∈ {"adaptive", "enabled"}. -
Reasoning:
thinking.typedefaults to "disabled", accepts "disabled", "adaptive", "enabled";thinking.budget_tokensdefaults to 4096, minimum 1024, only when thinking.type = "enabled".
Frequently asked questions
- Which API parameters does Anthropic Claude Opus 4 (subscription) support?
- Anthropic Claude Opus 4 (subscription) accepts 6 API parameters in the request body: max_tokens, temperature, top_p, top_k, thinking.type, thinking.budget_tokens.
- What is the default temperature for Anthropic Claude Opus 4 (subscription)?
- The default temperature for Anthropic Claude Opus 4 (subscription) is 1, within a valid range of 0 to 1.
- What is the default top_p for Anthropic Claude Opus 4 (subscription)?
- The default top_p for Anthropic Claude Opus 4 (subscription) is 1, within a valid range of 0 to 1.
- What is the default max_tokens for Anthropic Claude Opus 4 (subscription)?
- The default max_tokens for Anthropic Claude Opus 4 (subscription) is 4096, with a minimum of 1.
- What is the default top_k for Anthropic Claude Opus 4 (subscription)?
- The default top_k for Anthropic Claude Opus 4 (subscription) is 0, with a minimum of 0.
Resources
Other Anthropic models
Claude 3 Opus 20240229
4 params
View
Claude 3 Opus Latest
4 params
View
Claude 3.5 Haiku 20241022
4 params
View
Claude 3.5 Haiku Latest
4 params
View
Claude 3.5 Sonnet 20241022
4 params
View
Claude 3.5 Sonnet Latest
4 params
View
Claude 3.7 Sonnet 20250219
6 params
View
Claude 3.7 Sonnet Latest
6 params
View
Claude Fable 5
4 params
View
Claude Fable 5
Subscription
4 params
View
Claude Haiku 4
6 params
View
Claude Haiku 4
Subscription
6 params
View
Claude Haiku 4.5
6 params
View
Claude Haiku 4.5
Subscription
6 params
View
Claude Haiku 4.5 20251001
6 params
View
Claude Haiku 4.5 20251001
Subscription
6 params
View
Claude Opus 4 20250514
7 params
View
Claude Opus 4 20250514
Subscription
7 params
View
Claude Opus 4.1 20250805
7 params
View
Claude Opus 4.1 20250805
Subscription
7 params
View
Claude Opus 4.5 20251101
8 params
View
Claude Opus 4.5 20251101
Subscription
8 params
View
Claude Opus 4.6
8 params
View
Claude Opus 4.6
Subscription
8 params
View
Claude Opus 4.7
4 params
View
Claude Opus 4.7
Subscription
4 params
View
Claude Opus 4.8
4 params
View
Claude Opus 4.8
Subscription
4 params
View
Claude Opus 5
4 params
View
Claude Opus 5
Subscription
4 params
View
Claude Sonnet 4
Subscription
6 params
View
Claude Sonnet 4 20250514
7 params
View
Claude Sonnet 4 20250514
Subscription
7 params
View
Claude Sonnet 4.5
6 params
View
Claude Sonnet 4.5
Subscription
6 params
View
Claude Sonnet 4.5 20250929
6 params
View
Claude Sonnet 4.5 20250929
Subscription
6 params
View
Claude Sonnet 4.6
8 params
View
Claude Sonnet 4.6
Subscription
8 params
View
Claude Sonnet 5
4 params
View
Claude Sonnet 5
Subscription
4 params
View