Skip to content
Sign Up Free
Getting started

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

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 taskProtocolBase URLStarting page
Work in a terminal with Claude CodeAnthropic Messageshttps://bettertoken.aiClaude Code setup
Use Codex CLI or Codex App for local tasksOpenAI-compatible, Responseshttps://bettertoken.ai/v1Codex CLI / App setup
Connect Cursor or another external toolOpenAI-compatible in the linked setuphttps://bettertoken.ai/v1Cursor setup or all tools
Call a model from your own codeOpenAI-compatible or Anthropic MessagesOpenAI: https://bettertoken.ai/v1; Anthropic: https://bettertoken.aiPython, JavaScript, and curl examples
Generate or edit images with OpenAI ImagesOpenAI-compatible, Imageshttps://bettertoken.ai/v1GPT 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.

GuideWhat you can do
Claude CodeInstall the client, set authentication and model mappings, and verify a session
Codex CLI / AppConfigure config.toml and auth.json for local API Key access
GPT ImageGenerate images, upload references for edits, and save the output
Nano BananaChoose an image workflow and inspect returned dimensions
Model updatesBrowse model announcements, find Model IDs, and check current availability in the model plaza
FAQResolve 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 familyBase URLAuthenticationText endpoints
OpenAI-compatiblehttps://bettertoken.ai/v1Authorization: Bearer YOUR_API_KEYChat Completions, Responses
Anthropic Messageshttps://bettertoken.aix-api-key: YOUR_API_KEY for direct API callsMessages; 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.