Skip to content
1折AI

Claude Code API setup and costs

Set the API address and key to use our models in Claude Code. Claude input and output start at 19% of list price; cache reads and writes use list prices.

~/.zshrc
export ANTHROPIC_BASE_URL=https://1zheai.com
export ANTHROPIC_AUTH_TOKEN=YOUR_API_KEY
Create an API key

Set up in three steps

  1. 1

    Create an API key

    Sign up, create an API key in the console and copy it.

  2. 2

    Set environment variables

    Choose the instructions for your operating system.

  3. 3

    Make your first call

    Run claude and send a message, then find the call in your usage log.

Cost of one call

A Claude Code task usually includes several calls, each carrying the earlier context. This is a cost example for one call.

One Claude Code call
200 · 1840 ms
modelclaude-sonnet-5-5
Input
34,120
Cache read
94,310
Cache write
2,048
Output
4,215
List price$0.1249
Your priceSave 72%$0.0355
Illustration, not a real call. Input/output: list price × 0.19; cache at list price.

Claude Code questions

Set ANTHROPIC_MODEL=claude-sonnet-5-5 or switch with /model in Claude Code.