Gateway guide · production-checked 2026-08-04

OpenAI-compatible API gateway

Point OpenAI-shaped SDKs and coding agents at https://monkeytheme.com/v1, authenticate with a MonkeyAI key, then pick model ids from GET /v1/models. Compatibility is about HTTP shape and auth — not a free pass on every vendor-specific feature.

Base URL: https://monkeytheme.com/v1OpenAI-compatible /v1Auth: Bearer / x-api-keyProbe: GET /v1/models

Direct answer

An OpenAI-compatible API gateway lets tools that already speak OpenAI's HTTP shape point at a different host. On MonkeyAI that host is https://monkeytheme.com/v1: same style of Bearer auth and /v1/... paths, with model routing handled behind the gateway.

ItemMonkeyAI value
Public Base URLhttps://monkeytheme.com/v1 (include /v1)
Auth (measured error text)Authorization: Bearer, or x-api-key, or x-goog-api-key
First safe probeGET /v1/models with your key
Hostname in this guidemonkeytheme.com only

What we measured on production (no user key)

Probes hit public https://monkeytheme.com on 2026-08-04. No customer key was used. JSON bodies are summarized from live responses.

RequestHTTPBody signalWhat it shows
GET /v1/models (no auth)401API_KEY_REQUIREDModels route exists behind auth
POST /v1/chat/completions (no auth)401API_KEY_REQUIREDChat Completions path is live
POST /v1/responses (no auth)401API_KEY_REQUIREDResponses path is live
POST /v1/messages (no auth)401API_KEY_REQUIREDMessages-shaped path hits the same auth layer
GET /models (site root, no /v1)404nginx HTMLWrong base without /v1 is not the API
Boundary: shared 401 JSON proves auth on those paths. It does not list model ids, prove tool-calling quality, or replace an authenticated /v1/models check on your account.

When a gateway is the right fit

Good fit

  • SDKs and agents that already take a custom Base URL
  • Teams that want one key surface for multiple model families
  • Coding tools (Codex CLI, Cline, Roo Code, Hermes) that speak OpenAI-compatible HTTP
  • Apps that need one ops path for 401 / 429 / 504 handling

Check first

  • Claude-only clients that hard-code Anthropic field names
  • Features that only exist on one vendor's proprietary surface
  • Clients that silently double /v1 or strip it
  • Any claim about a model id you have not seen in /v1/models

Setup path that sticks

  1. Create a key in the MonkeyAI dashboard. Keep it out of git and chat logs.
  2. Set Base URL to https://monkeytheme.com/v1 — not the bare site root.
  3. Run GET /v1/models. A valid key should return a JSON model list.
  4. Copy a model id exactly as listed (case and punctuation matter).
  5. Send one short /v1/chat/completions request.
  6. Only then point Codex CLI, Cline, Roo Code, Hermes, or your app at the same Base URL + key + model id.
# 1) Prove auth + routing (replace *** ; never commit real keys)
curl -sS https://monkeytheme.com/v1/models \
  -H "Authorization: Bearer ***" | head -c 800

# 2) One small 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}'

# 3) Wrong base (for contrast) — site root /models is not the API
curl -sS -o /dev/null -w "%{http_code}\n" https://monkeytheme.com/models

What “compatible” usually maps to

Client expectationTypical mapping on MonkeyAI
OpenAI SDK base_url / baseURLhttps://monkeytheme.com/v1
api_keyMonkeyAI dashboard key
GET .../modelshttps://monkeytheme.com/v1/models
Chat Completionshttps://monkeytheme.com/v1/chat/completions
Responses-style clientshttps://monkeytheme.com/v1/responses (path is auth-gated; feature depth still needs your own tests)
Model selectionPer-request model id from your visible list

For Anthropic-shaped tools, do not assume every field is interchangeable with OpenAI names. Prefer the Claude Code gateway guide when the client is Messages-first.

Failure classes gateway users hit first

SymptomLikely classFirst move
401 API_KEY_REQUIREDNo accepted key header reached the APIFix env/export/header; see 401 guide
401 INVALID_API_KEYValue present but rejectedRe-copy key; confirm host is monkeytheme.com
404 HTML on /modelsBase URL missing /v1Use https://monkeytheme.com/v1; see Base URL guide
Model not foundAuth ok; id wrong or not entitledRe-read /v1/models
429Rate or quotaHonor Retry-After; see 429 guide
504 / client timeoutUpstream or wait budgetSee 504 / SDK timeout guides

Security and ops habits

FAQ

Is MonkeyAI an OpenAI-compatible API gateway?

Yes for common OpenAI-shaped clients. Public Base URL is https://monkeytheme.com/v1. 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, which shows those routes are live behind auth on this host.

Should the Base URL include /v1?

Yes for OpenAI-compatible clients and SDKs that append paths like /models or /chat/completions. Use https://monkeytheme.com/v1. Calling https://monkeytheme.com/models without /v1 returned HTTP 404 HTML from nginx in the same probe set.

Does a gateway remove the need for model names?

No. Base URL and API key only get the request accepted by the auth layer. You still send a model id that your account can see. Confirm ids with GET /v1/models after attaching a real key.

Can one key call GPT and Claude through the gateway?

One MonkeyAI key authenticates to the gateway. Which GPT or Claude ids succeed depends on account and group entitlements. Do not invent nicknames; copy exact ids from /v1/models. See the one-key GPT+Claude guide for the multi-model workflow.

What does OpenAI-compatible not guarantee?

It does not guarantee every Claude-native client field, every Responses-only feature, or every coding agent's tool loop without checking that client. Compatibility means common /v1 shapes and auth patterns — not a blank check for every vendor-specific surface.

Related guides

GPT and Claude with one API key

Multi-model workflow on the same Base URL.

Open guide

Why Base URL needs /v1

401 JSON vs 404 HTML when /v1 is missing.

Open guide

Fix API 401 invalid token

API_KEY_REQUIRED vs INVALID_API_KEY.

Open guide

OpenAI-compatible clients list

Field matrix for coding agents and SDKs.

Open guide