Integrations
Connect TokenHub to Claude Code, Codex, Cursor, Cline, Kilo Code, and other common agent tools.
TokenHub exposes OpenAI-compatible, Anthropic Claude Messages-compatible, and Gemini-compatible APIs. Any agent that lets you customize a Base URL and API key can usually connect to TokenHub.
Tools
Choose from developer agents, IDE extensions, and desktop clients. Each card opens a focused setup guide.
Terminal agents
Developer agents
For repository reading, code edits, shell tasks, and automated development flows.
In-editor tools
IDE extensions
For chat, autocomplete, refactoring, and review directly inside the editor.
Desktop clients
Desktop clients
For daily chat, model testing, prompt iteration, and switching between models.
Configuration files first
Third-party agents often start background processes. A temporary export in one terminal can disappear in a new terminal, IDE window, or plugin host. Prefer the tool user config file or settings page, then keep temporary environment variables for debugging.
| Tool | Recommended location | What to store |
|---|---|---|
| Claude Code | ~/.claude/settings.json; VS Code user settings.json for the extension | Model plus gateway env; add claudeCode.environmentVariables when using the VS Code extension. |
| Codex | ~/.codex/config.toml | TokenHub provider, model_providers.tokenhub, env_key, Base URL, and wire API. |
| Aider | ~/.aider.conf.yml or project .aider.conf.yml | Default model and openai-api-base; keep the key in OPENAI_API_KEY or local secret storage. |
| OpenCode | ~/.config/opencode/opencode.json or project opencode.json | Custom provider package @ai-sdk/openai-compatible, options.baseURL, models, and /models for model selection. |
| Hermes Agent | ~/.hermes/.env and ~/.hermes/config.yaml | TOKENHUB_API_KEY, a named custom tokenhub-custom provider, chat_completions API mode, and the default model. |
| OpenClaw | ~/.openclaw/.env and ~/.openclaw/openclaw.json | A custom tokenhub provider with the Base URL, API adapter, model catalog, and primary model. |
| Qwen Code | ~/.qwen/settings.json or project .qwen/settings.json | modelProviders.openai, security.auth.selectedType = "openai", envKey, Base URL, and model.name. |
| IDE extensions | VS Code / JetBrains user settings or plugin settings | Provider, Base URL, API key, model slots, and permission settings. |
| Desktop clients | Provider or model settings page | OpenAI Compatible or Custom provider and manual model IDs. |
Choose the compatible protocol
Start with the protocol supported by the tool, then choose the matching Base URL. Most IDE and desktop clients use OpenAI-compatible mode; Claude Code should use Anthropic Claude Messages-compatible mode; Gemini-native tools use Gemini-compatible mode.
Common values
| Tool asks for | TokenHub value |
|---|---|
| OpenAI-compatible Base URL | https://us-api.tokenhub.com/v1 |
| OpenAI Chat Completions test URL | https://us-api.tokenhub.com/v1/chat/completions |
| OpenAI Responses test URL | https://us-api.tokenhub.com/v1/responses |
| Anthropic Base URL | https://us-api.tokenhub.com |
| Anthropic Messages test URL | https://us-api.tokenhub.com/v1/messages |
| Gemini Base URL | https://us-api.tokenhub.com |
| Gemini model list URL | https://us-api.tokenhub.com/v1beta/models |
| API Key | A TokenHub workspace key, usually stored locally as TOKENHUB_API_KEY |
| Model ID | A model name from the TokenHub model list |
If a tool separates Host and Path, use https://us-api.tokenhub.com as the Host and /v1 as the OpenAI-compatible path. If it asks for one full Base URL, use https://us-api.tokenhub.com/v1. Configure the persistent file or settings page first, then use temporary environment variables only for debugging.
Last updated on