Claude Opus 4.6 Chat API
anthropic/claude-opus-4.6Claude Opus 4.6 Chat turns ordered text and image messages into code, detailed analysis, and reasoned answers for demanding multi-step work. Its 1M-token context links large codebases and documents, while system instructions and tool results help examine complex decisions.
Claude Opus 4.6
Anthropic · chat-completions
Quick start
Send a POST request to /v1/messages with anthropic/claude-opus-4.6. Choose JSON or SSE with stream, and receive generated content and usage.
- Endpoint
- POST /v1/messages
- Model ID
- anthropic/claude-opus-4.6
- Protocol
- Claude Messages
Request fields
| Field | Requirement | Description |
|---|---|---|
| model | Required | anthropic/claude-opus-4.6 |
| messages | Required | A non-empty ordered conversation array; each message has role and content. |
| max_tokens | Required | A positive integer setting the maximum output tokens for this response. |
| system | Optional | System instructions as a string or text blocks. |
| temperature | Optional | Sampling temperature; the playground allows 0–1. |
| top_p | Optional | Nucleus sampling probability; the playground allows 0–1 and defaults to 1. |
| cache_control | Optional | Places a prompt-cache marker on cacheable content. |
| tools | Optional | Defines tools available to the model. |
| tool_choice | Optional | Controls how the model selects a tool. |
| stop_sequences | Optional | Stops generation at a specified string. |
| stream | Optional | Returns an SSE event stream when true. |
Response and usage
Successful responses include generated content and usage. Billing settles from actual input, output, and cache tokens.
Streaming
Set stream: true to read SSE. Finalize usage accounting from the terminal usage event.
curl --request POST \
--url https://api.vidgo.ai/v1/messages \
--header "x-api-key: $VIDGO_API_KEY" \
--header 'anthropic-version: 2023-06-01' \
--header 'Content-Type: application/json' \
--data '{
"model": "anthropic/claude-opus-4.6",
"messages": [
{
"role": "user",
"content": "Explain why deterministic retries matter in distributed systems."
}
],
"max_tokens": 1024,
"temperature": 1,
"top_p": 1,
"stream": false
}'Keep API keys on the server. Never expose them in browser code or public repositories.
Continue with
Related Models
Claude Opus 4.6 Chat API frequently asked questions
What is the Claude Opus 4.6 Chat API?
Claude Opus 4.6 is an Anthropic model for complex coding, deep analysis, and multi-step agent tasks. It turns ordered text and image messages into code and reasoned answers, using a 1M-token context to connect relevant evidence. Use the Playground above or call Claude Messages and Chat Completions.
How does Claude Opus 4.6 approach difficult debugging?
Provide the observed behavior, relevant source files, constraints, and test results. Claude Opus 4.6 can compare those materials, trace likely causes, and explain proposed changes for review.
How can Claude Opus 4.6 support a multi-step agent?
Define available tools and return each requested tool result as a later message. The conversation can then carry the task through analysis, action, and review.
What context and output sizes does Claude Opus 4.6 have?
The published model specification is a 1M-token context window and a 128K-token maximum output. This page's Playground offers a 256–8,192-token output control.
Can Claude Opus 4.6 analyze diagrams and screenshots?
Add an image block to messages.content with a focused question. Claude Opus 4.6 can connect the visible details with the text context in its answer.
What does Claude Opus 4.6 cost on Vidgo AI?
Input is $2.70 and 540 credits per 1M tokens; output is $12.00 and 2400 credits per 1M tokens. The Pricing section lists both rates.