claude-sonnet-4-6 pricing and API access

Run claude-sonnet-4-6 through Code By AI for $0.40 per 1M input tokens and $2.00 per 1M output tokens. Anthropic lists the same model at $3.00 and $15.00; you pay about 87% less than that, with no monthly subscription.

Official price

$3.00

per 1M tokens, USD

Your price

$0.40

per 1M tokens, USD

Δ

−87%

1/7.5 of official price

claude-sonnet-4-6Official priceYour price
Input$3.00$0.40
Cached input$0.30$0.04
Output$15.00$2.00

How to use claude-sonnet-4-6

Export ANTHROPIC_BASE_URL=https://www.codebyai.net/api/agent and ANTHROPIC_AUTH_TOKEN=sk-proj-xxxx, then launch the CLI, and use the model ID claude-sonnet-4-6. The Claude Code guide walks through the full configuration.

export ANTHROPIC_BASE_URL="https://www.codebyai.net/api/agent"
export ANTHROPIC_AUTH_TOKEN="sk-proj-xxxx"
Read the Claude Code setup guide

Compare other Claude Code models

claude-sonnet-4-6 FAQ

How much does claude-sonnet-4-6 cost on Code By AI?
claude-sonnet-4-6 costs $0.40 per 1M input tokens, $0.04 per 1M cached input tokens and $2.00 per 1M output tokens. Anthropic lists the same model at $3.00 input and $15.00 output.
Is claude-sonnet-4-6 the default Claude Code model?
No. Requests to Claude Code without a model parameter use the default model instead; set the model parameter to claude-sonnet-4-6 to select this one.
How do I use claude-sonnet-4-6?
Export ANTHROPIC_BASE_URL=https://www.codebyai.net/api/agent and ANTHROPIC_AUTH_TOKEN in your shell, pass the model ID claude-sonnet-4-6, then launch the CLI. The Claude Code guide covers the full configuration.