Claude Sonnet 4.5 API

anthropic/claude-sonnet-4.5
200K tokens · 1000 input / 5000 output credits / 1M tokens

Claude Sonnet 4.5 Chat turns ordered text and image messages into code, explanations, and analysis for iterative development. Its 200K-token context keeps the task history in view while system instructions and tool definitions help guide each step.

Claude Sonnet 4.5

Anthropic · chat-completions

Chat with Claude Sonnet 4.5

Each model has its own conversation. Switching never sends another model's history, and switching back resumes where you left off. Requests are billed from actual token usage.

Ctrl / ⌘ + Enter to send0 / 32,000

Continue with

Claude Sonnet 4.5

Claude Sonnet 4.5 is suited to coding tasks that move through several turns of planning, implementation, and review. Supply ordered messages, relevant files, and optional image blocks to keep the work grounded in the material you provide. Claude Messages supports tool definitions and complete or streamed responses, with max_tokens controlling response length. Choose /v1/chat/completions for an ordered messages array with a system role, or /v1/messages for a separate system field. Both endpoints return a complete JSON response by default.

Why Choose Claude Sonnet 4.5?

  • Iterative codingCarry task instructions, code changes, and feedback through successive conversation turns.

  • Tool-guided workflowsDefine application tools so the model can request specific actions and continue from their results.

  • Context across materialsAnalyze related code, documents, and conversation history in a 200K-token window.

Parameters

/v1/chat/completions

ParameterRequirementDescription
modelRequired

Use anthropic/claude-sonnet-4.5.

messagesRequired

A non-empty ordered array of conversation messages; each item contains role and content.

max_tokensOptional

A positive integer setting the response output limit; the Playground offers 1?65,536.

Default4096
temperatureOptional

Sampling temperature; the Playground offers 0?2.

Default1
top_pOptional

Nucleus sampling probability; the Playground offers 0?1.

Default1
streamOptional

Set true for an SSE event stream; the Playground uses complete JSON responses.

Defaultfalse

/v1/messages

ParameterRequirementDescription
modelRequired

Use anthropic/claude-sonnet-4.5.

messagesRequired

A non-empty ordered array of conversation messages; each item contains role and content.

systemOptional

System instructions supplied separately from messages.

max_tokensRequired

A positive integer setting the response output limit; the Playground offers 1?65,536.

Default4096
temperatureOptional

Sampling temperature; the Playground offers 0?2.

Default1
top_pOptional

Nucleus sampling probability; the Playground offers 0?1.

Default1
streamOptional

Set true for an SSE event stream; the Playground uses complete JSON responses.

Defaultfalse

How to Use

  1. Choose the endpointSelect /v1/chat/completions or /v1/messages and set model to anthropic/claude-sonnet-4.5.

  2. Provide the conversationAdd ordered messages. Put system guidance in a system-role message for Chat Completions, or in the system field for Messages.

  3. Set the response lengthSet max_tokens to a positive integer for Messages, then send the request and review the response and token usage.

Pricing

Vidgo AI measures input and output tokens separately. Each rate applies per 1M tokens.

UsageRateDetails
Input$2.40 · 1000 credits / 1M tokensTokens in the request.
Output$12.00 · 5000 credits / 1M tokensTokens generated in the response.

Best Use Cases

  • Software developmentWork through a feature or bug fix with source context and review feedback.

  • Tool-assisted agentsConnect model tool requests to application functions and return their results in later turns.

  • Technical analysisCombine documents, images, and task constraints in a single investigation.

Pro Tips

  • Describe the desired behavior and include the files that determine it.
  • Define each tool with a clear input schema and return its result as a later message.
  • Keep follow-up requests tied to concrete code or evidence from earlier turns.

Usage Notes

  • Claude Sonnet 4.5 has a 200K-token context window and a 64K-token model output limit.
  • The Playground max_tokens control ranges from 1 to 65,536 and starts at 4,096.
  • Use anthropic/claude-sonnet-4.5 with /v1/chat/completions or /v1/messages.

Related Models

Claude Sonnet 4.5 API frequently asked questions

What is the Claude Sonnet 4.5 API?

Claude Sonnet 4.5 turns conversation text and image context into useful answers. Its 200K-token context supports connected work. Use anthropic/claude-sonnet-4.5 through Chat Completions or Claude Messages, or try the Playground above.

How can Claude Sonnet 4.5 support agent workflows?

Define the tools available to Claude Sonnet 4.5 with names and input schemas. Your application executes requested tools and sends their results in the next conversation turn.

What context and output sizes does Claude Sonnet 4.5 have?

Claude Sonnet 4.5 has a 200K-token context window and a 64K-token model output limit. In the Playground, max_tokens ranges from 1 to 65,536.

How do I send an image to Claude Sonnet 4.5?

Add an image block to messages.content with the text question it relates to. The model uses both inputs to produce a text answer.

What does Claude Sonnet 4.5 cost on Vidgo AI?

Claude Sonnet 4.5 is $2.40 and 1000 credits per 1M input tokens, and $12.00 and 5000 credits per 1M output tokens. The Pricing section shows both rates.

Which API endpoints can I use for Claude Sonnet 4.5?

Use anthropic/claude-sonnet-4.5 with /v1/chat/completions or /v1/messages. Choose Chat Completions for system-role messages or Messages for a separate system field.