Control plane API
Control plane API
The API the dashboard is built on, for scripting your organisation: session cookies, scoping, conventions, and the endpoint map.
Base URL and scope
https://api.intelligentinference.ai/apiEvery endpoint operates on the caller's own organisation, resolved from the session. There is no organisation id in any request and no way to address another organisation: a project or key id from elsewhere answers 404, never a silent empty result.
Authentication
Sessions, not bearer tokens. POST /api/auth/login (or /auth/google) sets two HttpOnly cookies:
| Cookie | Lifetime | Purpose |
|---|---|---|
i2_access_token | 15 minutes | Sent on every request; the credential the API checks. |
i2_refresh_token | 7 days | Exchanged at POST /api/auth/refresh for a fresh access token. |
Both are SameSite=Lax and Secure. There is no CSRF token to send; SameSite=Lax is the defence. A request with no cookie, an expired one, or one for a deactivated user answers 401 {"detail": "Unauthorized"}.
With cURL, keep a cookie jar:
curl -c cookies.txt -X POST https://api.intelligentinference.ai/api/auth/login \
-H "Content-Type: application/json" \
-d '{"email": "you@company.com", "password": "…"}'
curl -b cookies.txt https://api.intelligentinference.ai/api/auth/meRefresh before the access token lapses (or on the first 401), then retry:
curl -b cookies.txt -c cookies.txt -X POST https://api.intelligentinference.ai/api/auth/refreshRoles
role on your account is owner (you created the organisation), admin, or member (you joined one that existed). Nothing in this API changes a role after sign-up. Renaming the organisation is the one operation that checks it: it needs owner or admin. Everything else in this reference is open to any member.
Conventions
- Units. Every
_centsfield is micro-PKR (1 PKR = 1,000,000)._pkrfields are the same value divided by 1,000,000. Never treat_centsas currency. - Nulls mean unknown. Averages over an empty window, a first-token time on a non-streaming request, a name for a deleted key: all
null, never0or"". - Paging is
limit/offset.limitis clamped to 200 server-side; check the response's ownlimit. - Blank query parameters equal omitted ones (
project_id=is the same as noproject_id). - Errors are
{"error": "…"}with a human sentence, or DRF-style{"detail": …}for schema validation. See Error responses.
Endpoint map
| Area | Endpoints |
|---|---|
| Auth | POST /auth/register, POST /auth/login, POST /auth/google, POST /auth/refresh, POST /auth/logout, GET /auth/me |
| Organization, members, projects | PATCH /organization, GET /members, GET /projects |
| API keys | POST /keys, GET /keys, DELETE /keys/{key_id} |
| BYOK provider keys | POST /vault/keys, GET /vault/keys, DELETE /vault/keys/{provider} |
| Analytics | GET /analytics/summary, GET /analytics/timeseries, GET /analytics/requests, GET /admin/usage-throttling |
| Activity | GET /activity |
Note The control plane is the same API the dashboard calls, through a same-origin relay, so anything you can do in the dashboard you can script here. Some platform operations have no endpoint at all today: changing a member's role, and resetting a password.
Something unclear or wrong on this page? Tell us. Machine-readable copies: llms.txt.