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

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-sol" 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-sol","max_tokens":64,"messages":[{"role":"user","content":"Reply OK"}]}'

Troubleshooting

Get an API key → All tutorials

Successful API requests are billed at the displayed token rates, metered to a fraction of a cent. Charges accumulate and are deducted from your prepaid balance in whole US cents, so a small request is not rounded up to a minimum charge.