Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Claude API Examples — Anthropic-compatible endpoint configs

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-...

What's here

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

Models

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.

More

Maintained by apiToken.sale. MIT-licensed — copy freely.

About

Ready-to-run Claude API examples: Python/TypeScript SDK, curl, streaming, tool use, plus configs for Claude Code, Cursor, Cline, Continue, aider, LangChain, LiteLLM, LibreChat — all on an Anthropic-compatible endpoint.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages