GPT and Claude with one API key
One MonkeyAI key authenticates OpenAI-compatible traffic to https://monkeytheme.com/v1. Switch between GPT and Claude by model id after GET /v1/models proves what your account can see — not by juggling vendor keys.
Direct answer
Use one MonkeyAI API key against https://monkeytheme.com/v1 for OpenAI-compatible clients. Switch models by changing the model field (or client model picker), not by minting a second key per vendor. Availability of a specific GPT or Claude id is account-scoped — prove it with GET /v1/models.
| Item | Value on MonkeyAI |
|---|---|
| Base URL | https://monkeytheme.com/v1 (include /v1) |
| Auth | Authorization: Bearer <key> (also accepts x-api-key / x-goog-api-key per error text) |
| Key scope | One dashboard key for the gateway; model family access follows group/channel policy |
| Safe first check | GET /v1/models before any agent profile edit |
What we measured on production (no user key)
Probes hit public https://monkeytheme.com on 2026-08-04. No real customer key was used. Bodies are summarized from live JSON.
| Request | HTTP | code | What it shows |
|---|---|---|---|
GET /v1/models (no auth) | 401 | API_KEY_REQUIRED | Models endpoint is live behind auth |
POST /v1/chat/completions (no auth) | 401 | API_KEY_REQUIRED | Chat Completions path is live behind auth |
POST /v1/responses (no auth) | 401 | API_KEY_REQUIRED | Responses path is live behind auth |
POST /v1/messages (no auth) | 401 | API_KEY_REQUIRED | Messages-shaped path hits the same auth layer |
/v1/models over blog posts or screenshots from other gateways.Setup path that actually sticks
- Create or copy a key in the MonkeyAI dashboard. Keep it out of git and chat logs.
- Set Base URL to
https://monkeytheme.com/v1— not the site root alone. - Run the models probe below. Expect a JSON list when the key is valid.
- Pick model ids exactly as listed (case and punctuation matter).
- Send one short
/v1/chat/completionsrequest. - Only then configure Codex CLI, Cline, Roo Code, Hermes, or other agents with the same Base URL + key + model id.
# 1) Prove the key (replace *** with your key; never commit it)
curl -sS https://monkeytheme.com/v1/models \
-H "Authorization: Bearer ***" | head -c 800
# 2) One small chat completion after models works
curl -sS https://monkeytheme.com/v1/chat/completions \
-H "Authorization: Bearer ***" \
-H "Content-Type: application/json" \
-d '{"model":"MODEL_ID_FROM_LIST","messages":[{"role":"user","content":"ping"}],"max_tokens":32}'
One key, two model families — what changes
Usually stays the same
- API key string
- Base URL
https://monkeytheme.com/v1 Authorization: Bearerheader- OpenAI SDK
base_url/baseURLfield
Usually changes per request
modelid (GPT vs Claude catalog names)- Client profile or agent “model” picker
- Token / context limits you set for long agent runs
- Whether the client speaks Chat Completions, Responses, or a Claude-native surface
Do not invent nicknames like claude-latest unless /v1/models actually returns them. Wrong ids become model-not-found style errors after auth already succeeded — see the model-not-found guide.
Client matrix (OpenAI-compatible first)
| Client class | Base URL field | Key field | Model field |
|---|---|---|---|
| curl / raw HTTP | full path under /v1/... | Bearer header | JSON model |
| OpenAI Python / Node SDK | https://monkeytheme.com/v1 | api_key | per-call model= |
| Codex CLI / coding agents | provider base URL with /v1 | env or profile key | profile model id from list |
| Cline / Roo Code | OpenAI Compatible base URL | API key box | model id string |
| Claude-native-only tools | may need Anthropic-shaped settings | may use x-api-key | verify against that tool’s protocol docs; do not force OpenAI field names blindly |
Failure classes that are not “need another key”
| Symptom | Likely class | First move |
|---|---|---|
401 API_KEY_REQUIRED | Key never arrived in an accepted header | Fix env/export/header; see 401 guide |
401 INVALID_API_KEY | Value present but rejected | Re-copy key; confirm hostname is monkeytheme.com |
| Model not found / 404-style model errors | Auth ok, id wrong or not entitled | Re-read /v1/models; do not mint a second key first |
| 429 | Rate or quota | Honor Retry-After; see 429 guide |
| 504 / client timeout | Upstream or client wait budget | See 504 / SDK timeout guides — new keys rarely help |
Security habits worth keeping
- Prefer one key per human or service identity when you need clean revocation.
- Store keys in env vars or a secret manager, not in committed config files.
- If a key leaks, revoke it in the dashboard and create a replacement.
- When asking for support, share only the last four characters, endpoint, UTC time, status code, and JSON
code/message.
FAQ
Can one MonkeyAI key call both GPT and Claude?
One MonkeyAI key authenticates to https://monkeytheme.com/v1. Which GPT or Claude model ids succeed still depends on the models enabled for your account and group. Always confirm ids with GET /v1/models before hard-coding names in a client.
Is Claude accessed through the same OpenAI-compatible Base URL?
For OpenAI-compatible clients, yes: use https://monkeytheme.com/v1 with Authorization Bearer, then pick a Claude model id from /v1/models. Native Anthropic SDK fields can differ; do not assume every Claude-only client field maps 1:1 without checking that client’s docs.
Why did production return 401 on /v1/messages without a key?
On 2026-08-04, unauthenticated probes to /v1/models, /v1/chat/completions, /v1/responses, and /v1/messages all returned HTTP 401 with code API_KEY_REQUIRED. That shows those paths hit the gateway auth layer; it does not by itself prove full Claude Messages feature parity for every account.
Should a whole team share one API key?
Only if your security policy allows it. Separate keys per person or app make revocation and usage audits easier. Never paste a full key into tickets or group chats.
What should I verify before configuring Codex, Cline, or Hermes?
Run GET /v1/models with the key. When the model list returns, send one small chat completion. Only then point coding agents at Base URL https://monkeytheme.com/v1 and exact model ids from the list.