Claude 4.5 Sonnet API

Claude 4.5 Sonnet offers a balance of intelligence and speed for diverse enterprise and coding tasks.

Modalities
TextText
In / Out price
$3/$15per 1M
Context window
200K tokens
Released
Oct 1, 2025

Claude 4.5 Sonnet overview

The pelican test: one prompt, every text model, unedited SVG output from Nov 3, 2026.

SVG of a pelican riding a bicycle, written by Claude 4.5 Sonnet through AI/ML API

Claude 4.5 Sonnet specs

Model ID
anthropic/claude-sonnet-4.5
Developer
Anthropic
Context window
200,000 tokens
Max output
64,000 tokens
Input
Text
Output
Text
API
OpenAI-compatible, base URL https://api.aimlapi.com/v1

What is Claude 4.5 Sonnet API?

Claude 4.5 Sonnet offers a balance of intelligence and speed for diverse enterprise and coding tasks.

Where to Use Claude 4.5 Sonnet

Coding and code review
Generate, debug, and review code across languages, reading whole files or repos in a single prompt.

Use cases

Claude Sonnet 4.5 is documented as suited to coding, including long-horizon software projects and everyday development tasks. It is also suited to computer use, such as browser-based work and other tasks that involve interacting with software interfaces. Anthropic and its cloud partners describe it as useful for agents and autonomous workflows, including long-running tasks that coordinate tools or multiple agents. It is additionally described as useful for research and financial analysis, including handling office files, monitoring regulatory changes, and producing actionable insights.

Capabilities

  • Streaming

Claude 4.5 Sonnet benchmarks by Artificial Analysis

See how Claude 4.5 Sonnet compares in generation speed and latency. Data retrieved Nov 4, 2026.

Speed

Output tokens / second

Benchmark results

Compare 8 models available on AI/ML API across 5 independent benchmarks.

Humanity's Last Exam

Expert-written questions across academic subjects.

Claude 4.5 Sonnet API pricing

Claude 4.5 Sonnet pricing in US dollars
UsagePriceUnit
Input$31M tokens
Output$151M tokens
Cached input$0.31741M tokens

Prices from the AI/ML API price list, checked on Nov 4, 2026.

Claude 4.5 Sonnet vs other models: token prices

AI/ML API input and output rates for 5 models, per million tokens.

AI/ML API model prices in USD per million tokens
ModelInputOutput
Claude 4.5 Sonnet$3$15
Claude Haiku 5.5$0.1$0.5
Claude Sonnet 5.5$2$10
Claude Opus 5.5$4$20
Claude Fable 5.1$10$50

How to use the Claude 4.5 Sonnet API

View docs

Build with your agent

Give your agent the model details, code and documentation.

1Get your API key

Create API key
export AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"

2Make your first request

curl 'https://api.aimlapi.com/v1/chat/completions' \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "anthropic/claude-sonnet-4.5",
  "messages": [
    {
      "role": "user",
      "content": "Write a haiku about the ocean."
    }
  ]
}'

Claude 4.5 Sonnet FAQ

What is the context window of Claude 4.5 Sonnet?

Claude 4.5 Sonnet has a 200,000 tokens context window and can return up to 64,000 tokens.

What inputs and outputs does Claude 4.5 Sonnet support?

Claude 4.5 Sonnet takes text as input and returns text.

What is the model ID for Claude 4.5 Sonnet?

Use anthropic/claude-sonnet-4.5 as the model id. Requests go to https://api.aimlapi.com/v1/chat/completions.

How much does Claude 4.5 Sonnet cost?

Claude 4.5 Sonnet costs $3 input and $15 output per 1M tokens on AI/ML API, billed as you go with no subscription.

Does Claude 4.5 Sonnet support streaming?

Yes, Claude 4.5 Sonnet can stream responses as they are generated.

Who created Claude 4.5 Sonnet?

Claude 4.5 Sonnet was built by Anthropic.

Start building with Claude 4.5 Sonnet

Claude 4.5 Sonnet API

anthropic/claude-sonnet-4.5

Build with your agent

Give your agent the model details, code and documentation.

1Get your API key

Create API key
export AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"

2Make your first request

curl 'https://api.aimlapi.com/v1/chat/completions' \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "anthropic/claude-sonnet-4.5",
  "messages": [
    {
      "role": "user",
      "content": "Write a haiku about the ocean."
    }
  ]
}'