Claude API pricing

If you call the Anthropic API directly you pay list price per token. Through Code By AI the same Claude models are billed from 1/6 of that, with no monthly minimum.

Anthropic list price vs Code By AI

ModelList priceYou pay
claude-haiku-4-5-20251001$1.00 / $0.10 / $5.00$0.13 / $0.01 / $0.67
claude-sonnet-5Default$2.00 / $0.20 / $10.00$0.27 / $0.03 / $1.33
claude-sonnet-5-5$2.00 / $0.10 / $10.00$0.27 / $0.01 / $1.33
claude-sonnet-4-6$3.00 / $0.30 / $15.00$0.40 / $0.04 / $2.00
claude-opus-5-5$4.00 / $0.20 / $20.00$0.53 / $0.03 / $2.67
claude-opus-4-6$5.00 / $0.50 / $25.00$0.67 / $0.07 / $3.33
claude-opus-4-7$5.00 / $0.50 / $25.00$0.67 / $0.07 / $3.33
claude-opus-4-8$5.00 / $0.50 / $25.00$0.67 / $0.07 / $3.33
claude-opus-5$5.00 / $0.50 / $25.00$0.67 / $0.07 / $3.33
claude-fable-5$10.00 / $1.00 / $50.00$2.00 / $0.20 / $10.00
claude-fable-5-1$10.00 / $0.25 / $50.00$2.00 / $0.05 / $10.00

per 1M tokens — input / cached input / output, USD

Same request shape

The endpoint speaks the Anthropic messages format — change the base URL and the auth token, keep the rest of your code.

curl https://www.codebyai.net/api/agent/v1/messages \
  -H "x-api-key: $CODEBYAI_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -d '{"model":"claude-sonnet-5",
       "max_tokens":1024,
       "messages":[{"role":"user","content":"hi"}]}'

FAQ

How much cheaper is the Claude API through Code By AI?
On claude-sonnet-5, 20M input and 2M output tokens cost $60.00 at list price and $8.00 through Code By AI — about 87% less.
Do I need to change my SDK code?
No. Point the Anthropic SDK base URL at https://www.codebyai.net/api/agent and use a Code By AI key; request and response shapes stay the same.