On this page
Compatibility
OpenRouter-compatible API
Every OpenRouter REST operation, served natively at the bare path, /v1, and /api/v1.
RelayRouter implements the OpenRouter API surface directly. The same routes answer at /models, /v1/models and /api/v1/models, so an OpenRouter client only needs its base URL changed. Inference routes reuse the native chat path, which means auth, allowlists, quotas, billing, reasoning visibility, forced personas and failover behave identically everywhere.
Base URL
import { OpenRouter } from "@openrouter/sdk";
const client = new OpenRouter({ apiKey: process.env.RELAY_API_KEY, baseURL: "https://api.relayrouter.org/api/v1",});Three equivalent prefixes
Bare paths (/models), /v1/… and /api/v1/… are all valid. Pick whichever your client expects; the response is the same.
Inference
Catalog and account
Model filters
GET /models and GET /models/user accept the documented query parameters. Unrecognised values are ignored rather than rejected.
# cheapest models with at least 200k contextcurl "https://api.relayrouter.org/api/v1/models?context=200000&sort=pricing&limit=10" \ -H "Authorization: Bearer $RELAY_API_KEY"Files, batches, containers
Files and batches are scoped to the calling account. An id from another account is indistinguishable from a missing row.
Platform resources
Management resources are real, account-scoped storage — a resource exists because a row exists. Credential responses carry metadata only, never the secret.
Errors
The error contract is identical across every route: model_busy (503, retry after Retry-After), model_not_available (404, do not retry) and invalid_request (400). Internal serving details are never returned to callers.
Empty, not fabricated
Features the relay does not operate (benchmark scores, server tools, container runtimes, app/session datasets) return correctly shaped empty results rather than made-up data.