Docs

Quick start, editor setup and FAQ for the OpenAI-compatible API.

Is it down, or is it me?

When requests start failing, the first question is whether the problem is yours or ours. This page tells you how to find out in under a minute.

Check the status page first

Open /systemstatus. No sign-in needed, which matters: if the problem is on our side you may not be able to log in at all.

The top of the page is the live view: one line for the service overall, then one line per model provider.

What it says What it means
All systems operational Everything is working. The problem is likely in your request. Read on.
Some providers are unavailable One provider is having trouble. Your requests still work, they are served by another provider automatically.
No providers are currently available Nothing can be served right now. Wait, and retry.
The gateway is not accepting requests The service itself is down. Wait, and retry.

Each provider shows one of three states:

  • Operational — answering normally.
  • Degraded — answering, but its latest request or test call failed, or many did in the last few minutes (also while it recovers from being down). Expect slower replies or occasional errors.
  • Down — not answering, or switched off by us. Requests go to another provider instead.

These states are live. Every minute Peris.ai Router sends each provider a small test call (it asks for a model that does not exist, which costs nothing), and the outcome of real requests in the last 5 minutes counts too. A provider that stops answering shows as Degraded or Down within a minute or two.

A provider being Down does not mean your requests fail. Peris.ai Router falls back to another provider that can serve the model you asked for. A request only fails when no provider can serve it.

Below that is the uptime history: how often Peris.ai Router was up over the last 24 hours, 7, 30 and 90 days, a bar for each of the last 90 days, and recent outages. These checks come from an independent monitor outside Peris.ai Router, and the page links to that monitor's own status page, which keeps working even when Peris.ai Router itself does not.

If the status page says everything is fine

Then the answer is in the error you got back. Every failure includes a type you can look up on the Errors page, and a request_id.

The four most common, and what they really mean:

  • 401 — the key is wrong, disabled, deleted or expired. Check you are sending Authorization: Bearer perisai_router_sk_... and that the key still exists under API Keys.
  • 402 — your organisation is out of credit. Someone with admin rights needs to top up from the Credits page.
  • 403 model_not_allowed — the key is fine, but its guardrails do not permit that model. Check the key's allowed models.
  • 429 — too many requests too quickly. Slow down and retry.

Always keep the request id

Every response, successful or not, carries a x-perisai-router-request-id header, and failures repeat it in the body as request_id. It looks like req_b0fb5ca486b7.

Quote it when you ask for help. With it we can find your exact request in the logs in seconds. Without it, we are guessing.

Watching the service automatically

If you want your own monitoring to track us, poll GET /api/status. It needs no key and is cached for 15 seconds, so checking every 30 seconds is plenty.

curl -s http://43.173.12.157/api/status

The status field is operational, degraded or down. Alert on down.

For a stricter check, GET /healthz returns 503 when the gateway cannot serve traffic at all, which is the condition worth paging someone about.

If you would rather not run your own monitor, bookmark /systemstatus: it shows the same outside checks with their history.