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_KEYSet up in three steps
- 1
Create an API key
Sign up, create an API key in the console and copy it.
- 2
Set environment variables
Choose the instructions for your operating system.
- 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.
Claude Code questions
Set ANTHROPIC_MODEL=claude-sonnet-5-5 or switch with /model in Claude Code.
In the console usage log. A task usually makes several calls, each logged separately.
Remove these two environment variables and reopen the terminal.
