BetterToken Docs
BetterToken Docs: connect Claude and GPT to coding tools or your own code with an API Key, the correct Base URL, SDK examples, and request troubleshooting.
BetterToken is an AI model API gateway for developers and teams worldwide, connecting coding tools and your own code to available models through Anthropic and OpenAI-compatible APIs. Use one BetterToken API Key, the Base URL for your client’s protocol, and a Model ID from the model plaza.
Start here
Quickstart
Create an account, add credit, and get your BetterToken API Key.
Supported tools
Find your CLI, editor, desktop app, or automation platform and its setup guide.
API reference
Choose an endpoint and inspect its request and response format.
Choose your path
After creating an API Key, follow the row that matches your task. Copy the exact Model ID before sending a request.
| Your task | Protocol | Base URL | Starting page |
|---|---|---|---|
| Work in a terminal with Claude Code | Anthropic Messages | https://bettertoken.ai | Claude Code setup |
| Use Codex CLI or Codex App for local tasks | OpenAI-compatible, Responses | https://bettertoken.ai/v1 | Codex CLI / App setup |
| Connect Cursor or another external tool | OpenAI-compatible in the linked setup | https://bettertoken.ai/v1 | Cursor setup or all tools |
| Call a model from your own code | OpenAI-compatible or Anthropic Messages | OpenAI: https://bettertoken.ai/v1; Anthropic: https://bettertoken.ai | Python, JavaScript, and curl examples |
| Generate or edit images with OpenAI Images | OpenAI-compatible, Images | https://bettertoken.ai/v1 | GPT Image guide or Nano Banana guide |
For external tools, use the URL field documented in the tool overview. Some fields require a complete request URL.
Popular guides
| Guide | What you can do |
|---|---|
| Claude Code | Install the client, set authentication and model mappings, and verify a session |
| Codex CLI / App | Configure config.toml and auth.json for local API Key access |
| GPT Image | Generate images, upload references for edits, and save the output |
| Nano Banana | Choose an image workflow and inspect returned dimensions |
| Model updates | Browse model announcements, find Model IDs, and check current availability in the model plaza |
| FAQ | Resolve account, protocol, model, and tool setup questions |
How BetterToken works
Your client sends model requests to BetterToken. BetterToken connects multiple suppliers and uses dynamic routing across upstream services; you manage API Keys, balance, and request records in one Dashboard.
| API family | Base URL | Authentication | Text endpoints |
|---|---|---|---|
| OpenAI-compatible | https://bettertoken.ai/v1 | Authorization: Bearer YOUR_API_KEY | Chat Completions, Responses |
| Anthropic Messages | https://bettertoken.ai | x-api-key: YOUR_API_KEY for direct API calls | Messages; the client adds /v1/messages |
One BetterToken API Key works with all available models. Choose the protocol your client uses: Claude Code can call GPT and other available models through Anthropic Messages. Claude Desktop supports only Claude models because of a client limitation; follow its Gateway guide.
Streaming and tool calling support varies by model. Test a small request with your Model ID before building on either feature; use the streaming and tool calling guide. For images, follow the linked image guides; BetterToken does not support search-assisted image generation.
Monitor usage and control costs
Open the BetterToken Dashboard to review each request’s model, status, Token usage, and charge. You can create multiple API Keys for different projects and set expiration dates or spending limits under Advanced settings, as shown in the quickstart.
Requests are rejected when your balance is depleted. Use the cache billing FAQ for cache rules and the usage-limit FAQ when diagnosing a limit message.
Payments
Users outside Russia can pay with Stripe or USDT. Check the Workspace for the payment options currently available to your account.
Common questions
Which Base URL should I enter?
Use https://bettertoken.ai for Anthropic SDKs and Claude Code, and https://bettertoken.ai/v1 for OpenAI SDKs and Codex CLI. The Base URL FAQ covers client fields and path suffixes.
How do I confirm the setup works?
Send one short request, read its response, and find the matching record in the Dashboard. If it fails, use errors and limits before retrying.

