Integration tutorial

Connect Claude Code

Route Claude Code through the Anthropic-compatible Messages endpoint.

01
Buy or create a key

Use guest checkout or create an account key.

02
Set the base URL

https://discountedtokens.com/v1

03
Send a small test

Verify the route before moving production traffic.

Shell environment

export ANTHROPIC_BASE_URL="https://discountedtokens.com" export ANTHROPIC_AUTH_TOKEN="YOUR_DISCOUNTEDTOKENS_KEY" export ANTHROPIC_MODEL="gpt-5.6" claude

Run and verify

curl -X POST "$ANTHROPIC_BASE_URL/v1/messages" \ -H "Authorization: Bearer $ANTHROPIC_AUTH_TOKEN" \ -H "anthropic-version: 2023-06-01" \ -H "content-type: application/json" \ -d '{"model":"gpt-5.6","max_tokens":8,"messages":[{"role":"user","content":"Reply OK"}]}'

Troubleshooting

Get an API key → All tutorials