Skip to content

Tokens documentation

One API key for coding models, behind OpenAI- and Anthropic-compatible endpoints. Connect your coding agent in a few minutes, call the API from your own code, and keep spending under control with per-key caps.

Endpoints and authentication

OpenAI-compatible base URL
https://tokens.bd/v1
Anthropic-compatible base URL
https://tokens.bd
Authentication
Authorization: Bearer tok_live_...

OpenAI-style tools add /v1; Anthropic-style tools such as Claude Code take the base without it. Authentication details

Start here

Connect your agents in one command

The Tokens CLI signs you in through the browser, picks a default model and configures OpenCode, Claude Code, Codex CLI and Crush, backing up each file first. CLI reference

terminal
curl -fsSL https://tokens.bd/cli/tokens.mjs -o tokens.mjs
node tokens.mjs setup --base-url https://tokens.bd

All documentation

Coding Agents

Connect Claude Code, Codex CLI, OpenCode, OpenClaw, Hermes and other agents.

API Reference

Endpoints, authentication, streaming, tool calling, errors and limits.

Generate a config file

Pick a tool or language to get a ready-to-paste configuration with your base URL.

opencode.json
{
  "provider": {
    "tokens": {
      "npm": "@ai-sdk/openai-compatible",
      "options": {
        "baseURL": "https://tokens.bd/v1",
        "apiKey": "tok_live_your_key"
      },
      "models": {
        "deepseek/deepseek-v4.1-flash": {}
      }
    }
  }
}

Project or global configuration for OpenCode CLI / IDE agent.

Test your key

Send a small real request with your key to confirm everything works before you configure a tool. It uses a few tokens from your balance.

Live connection test

Check latency and token generation before you start coding.

POST /v1/chat/completions
Create a key