Claude Sonnet 5

anthropic/claude-sonnet-5

Sonnet 5 is Anthropic's most capable Sonnet-class model, with frontier performance across coding, agents, and professional work. It supports adaptive thinking with selectable reasoning effort levels (low, medium, high, max,...

Context
1M tokens
Input, 1M tokens
$1.02
Output, 1M tokens
$5.13
Benchmark
—

Uptime and speed

Loading…

Pricing

Charged from your prepaid balance for the tokens actually used.

Input tokens$1.02 per 1M tokens
Output tokens$5.13 per 1M tokens
Cache read$0.1 per 1M tokens
Cache write$1.27 per 1M tokens

Price vs the official API

Per 1M tokens, the same model through one MegaBrain key. Paid from credits, no subscription.

MegaBrainOfficial Anthropic APIYou save
Input tokens$1.02$2−49%
Output tokens$5.13$10−48.7%

Apps and activity

Loading…

Technical details

Model IDanthropic/claude-sonnet-5
Context window1M tokens
AcceptsText, Images, Files, pdf
ProducesText
TokenizerClaude
Max output tokens128,000

How to connect

The API is OpenAI-compatible: the official SDKs, LangChain and any client with a "base URL" field work.

import OpenAI from 'openai'

const client = new OpenAI({
  baseURL: 'https://getmegabrain.com/api/gateway/v1',
  apiKey: process.env.MEGABRAIN_API_KEY,
})

const response = await client.chat.completions.create({
  model: 'anthropic/claude-sonnet-5',
  messages: [{ role: 'user', content: 'Hello!' }],
})

Questions

How much does the Claude Sonnet 5 API cost?

$1.02 per 1M input tokens and $5.13 per 1M output tokens, charged from a prepaid US-dollar balance for the tokens actually used. There is no subscription.

Is the Claude Sonnet 5 API cheaper than the official Anthropic API?

Yes: $1.02 per 1M input tokens instead of $2 (−49%) and $5.13 per 1M output tokens instead of $10 (−48.7%). It is the same model, called with one MegaBrain key and paid from prepaid credits, with no subscription.

What is the context window of Claude Sonnet 5?

1,000,000 tokens (1M), with up to 128,000 tokens in one reply.

How do I call Claude Sonnet 5 through the API?

Send an OpenAI-compatible request to https://getmegabrain.com/api/gateway/v1/chat/completions with "model": "anthropic/claude-sonnet-5" and your MegaBrain API key as a Bearer token. The official OpenAI SDKs, LangChain and any client with a base URL setting work; the same key also reaches image and video models.

What input does Claude Sonnet 5 accept?

It accepts Text, Images, Files, and pdf and produces Text.

Can I try Claude Sonnet 5 before paying?

Sign-up is free and open to everyone. Adding a card (nothing is charged) gives $1.00 of credit to try any model; after that every model is charged from a balance you top up by card.

Start using Claude Sonnet 5

Create an account, top up from $10, get a key in your dashboard and send your first request.