Tokens can serve any tool that lets you set a custom OpenAI-compatible or Anthropic-compatible endpoint. This page lists which coding agents and editors can and can't, and gives a generic recipe for tools without their own guide.
Compatibility table#
Based on each tool's official documentation, checked October 2026. "Partial" means some features use Tokens and others don't.
| Tool | Custom endpoint? | Protocol to use with Tokens | Guide |
|---|---|---|---|
| Claude Code | Yes | Anthropic Messages, base https://tokens.bd | Claude Code |
| Codex CLI | Yes, with a caveat | Responses API only; works if the model's upstream supports /v1/responses | Codex CLI |
| OpenCode | Yes | Chat Completions | OpenCode |
| OpenClaw | Yes | Chat Completions or Anthropic Messages | OpenClaw |
| Hermes Agent | Yes | Chat Completions | Hermes Agent |
| Crush | Yes | Chat Completions (openai-compat) | Crush |
| Aider | Yes | Chat Completions, openai/ model prefix | Aider |
| Goose | Yes | Chat Completions, full endpoint URL | Goose |
| Qwen Code | Yes | Chat Completions | Qwen Code |
| Kimi Code CLI | Yes | Chat Completions or Anthropic Messages | Kimi Code |
| Factory Droid | Yes | Chat Completions or Anthropic Messages | Factory Droid |
| Cline | Yes | Chat Completions | Cline |
| Kilo Code | Yes | Chat Completions | Kilo Code |
| Roo Code | Yes, but archived | Chat Completions; repo archived 2026-05-15 | Roo Code |
| Continue | Yes | Chat Completions | Continue |
| Zed | Yes | Chat Completions or Anthropic Messages | Zed |
| GitHub Copilot (VS Code) | Partial | Chat only; inline suggestions and embeddings stay on GitHub | GitHub Copilot |
| Cursor | Partial, undocumented | Base URL override not in Cursor's official docs; Tab never uses it | Cursor |
| Warp | Partial | Chat Completions; not used by Auto models or Cloud Agents | Warp |
| Amp | Partial | Only models in Amp's own catalog can be routed | Amp |
| Gemini CLI | No | Only accepts Gemini or Vertex wire format | Use Qwen Code |
| Kimi CLI (Python) | No | Archived; existing installs will stop working | Use Kimi Code CLI |
Why Gemini CLI can't use Tokens#
Gemini CLI's only base URL overrides, GOOGLE_GEMINI_BASE_URL and GOOGLE_VERTEX_BASE_URL, expect the Gemini or Vertex request format. Tokens doesn't serve that format, so no setting makes it work. Qwen Code, originally a Gemini CLI fork, supports OpenAI-compatible endpoints.
Connect any OpenAI-compatible tool#
If your tool isn't listed, look for a setting called "OpenAI compatible", "custom provider", "API base" or "base URL". Then you need four things.
1. Base URL#
| Your tool speaks | Base URL | The tool then calls |
|---|---|---|
| OpenAI Chat Completions | https://tokens.bd/v1 | /v1/chat/completions |
| Anthropic Messages | https://tokens.bd | /v1/messages |
Some tools, such as Goose's custom provider file, want the full endpoint https://tokens.bd/v1/chat/completions. If the tool's own example ends in /chat/completions, copy that shape. A 404 on the first request almost always means /v1 is missing or doubled.
2. API key#
Tokens reads the key from Authorization: Bearer <key> or x-api-key: <key>, so OpenAI-style and Anthropic-style tools both work without extra headers. Where the tool reads environment variables, use export TOKENS_API_KEY=tok_live_your_key and keep the key out of config files you might commit. One key per tool makes usage easy to read and revocation painless; see API keys.
3. Model ID#
Use the exact Tokens ID, including the provider prefix: deepseek/deepseek-v4.1-flash, not deepseek-v4.1-flash. Get IDs from the model catalog or from the API, which returns only models your key can use:
curl -s https://tokens.bd/v1/models -H "Authorization: Bearer $TOKENS_API_KEY"Tools that reference models as <provider>/<model> end up with two slashes, such as tokens/deepseek/deepseek-v4.1-flash. Not every tool documents how it splits that, so check there first if the model isn't found. LiteLLM-based tools such as Aider want an openai/ prefix, which they strip before sending.
4. Context window and output limit#
Many tools can't read a model's limits from the endpoint, so they ask you or assume a default. Use the values from the catalog. A wrong context window breaks automatic compaction: too high and long conversations get rejected upstream, too low and history is trimmed early.
Also check:
- Tool calling. Agents that edit files need a model with function calling.
- Streaming. For a usage chunk at the end of an OpenAI-style stream, the client must send
stream_options: {"include_usage": true}. - Unsupported endpoints. Images, audio, files, batches, assistants, fine-tuning and moderations return 404
unsupported_endpoint. Embeddings work only for embedding models, so keep a tool's embedding features on their current provider. - Browser-only tools. Tokens sends no CORS headers, so calls straight from a web page fail. Use a server, CLI or editor extension.
Test the connection#
Before you debug a tool's settings, confirm the key and model work. The tester below sends a short request with your key and the model you pick. Or run the curl that follows from your machine.
Live connection test
Check latency and token generation before you start coding.
curl -s https://tokens.bd/v1/chat/completions \
-H "Authorization: Bearer $TOKENS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "deepseek/deepseek-v4.1-flash", "max_tokens": 16, "messages": [{"role": "user", "content": "Reply with OK"}]}'If that succeeds and the tool still fails, the problem is in the tool's settings. Connect Your Agent also runs a live test and has snippets for common agents.
Troubleshooting#
| Status and code | Usual cause in a new tool |
|---|---|
| 404 on the first request | Base URL missing /v1, or path doubled |
401 missing_api_key | Env var not set where the tool runs |
404 model_not_found | Model ID missing the provider prefix |
429 rate_limited | Agent burst past the per-minute limit; wait for Retry-After |
Every code is in Troubleshooting; formats are in Chat Completions and Messages. The Tokens CLI can configure OpenCode, Claude Code, Codex CLI and Crush for you.
Sources: Gemini CLI configuration reference, MoonshotAI/kimi-cli archive notice, plus the official docs linked from each tool's guide, checked October 2026.