⌘K

Claude Opus 4.6

claude-opus-4-6

Claude Opus 4.6 has significantly upgraded its coding capabilities over its predecessor, with more rigorous planning, the ability to sustain agentic tasks over longer periods, stronger adaptability to large codebases, and markedly improved code review and self-debugging skills. It also introduces a 1-million-token context window (in beta) for the first time in the Opus series.

Authentication

authorization string required

All APIs require authentication via Bearer Token.

Get API Key:

Visit API Key Management Page to get your API Key.

Usage:

Add to request header:

Authorization: Bearer YOUR_API_KEY

Parameters

model string required

Model ID to use for the request

Value: claude-opus-4-6


messages array required

Array of message objects representing the conversation history

role string required

Message role

Options: user, assistant, system, developer

content string | array required

Text string or multimodal array


max_tokens integer

Maximum tokens to generate in the completion.

Range: 1 - 16384


temperature number

Sampling temperature to use.

Default: 1.0

Range: 0.0 - 2.0


top_p number

Nucleus sampling parameter.

Default: 1.0

Range: 0.0 - 1.0


stream boolean

Whether to stream response incrementally.

Default: false