DocsPlatform
API Reference
Every route, how it's authenticated, and what to expect when it fails.
8 min read
Authentication
| Surface | Method |
|---|---|
Data plane — /v1/chat/completions, /v1/models, /v1/routing/explain, provider ops, dashboard/billing reads | API key: Authorization: Bearer <API_KEY> |
| Control plane — auth, account, org, members, keys, credentials, provider config, policies | Session token from login, or an API key via the BFF |
| Dashboard | Browser session; the BFF injects credentials so the browser never touches a raw token |
Data plane
| Method | Path | Does |
|---|---|---|
| POST | /v1/chat/completions | OpenAI-compatible chat completion, streaming included |
| GET | /v1/models | List models available to your org |
| POST | /v1/routing/explain | Explain what would be chosen, without dispatching anything |
| GET | /v1/providers/status | Live provider health |
| POST | /v1/providers/sync | Sync the model catalogue for every configured provider |
| POST | /v1/providers/{provider}/sync | Sync the catalogue for one provider |
| POST | /v1/providers/{provider}/test | Test a configured credential |
Control plane
| Area | Routes |
|---|---|
| Auth | POST /v1/auth/{register,login,logout,refresh,password/forgot,password/reset} |
| Account | GET /v1/me · POST /v1/me/password |
| Organization | GET/PUT /v1/orgs/current |
| Members | GET/POST /v1/members · DELETE /v1/members/{userID} |
| API keys | GET/POST /v1/apikeys · DELETE /v1/apikeys/{id} |
| BYOK credentials | GET/POST /v1/credentials · DELETE /v1/credentials/{id} |
| Providers | GET /v1/providers · PUT /v1/providers/{name} |
| Policies | GET /v1/policies · PUT /v1/policies/{cache,routing,shadow,optimization} |
| Dashboard | GET /v1/dashboard/{overview,providers,cache,recommendations,experiments,audit,optimization,requests} |
| Billing | GET /v1/billing/{plans,subscription,entitlements,usage} · POST /v1/billing/{checkout,portal,webhook} |
| Ops | GET /livez, /readyz, /version, /metrics |
Streaming, in practice
stream.sh
bash
curl -N -X POST https://api.inferect.online/v1/chat/completions \
-H "Authorization: Bearer <INFERECT_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-3-5-sonnet",
"stream": true,
"messages": [{ "role": "user", "content": "Stream a haiku about routing." }]
}'Errors
Data-plane errors follow the OpenAI error envelope, so your existing client SDK handles them without modification. Control-plane errors return JSON with a machine-readable code and a human-readable message.
| Status | Means |
|---|---|
| 401 | Missing or invalid API key / session |
| 403 | Authenticated, but not entitled or not authorized for this action |
| 404 | Not found — or not visible to your org, by design of RLS |
| 429 | Rate limit or quota exceeded |
| 5xx | Upstream provider or platform error — check /v1/routing/explain and /v1/providers/status |
Rate limits & quota
Limits scale with your plan rather than being hardcoded per route — they're entitlement-driven. GET /v1/billing/entitlements shows exactly what your org is bound by right now.
No OpenAPI spec yet
This page is the contract, for now
A published OpenAPI/Swagger document doesn't exist yet — this reference is authoritative in the meantime. Tracked on the Roadmap.
Related