DEV Community

HopBase
HopBase

Posted on Originally published at hop-base.com

Configure Claude Code, Codex CLI and Cursor for Your Team (2026)

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: prefer native Anthropic Messages for Claude (though OpenAI Chat Completions with /v1 also works) and OpenAI-compatible type for everything else. The two most common 404 mistakes are adding /v1 to an Anthropic-type Base URL (turning the path into /v1/v1/messages) and sending a Claude model to /v1/responses.

Step 1: the admin issues a key to each developer

  1. 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.
  2. 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.
  3. 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 one or more 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.
  4. Add limits to each key. Set a key quota, expiry date, IP list, and concurrency limit as needed. Claude Code's count_tokens requests also count toward concurrency, so leave headroom.
  5. 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
Enter fullscreen mode Exit fullscreen mode

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"
Enter fullscreen mode Exit fullscreen mode

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 uses requires_openai_auth = true with ~/.codex/auth.json. Do not mix the two in one config, or the gateway returns 401 missing_api_key.
  • One-Click Setup sets model_reasoning_effort = "xhigh", which uses the most tokens. For everyday team work, high or medium is 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
Enter fullscreen mode Exit fullscreen mode

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

  1. Confirm model IDs: call GET /v1/models with the key and use only the IDs it returns.

    curl https://api.hop-base.com/v1/models -H "Authorization: Bearer sk-your-key"
    
  2. 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.

  3. Read the error: for 404, check for an extra or missing /v1 on the Base URL and confirm the model is in your key's groups. 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.

Top comments (0)