Claude Sonnet 5.5 API
anthropic/claude-sonnet-5.5Claude Sonnet 5.5 turns text and image context into code, document analysis, and clear answers, with a 1M-token context window and adaptive thinking. Provide the relevant files and acceptance criteria to guide focused changes and reviewable results.
Claude Sonnet 5.5
Anthropic · messages
Quick start
Send a POST request to /v1/messages with anthropic/claude-sonnet-5.5. Choose JSON or SSE with stream, and receive generated content and usage.
- Endpoint
- POST /v1/messages
- Model ID
- anthropic/claude-sonnet-5.5
- Protocol
- Claude Messages
Request fields
| Field | Requirement | Description |
|---|---|---|
| model | Required | anthropic/claude-sonnet-5.5 |
| messages | Required | A non-empty ordered array with role and content; content accepts text or image blocks. |
| max_tokens | Required | Output token limit from 1 to 128,000; the playground defaults to 4,096. |
| system | Optional | System instructions as a string or text blocks. |
| output_config.format | Optional | Use json_schema and schema to define structured text output. |
| thinking | Optional | Defaults to adaptive thinking. |
| cache_control | Optional | Use an ephemeral cache marker with a 5m or 1h ttl; the minimum prompt length is 512 tokens. |
| tools | Optional | Define callable tools with name, description, and input_schema. |
| tool_choice | Optional | Use {"type":"auto"} for automatic tool selection or {"type":"none"} for a text reply. |
| stop_sequences | Optional | Strings that stop generation. |
| metadata | Optional | Additional request metadata such as user_id. |
| stream | Optional | true returns SSE events; false returns complete JSON. The API defaults to false; the playground uses 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-sonnet-5.5",
"messages": [
{
"role": "user",
"content": "Review this function and suggest a fix for the edge case."
}
],
"max_tokens": 4096,
"stream": false
}'Store API keys on your server and call the model from server-side code.
Continue with
Related Models
Claude Sonnet 5.5 API FAQ
What is Claude Sonnet 5.5 API?
Claude Sonnet 5.5 is an Anthropic model for coding, document analysis, and everyday agent workflows. It combines text and image understanding to produce code, explanations, and written conclusions. Adaptive thinking and a 1M-token context window help connect requirements with source material. Use the API tab for request examples or try a text conversation in the Playground.
How does Claude Sonnet 5.5 help with coding and bug fixes?
Provide the expected behavior, related source files, and a failing example or test result. Claude Sonnet 5.5 can trace the relevant logic, propose changes, and explain how those changes address the evidence. Ask it to organize the result around your acceptance criteria so you can review and test the implementation.
How large is the Claude Sonnet 5.5 context window?
Claude Sonnet 5.5 has a 1,000,000-token context window for related files, documents, and conversation history. Its maximum output is 128,000 tokens. Set max_tokens for each response and prioritize the material that supports your current question.
Can Claude Sonnet 5.5 analyze images and charts?
Yes. In a Claude Messages API request, combine text with image content blocks and ask a focused question about a chart, diagram, or screenshot. The model returns a text response that connects visual details with the surrounding instructions and evidence.
What does Claude Sonnet 5.5 cost on Vidgo?
Input costs $1.60 (320 credits) and output costs $8.00 (1600 credits) per 1M tokens. Cache reads and cache writes are measured separately. The Pricing section lists all five rates so you can estimate a request from its input, output, and cache usage.
How does Claude Sonnet 5.5 prompt caching reduce repeated-input costs?
Reuse a stable prompt prefix with cache_control and choose a five-minute or one-hour lifetime. Cacheable prompt content starts at 512 tokens. Later cache reads cost $0.160 per 1M tokens; cache writes cost $2.00 for five minutes or $3.20 for one hour per 1M tokens.





























