Configuring AI coding tools for a whole team takes two steps: an admin gives each developer a key with a quota and the right groups, and each developer picks the right protocol and Base URL in each tool. Claude models always use Anthropic Messages with the Base URL https://api.hop-base.com (no /v1). GPT, Gemini, and GLM use the OpenAI-compatible API at https://api.hop-base.com/v1. Claude Code reads ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN; Codex CLI reads config.toml plus OPENAI_API_KEY; Cursor, Cline, Roo Code, Continue, and Trae only need the right provider type in their settings.
Start here: which protocol each tool uses
| Tool | Models | Protocol / provider type | Base URL | Where to configure |
|---|---|---|---|---|
| Claude Code | Claude | Anthropic Messages | https://api.hop-base.com | ANTHROPIC_BASE_URL / ANTHROPIC_AUTH_TOKEN, or ~/.claude/settings.json |
| Codex CLI | GPT | OpenAI Responses (wire_api = "responses") | https://api.hop-base.com/v1 | ~/.codex/config.toml + OPENAI_API_KEY |
| Cursor | GPT / Gemini / GLM | Override OpenAI Base URL | https://api.hop-base.com/v1 | Cursor Settings → Models |
| Cursor | Claude | Anthropic API Key field | https://api.hop-base.com | Cursor Settings → Models (recent release) |
| Cline / Roo Code | GPT / Claude | OpenAI Compatible / Anthropic | /v1 for GPT, none for Claude | Extension settings → API Provider |
| Continue | GPT / Claude | provider: openai / provider: anthropic | Same as above | ~/.continue/config.yaml |
| Trae | GPT / Claude | OpenAI Compatible / Anthropic | Same as above | Settings → Models → Add model |
Other editors such as Zed and JetBrains AI follow the same rule: Anthropic type for Claude, OpenAI-compatible type for everything else. The two most common mistakes are adding /v1 to the Claude Base URL (the request becomes /v1/v1/messages) and selecting OpenAI Compatible with a Claude group key. Both return a 404 saying the platform does not support that API path.
Step 1: the admin issues a key to each developer
- Create departments. In the enterprise console, create one department per team (for example Backend and Frontend) and set a monthly department quota. Department heads receive quota alerts for their department.
- Add members and set member quotas. Members sign in with email and password and create their own keys. A member's quota is shared by all of that member's keys.
- Use one key per tool. We recommend a Claude group key for Claude Code and a Codex Plus or Codex Pro group key for Codex CLI. Each key holds 1–10 groups and can call only those groups' models. Note that the Claude Max (ccmax) group works only with the Claude Code client; for Cursor, Cline, and other editors, use a key from the Claude Max Enterprise group.
- Add limits to each key. Set a key quota, expiry date, IP list, and concurrency limit as needed. Claude Code's
count_tokensrequests also count toward concurrency, so leave headroom. - Set balance alerts. Add several thresholds on available balance; when the balance drops below one, admins get an email and an in-app notification.
When a quota runs out, requests are rejected before processing (HTTP 402 insufficient_quota) and are not billed. Department and member monthly quotas reset together on the billing day you choose (1st–28th).
Step 2: each developer configures their tools
Claude Code
The easiest route is One-Click Setup in the console: open API Keys, click One-Click Setup next to the key, choose Claude Code and your OS, then paste the generated command into a terminal. The command uses a single-use setup token valid for 15 minutes, so the key never appears in the command. The script merges the settings into the env block of ~/.claude/settings.json (backing up the original first). After that, environment variables of the same name set in your shell are ignored; to change the key, edit that file or run One-Click Setup again.
Manual setup (macOS / Linux):
export ANTHROPIC_BASE_URL=https://api.hop-base.com
export ANTHROPIC_AUTH_TOKEN=sk-your-key
claude
Switch models with /model during a session, or start with --model claude-sonnet-5-5. Full steps are in the Claude Code guide, and a hands-on walkthrough from signup to first completion is in this Claude Code setup guide.
Codex CLI
Codex CLI also supports One-Click Setup. To configure it by hand, add the following to ~/.codex/config.toml (on Windows, C:\Users\your-name\.codex\config.toml):
model_provider = "hopbase"
model = "gpt-5.6-sol"
[model_providers.hopbase]
name = "HopBase"
base_url = "https://api.hop-base.com/v1"
wire_api = "responses"
env_key = "OPENAI_API_KEY"
Then run export OPENAI_API_KEY=sk-your-key and start codex. Three things to know:
- Manual setup reads the key through
env_key; One-Click Setup usesrequires_openai_auth = truewith~/.codex/auth.json. Do not mix the two in one config, or the gateway returns 401missing_api_key. - One-Click Setup sets
model_reasoning_effort = "xhigh", which uses the most tokens. For everyday team work,highormediumis usually enough. - Web search (
/v1/alpha/search) and remote context compaction (/v1/responses/compact) are not supported yet and return 404. Normal conversations are unaffected.
See the Codex CLI guide for details.
Cursor
- GPT / Gemini / GLM: in Cursor Settings → Models → API Keys, enter the matching group key, enable Override OpenAI Base URL, set
https://api.hop-base.com/v1, and add the model ID. - Claude: use the Anthropic API Key field and set the Anthropic Base URL to
https://api.hop-base.com(no /v1; requires a recent Cursor release).
Built-in features such as Tab completion still use Cursor's own service. These settings apply to the custom model selected in Chat.
Cline / Roo Code
In the extension settings, open API Provider. For GPT models choose OpenAI Compatible with https://api.hop-base.com/v1; for Claude models choose Anthropic with https://api.hop-base.com. Enter the API key and model ID, then save.
Continue
# ~/.continue/config.yaml
models:
- name: HopBase GPT
provider: openai
model: gpt-5.6-sol
apiBase: https://api.hop-base.com/v1
apiKey: sk-your-key
- name: HopBase Claude
provider: anthropic
model: claude-sonnet-5-5
apiBase: https://api.hop-base.com
apiKey: sk-your-key
Put the matching group key in each apiKey. In Trae, go to Settings → Models → Add model and choose OpenAI Compatible for GPT or Anthropic for Claude. The editors and IDEs guide covers each editor in full.
Step 3: verify and troubleshoot
- Confirm model IDs: call
GET /v1/modelswith the key and use only the IDs it returns.curl https://api.hop-base.com/v1/models -H "Authorization: Bearer sk-your-key" - Run a minimal test: select the new model in the tool and send "Reply with ok only." Turn on tool calls, images, and long context only after this works.
- Read the error: for 404, check for an extra or missing
/v1and whether a Claude key was set up as OpenAI type. For 401, check the key and whether Codex mixes the two key styles. 402 means the quota is used up; ask an admin to raise it.
Managing it after rollout
- Track spend: the Usage page filters by date, key, member, department, and key creator, and exports CSV. With one key per tool, you can see directly how much Claude Code and Codex CLI each cost.
- Review changes: quota changes and key creation or disabling are all logged and searchable by time and object.
- Offboarding: disabling a member makes all of that member's keys unusable immediately. A single key can also be disabled or revoked at any time without affecting anyone else.
Ready to set up your team? Sign up for HopBase, create an enterprise account, then add members and departments.
FAQ
How do I set a custom base URL in Codex CLI?
Add a model_providers.hopbase section to ~/.codex/config.toml with base_url = "https://api.hop-base.com/v1", wire_api = "responses", and env_key = "OPENAI_API_KEY", then set model_provider = "hopbase". Use a key from the Codex Plus or Codex Pro group.
Can Cursor use Claude through a custom API?
Yes. Instead of Override OpenAI Base URL, put a Claude group key in the Anthropic API Key field and set the Anthropic Base URL to https://api.hop-base.com (no /v1). This needs a recent Cursor release; Tab completion still uses Cursor's own service.
How do we stop one developer from burning the team's Claude Code budget?
Stack the three quota levels: the department quota caps the team, the member quota caps each person, and the key quota caps each tool. When any level runs out, requests are rejected before processing (HTTP 402) and are not billed. If member quotas add up to more than the department quota, it is first come, first served.