Home / Documentation / AI API gateway for developers: setup, checks and pitfalls
Developer guide · production-checked 2026-08-08

AI API gateway for developers: one endpoint for tools and apps

Developers usually need three things before they trust an API gateway: a clear Base URL, predictable model names, and a fast way to test failures. MonkeyAI keeps those paths visible for coding agents, SDKs and production applications.

AI API gateway developersSDKscoding agentsBase URL /v1OpenAI-compatible

Direct answer

MonkeyAI exposes one OpenAI-compatible HTTPS endpoint at https://monkeytheme.com/v1. Authenticate with a Bearer key, send a model id from GET /v1/models, and your SDK, agent or server-side app can call /v1/chat/completions, /v1/responses or /v1/messages using the same HTTP shape as OpenAI's public API.

For developers, the gateway is useful when you want one key surface for GPT, Claude, Gemini and DeepSeek-style models, and one operational path for 401, 404, 429 and 504 errors. It does not replace client-specific configuration, model discovery, or your own retry/timeout logic.

Quick card
Base URLhttps://monkeytheme.com/v1 (include /v1)
AuthAuthorization: Bearer YOUR_KEY
First safe probeGET /v1/models with your key
Hostnamemonkeytheme.com only — do not use the bare site root without /v1, and do not use any other subdomain
Public reference date2026-08-08

Developer pre-flight checklist

Before pointing a coding agent, an SDK, or a production app at MonkeyAI, run through this list. Each item has a one-line test that takes seconds and saves hours of debugging later.

Where MonkeyAI fits in a developer workflow

Use MonkeyAI when the team wants one key surface for multiple model families, when coding tools (Codex CLI, Cline, Roo Code, Hermes) already speak OpenAI-compatible HTTP, or when the app needs a stable operational path for 401 / 429 / 504 handling.

Good fit

Check first

Setup path that sticks

This is the order we recommend for the first run. Skip a step and you'll usually pay for it later in a coding agent that silently retries, or an app that double-counts tokens.

  1. 1
    Create a key

    In the MonkeyAI dashboard. Copy it once into a shell variable or a server-side secret store. Never paste it into a chat log, an issue tracker, or a frontend bundle.

  2. 2
    Set the Base URL

    https://monkeytheme.com/v1 — include /v1. Do not use the bare site root, do not append /v1 twice, and do not use any other subdomain (it is a separate system).

  3. 3
    Probe /v1/models

    Run curl -sS https://monkeytheme.com/v1/models -H 'Authorization: Bearer YOUR_KEY'. A valid key returns a JSON model list. 401 API_KEY_REQUIRED means the header did not reach the API; 401 INVALID_API_KEY means the value was rejected.

  4. 4
    Pick a model id

    From the /v1/models response. Copy verbatim. Do not paraphrase, do not translate dashes to underscores, do not change case.

  5. 5
    Send one short chat completion

    curl POST to /v1/chat/completions with a 32-token cap. If this fails with anything other than 401 / 429 / 504, debug it now — before wiring a coding agent or production app.

  6. 6
    Then point the client

    Codex CLI, Cline, Roo Code, Hermes or your app at the same Base URL + key + model id. Restart the process so the new env actually loads.

Concrete curl evidence (no user key)

On 2026-08-08, we hit the public host monkeytheme.com from a clean machine with no API key. These are the live responses you should see too — they prove the routes exist and are auth-gated, even without a paid plan.

RequestHTTPCodeWhat 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

Failure classes developers hit first

If you wire up an SDK or agent without reading the troubleshooting guides, these are the four symptoms you will hit first. Each one has a one-paragraph fix; the linked guides have the full evidence chain.

SymptomLikely classFirst move
401 API_KEY_REQUIREDNo accepted key header reached the APIFix env var / header / shell export. See the 401 invalid-token guide.
401 INVALID_API_KEYHeader present but value rejectedRe-copy the key, confirm the host is monkeytheme.com, and confirm there are no hidden whitespace characters.
404 HTML on /modelsBase URL missing /v1Use https://monkeytheme.com/v1. See the /v1 explained guide.
Model not foundAuth ok; id wrong or not entitledRe-read /v1/models, copy the id exactly. See the model-not-found guide.
429 Rate or quotaAccount or per-minute limit reachedHonor Retry-After, do not double-retry in the SDK. See the 429 rate-limit guide.
504 / client timeoutUpstream or wait budget exceededBounded retry with jitter; preserve request id. See the 504 upstream-timeout guide and SDK timeout guide.

Operational habits that age well

FAQ

Same six questions developers ask most often, with the answer grounded in what the public host actually returns on a clean probe.

FAQ

Is MonkeyAI for developers or only end users?

MonkeyAI is designed for both. Developers can use the OpenAI-compatible endpoint in SDKs, internal tools, coding agents and production apps. End users use the dashboard, billing and top-up flow without touching the HTTP layer.

What is the first thing a developer should verify?

Confirm the Base URL is https://monkeytheme.com/v1 (include /v1), then call GET /v1/models with your API key. A valid key returns a JSON model list. Anything that fails here will fail again in a coding agent or production app.

Can I use MonkeyAI in a production app?

Yes, after you have validated the endpoint, the visible model list, the error handling (401, 404, 429, 504), and the pricing for the workload. Do not ship without a known-good request id header so support can trace failures.

Should API keys live in frontend code?

No. Keep keys server-side, in environment variables, or in trusted local configuration files. Frontend bundles expose keys to anyone who views source. Coding agents and CI runners should read keys from the shell or a secret store, never from a checked-in file.

Does the gateway replace model selection?

No. The gateway only authenticates the request. You still need to send a model id your account can see. Copy ids verbatim from GET /v1/models with the same key — case and punctuation matter, and nicknames are not accepted.

What evidence proves the gateway is live?

On 2026-08-08, unauthenticated probes to https://monkeytheme.com/v1/models, /v1/chat/completions, /v1/responses and /v1/messages returned HTTP 401 with code API_KEY_REQUIRED. That means the routes exist behind auth on this host. /models (no /v1) returned nginx 404 HTML — wrong base, not the API.

Related guides