API · Models
Text
Claude Sonnet 5
Sonnet 5 is an upgrade to Sonnet 4.6, with gains across agentic coding and professional work. It builds on the strengths of previous Sonnet models, bringing top-tier intelligence at Sonnet pricing for coding, agents, and everyday professional work at scale.
ReasoningToolsexplicit cachingFilesVisionweb search
Context 1M·Max out 128K
Quickstart
import { streamText } from 'ai';
import { createOpenAICompatible } from '@ai-sdk/openai-compatible';
const blackbox = createOpenAICompatible({
name: 'blackbox',
apiKey: process.env.BLACKBOX_API_KEY!,
baseURL: 'https://api.blackbox.ai/v1',
});
const result = streamText({
model: blackbox('blackboxai/anthropic/claude-sonnet-5'),
prompt: 'Why is the sky blue?',
});
for await (const chunk of result.textStream) {
process.stdout.write(chunk);
}Specs & pricing
- Input $/M
- 2
- Output $/M
- 10
- Context window
- 1M
- Max output
- 128K
- Supported parameters
- reasoningtool-useexplicit-cachingfile-inputvisionweb-search
Related models
| Model | Type | Context | Input $/M |
|---|---|---|---|
| Claude Opus 4.8 | Text | 1M | 5 |
| Claude Opus 4.7 | Text | 1M | 5 |
| Claude Opus 4.6 | Text | 1M | 5 |
| Claude Sonnet 4.6 | Text | 1M | 3 |
| Claude Sonnet 4.5 | Text | 1M | 3 |