Working code and copy-paste configs for using the Claude API through apiToken.sale — an Anthropic-compatible endpoint that serves the identical Messages API at up to 80% below official token prices. Every example differs from stock Anthropic usage by exactly one thing: the base URL.
Base URL: https://api.apitoken.sale
Endpoint: POST /v1/messages
Headers: x-api-key: sk-pool-...
anthropic-version: 2023-06-01
Get a key at apitoken.sale (new Google/GitHub accounts include $10 of free usage at official API prices), export it, and run any example:
export ANTHROPIC_BASE_URL=https://api.apitoken.sale
export ANTHROPIC_API_KEY=sk-pool-...| Directory | Shows |
|---|---|
curl/ |
Raw Messages API calls — basic and streaming |
python/ |
Official anthropic Python SDK — chat, streaming, tool use |
typescript/ |
Official @anthropic-ai/sdk — chat, streaming |
claude-code/ |
Run Claude Code on prepaid balance instead of a subscription |
cursor/ |
Cursor with a custom Anthropic base URL |
cline-continue/ |
Cline and Continue (VS Code) configs |
aider/ |
aider with a custom Anthropic endpoint |
langchain/ |
LangChain ChatAnthropic with a custom API URL |
litellm/ |
LiteLLM SDK call + proxy config.yaml |
librechat/ |
LibreChat custom endpoint YAML |
One key works across the full supported line: claude-opus-4-8, claude-opus-4-7, claude-sonnet-5, claude-sonnet-4-6, claude-haiku-4-5. Per-model pricing: apitoken.sale/models.
- Guides — pricing, payment, comparisons, regional access: claude-api-docs
- Anthropic Messages API reference (fully applicable here): docs.anthropic.com
Maintained by apiToken.sale. MIT-licensed — copy freely.