Claude Sonnet 4
Anthropic (Vertex AI)Text
Claude Sonnet 4 is a text model from Anthropic (Vertex AI) with a context window of 1.0M tokens and max output of 64K tokens. Pricing starts at $3.00 per million input tokens and $15.00 per million output tokens (cheapest at Databricks).
Specifications
| Model Key | vertex_ai/claude-sonnet-4@20250514 |
| Provider | Anthropic (Vertex AI) |
| LiteLLM Provider | vertex_ai-anthropic_models |
| Mode | Text |
| Canonical Name | claude-sonnet-4 |
| Context Window | 1.0M tokens |
| Max Output | 64K tokens |
Capabilities
✓ Vision✓ Function Calling✓ Reasoning✓ JSON Schema✗ System Messages✗ Web Search✓ Prompt Caching✗ Audio Input✗ Audio Output
Pricing
| Type | Per 1K Tokens | Per 1M Tokens |
|---|---|---|
| Input Tokens | $0.0030 | $3.00 |
| Output Tokens | $0.015 | $15.00 |
| Cache Read (Input) | $0.000300 | $0.300 |
| Cache Write (Input) | $0.0038 | $3.75 |
Price Comparison by Provider
Compare prices for Claude Sonnet 4 across different providers. The same model may be available through multiple providers at different price points.
Provider | Model Key | Input Price | Output Price |
|---|---|---|---|
| Anthropic | claude-4-sonnet-20250514 | $3.00 | $15.00 |
| Deepinfra | deepinfra/anthropic/claude-4-sonnet | $3.30 | $16.50 |
| Heroku | heroku/claude-4-sonnet | N/A | N/A |
| Replicate | replicate/anthropic/claude-4-sonnet | $3.00 | $15.00 |
| Vercel Ai Gateway | vercel_ai_gateway/anthropic/claude-4-sonnet | $3.00 | $15.00 |
| Github Copilot | github_copilot/claude-sonnet-4 | N/A | N/A |
| Gmi | gmi/anthropic/claude-sonnet-4 | $3.00 | $15.00 |
| OpenRouter | openrouter/anthropic/claude-sonnet-4 | $3.00 | $15.00 |
| Anthropic (Vertex AI) | vertex_ai/claude-sonnet-4 | $3.00 | $15.00 |
| AWS Bedrock | anthropic.claude-sonnet-4-20250514-v1:0 | $3.00 | $15.00 |
| Databricks | databricks/databricks-claude-sonnet-4 | $3.00 | $15.00 |
Similar Models
Models with similar capabilities and context window size.
Model | Provider | Mode | Input Price | Output Price | Context | Max Output | Vision | Functions |
|---|---|---|---|---|---|---|---|---|
| Gemini 1.5 Flash | Google Vertex AI | Text | $0.075 | $0.300 | 1.0M | 8K | yes | yes |
| Gemini 1.5 Flash Preview-0514 | Google Vertex AI | Text | $0.075 | $0.0047 | 1.0M | 8K | yes | yes |
| Gemini 1.5 Flash-001 | Google Vertex AI | Text | $0.075 | $0.300 | 1.0M | 8K | yes | yes |
| Gemini 1.5 Flash-8b-exp-0827 | Google Gemini | Text | N/A | N/A | 1.0M | 8K | yes | yes |
| Gemini 1.5 Flash-exp-0827 | Google Vertex AI | Text | $0.0047 | $0.0047 | 1.0M | 8K | yes | yes |
| Gemini flash Experimental | Google Vertex AI | Text | N/A | N/A | 1.0M | 8K | no | no |
| Gemini pro Experimental | Google Vertex AI | Text | N/A | N/A | 1.0M | 8K | no | no |
| Qwen Turbo | Dashscope | Text | $0.050 | $0.200 | 1.0M | 8K | no | yes |
| Qwen Turbo | Dashscope | Text | $0.050 | $0.200 | 1.0M | 16K | no | yes |
| Qwen Turbo | Dashscope | Text | $0.050 | $0.200 | 1.0M | 16K | no | yes |