# Claude Sonnet 5

Canonical page: https://agentsky.dev/models/anthropic/claude-sonnet-5
JSON record: https://gateway.agentsky.dev/v1/models/anthropic/claude-sonnet-5

Claude Sonnet 5 is a text and image-input model by Anthropic, available through the AgentSky API as anthropic/claude-sonnet-5 at $1.40 per million input tokens and $7.00 per million output tokens, with a 1M context window.

A mid-tier model balancing latency against reasoning quality for everyday application and assistant work.

## Facts

- **Model id:** `anthropic/claude-sonnet-5`
- **Maker:** Anthropic
- **Input modalities:** Text, Image
- **Context:** 1M
- **Max output tokens:** 128,000
- **Released:** Jun 30, 2026
- **Aliases:** `anthropic/claude-sonnet-5`, `claude-sonnet-5`

## Pricing

USD per million tokens on the default plan. Signed-in pages show your own plan's price; every response carries the cost of that call in `usage.cost`.

| Meter | Per 1M tokens |
|---|---|
| Input | $1.40 |
| Output | $7.00 |
| Cache read | $0.14 |
| Cache write | $1.75 |

## Use it

Anthropic wire base URL: `https://gateway.agentsky.dev`. OpenAI wire base URL: `https://gateway.agentsky.dev/v1`. Authenticate with an AgentSky API key (`ast_…`) and pass the model id.

### Anthropic SDK

```js
import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic({
  baseURL: "https://gateway.agentsky.dev",
  apiKey: process.env.AGENTSKY_API_KEY, // ast_…
});

const message = await client.messages.create({
  model: "anthropic/claude-sonnet-5",
  max_tokens: 256,
  messages: [{ role: "user", content: "Summarise this ticket." }],
});
console.log(message.usage.cost); // USD, in the response
```

### Claude Code

```bash
export ANTHROPIC_BASE_URL="https://gateway.agentsky.dev"
export ANTHROPIC_AUTH_TOKEN="$AGENTSKY_API_KEY"
export ANTHROPIC_MODEL="anthropic/claude-sonnet-5"

claude
```

## Run it with an agent

- [Hermes + Claude Sonnet 5](https://agentsky.dev/agents/hermes/with/claude-sonnet-5)
- [Claude Code + Claude Sonnet 5](https://agentsky.dev/agents/claude-code/with/claude-sonnet-5)
- [Codex + Claude Sonnet 5](https://agentsky.dev/agents/codex/with/claude-sonnet-5)
- [OpenClaw + Claude Sonnet 5](https://agentsky.dev/agents/openclaw/with/claude-sonnet-5)
- [pi + Claude Sonnet 5](https://agentsky.dev/agents/pi/with/claude-sonnet-5)
- [DeepSeek Harness + Claude Sonnet 5](https://agentsky.dev/agents/dsh/with/claude-sonnet-5)
- [Kimi Code + Claude Sonnet 5](https://agentsky.dev/agents/kimi-code/with/claude-sonnet-5)
- [OpenCode + Claude Sonnet 5](https://agentsky.dev/agents/opencode/with/claude-sonnet-5)
- [DeepAgents + Claude Sonnet 5](https://agentsky.dev/agents/deepagents/with/claude-sonnet-5)
- [goose + Claude Sonnet 5](https://agentsky.dev/agents/goose/with/claude-sonnet-5)
- [Kilo + Claude Sonnet 5](https://agentsky.dev/agents/kilo/with/claude-sonnet-5)
- [MiniMax Code + Claude Sonnet 5](https://agentsky.dev/agents/minimax-code/with/claude-sonnet-5)
- [OpenHands + Claude Sonnet 5](https://agentsky.dev/agents/openhands/with/claude-sonnet-5)

## Questions

### What is Claude Sonnet 5?

Claude Sonnet 5 is a model from Anthropic. A mid-tier model balancing latency against reasoning quality for everyday application and assistant work.

### How much does Claude Sonnet 5 cost?

$1.40 / $7 per million tokens at the prices shown, for input and output respectively. The exact price of every call comes back in the response as usage.cost, so you never have to compute it.

### What is the context length of Claude Sonnet 5?

1M tokens, and it writes up to 128K tokens in one reply. These are the limits listed for this model in the current AgentSky catalog.

### Which clients can call Claude Sonnet 5?

Anything that speaks the Anthropic Messages API, which covers the Anthropic SDK and Claude Code. Point the client's base URL at the gateway, use an AgentSky key, and pass anthropic/claude-sonnet-5 as the model.

### How do I name Claude Sonnet 5 in a request?

The gateway accepts anthropic/claude-sonnet-5, claude-sonnet-5. Any of them resolves to the same model, so an existing integration usually needs no change to its model string.

### Can Claude Sonnet 5 read images?

Yes. Its listed input types are text, image. Include the image with your request; image input does not imply image generation.

### What output can Claude Sonnet 5 produce?

The listed output types are text. This model returns text. Producing image, video or audio files requires a suitable tool or another model; it is not included in text generation.

### How should I plan a long prompt for Claude Sonnet 5?

Plan your instructions, conversation history and source material around the 1M-token context limit, leaving room for the response. The listed response ceiling is 128K tokens. A larger window lets you supply more relevant material; it does not make unrelated content useful.

### What would 10,000 input tokens and 2,000 output tokens cost with Claude Sonnet 5?

At the displayed input and output rates, the model-token subtotal is $0.028. This example assumes uncached input and excludes additional pricing categories, tool calls and agent runtime. Actual usage determines the final charge.

### How is cached input priced for Claude Sonnet 5?

The catalog lists $0.14 per million cache-read tokens. Cache writes are listed at $1.75 per million tokens. Repeating a prompt does not by itself guarantee a cache hit; only usage reported as cached receives that rate.

### Does the Claude Sonnet 5 token price cover an entire agent task?

No. The model price covers the model usage described above. A task can also incur tool and runtime charges, and several model calls may be needed to complete it. Compare total task usage when evaluating cost.

### How do I use Claude Sonnet 5 on AgentSky?

The composer above preselects Claude Sonnet 5 for a compatible agent. Enter a concrete task, select any tools or connectors it needs, and send. Sign in if prompted; paid execution requires available credits.
