Account, keys and tenants
The calling workspace: profile, usage, savings, activity log, API keys and tenants.
API version 1.0.0
The calling workspace: profile, usage, savings, activity log, API keys and tenants.
get/api/v1/activity
Activity
Newest-first request log; pass `before=<ts of the last row> to page further back.
traced marks rows whose spans and events are still in the tracer buffer
(GET /api/v1/trace/{request_id}); outcome` summarises the feedback reported for the request.
Requires an API key.
Parameters
| Name | In | Type | Default | Description |
|---|---|---|---|---|
| limit | query | integer | 50 | |
| before | query | number | null | ||
| endpoint | query | string | null | ||
| target | query | string | null | ||
| key | query | string | null |
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s "$OSR_URL/api/v1/activity?limit=50" \
-H "Authorization: Bearer $OSR_API_KEY"get/api/v1/alerts
Alerts
Active conditions, most severe first: budgets nearly spent or exhausted and failing requests for the
workspace; on plans with `stats` also the deployment's readiness, 5xx rate, latency SLO, open circuit
breakers, routing drift, autopilot errors, a stale routing SLM and tracing being off. Each alert names the
dashboard page that shows or fixes it. Evaluated on request from the platform's own state.
Requires an API key.
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s "$OSR_URL/api/v1/alerts" \
-H "Authorization: Bearer $OSR_API_KEY"get/api/v1/events
Events
Recent tracer events of the workspace's requests (`name may end with *, e.g. route.*).
Oldest first, at most limit (default 200, max 2000). Deployment-wide events without a
request id (breaker transitions, autopilot) are included on plans with stats. since /
until (epoch seconds) select a time range from the platform's persisted telemetry (default the
last 6 hours); source` says whether the rows came from the store or the in-memory buffer.
Requires an API key.
Parameters
| Name | In | Type | Default | Description |
|---|---|---|---|---|
| request_id | query | string | null | ||
| name | query | string | null | ||
| kind | query | string | null | ||
| level | query | string | null | ||
| limit | query | integer | 200 | |
| since | query | number | null | ||
| until | query | number | null |
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s "$OSR_URL/api/v1/events?limit=200" \
-H "Authorization: Bearer $OSR_API_KEY"get/api/v1/governance
Governance
One view of the AI-governance posture of the workspace on this deployment. Controls in force (input guard, PII redaction, audit chain, metrics, tracing), the workspace policy and tenants with their budgets and spend, the plan's limits and quota, the catalogue's data boundaries and PII-capable targets, and data retention.
Requires an API key.
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s "$OSR_URL/api/v1/governance" \
-H "Authorization: Bearer $OSR_API_KEY"get/api/v1/keys
Keys
Requires an API key.
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s "$OSR_URL/api/v1/keys" \
-H "Authorization: Bearer $OSR_API_KEY"post/api/v1/keys
Create Key
Requires an API key.
Request bodyKeyIn
| Field | Type | Default | Description |
|---|---|---|---|
| name | string | "" |
Responses
| 201 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s -X POST "$OSR_URL/api/v1/keys" \
-H "Authorization: Bearer $OSR_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'{}patch/api/v1/keys/{key_id}
Rename Key
Rename an active key (the secret does not change).
Requires an API key.
Parameters
| Name | In | Type | Default | Description |
|---|---|---|---|---|
| key_id(required) | path | string |
Request bodyKeyIn
| Field | Type | Default | Description |
|---|---|---|---|
| name | string | "" |
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s -X PATCH "$OSR_URL/api/v1/keys/<key_id>" \
-H "Authorization: Bearer $OSR_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'{}delete/api/v1/keys/{key_id}
Revoke Key
Requires an API key.
Parameters
| Name | In | Type | Default | Description |
|---|---|---|---|---|
| key_id(required) | path | string |
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s -X DELETE "$OSR_URL/api/v1/keys/<key_id>" \
-H "Authorization: Bearer $OSR_API_KEY"post/api/v1/keys/{key_id}/rotate
Rotate Key
Issue a new secret for the key and invalidate the old one immediately; the new value is shown once. The key keeps its id and name, so dashboards and audit rows stay attached to it.
Requires an API key.
Parameters
| Name | In | Type | Default | Description |
|---|---|---|---|---|
| key_id(required) | path | string |
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s -X POST "$OSR_URL/api/v1/keys/<key_id>/rotate" \
-H "Authorization: Bearer $OSR_API_KEY"get/api/v1/learning
Learning
How the router learns on this deployment: the strategy ensemble and its weights, the learner state (persistence, drift resets, quarantined state), per-target outcome statistics from feedback, the routing SLM in service (rows, sources, encoder, calibration, accuracy history) and the autopilot (schedule, drift monitor, last cycle, recent champion-vs-challenger reports). Deployment-wide aggregates only - no request text, no per-workspace data. Available on every plan.
Requires an API key.
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s "$OSR_URL/api/v1/learning" \
-H "Authorization: Bearer $OSR_API_KEY"get/api/v1/me
Me
Requires an API key.
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s "$OSR_URL/api/v1/me" \
-H "Authorization: Bearer $OSR_API_KEY"get/api/v1/me/audit
My Audit
The signed-in person's own account history: sign-ins, password and email changes, memberships.
Requires an API key.
Parameters
| Name | In | Type | Default | Description |
|---|---|---|---|---|
| limit | query | integer | 50 | |
| before | query | number | null |
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s "$OSR_URL/api/v1/me/audit?limit=50" \
-H "Authorization: Bearer $OSR_API_KEY"post/api/v1/me/delete
Delete Me
Delete the signed-in user: sessions, linked identities and memberships go; workspaces they alone owned are disabled with their keys. Organizations with other members need another owner first. Requires the password when one is set and the account email typed as confirmation.
Requires an API key.
Request bodyDeleteMeIn
| Field | Type | Default | Description |
|---|---|---|---|
| confirm | string | "" | |
| password | string | null |
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s -X POST "$OSR_URL/api/v1/me/delete" \
-H "Authorization: Bearer $OSR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "password": "string" }'{
"password": "string"
}get/api/v1/me/export
My Export
Everything the platform holds about the signed-in person and the current workspace, as one JSON
document (data portability): profile, identities, sessions, memberships, the workspace with its keys
(prefixes only), tenants, policy, SSO connection, usage summary, request log and reported outcomes for
the last `days` (max 365), plus the account history. Prompt text is never stored, so none appears.
Requires an API key.
Parameters
| Name | In | Type | Default | Description |
|---|---|---|---|---|
| days | query | integer | 365 |
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s "$OSR_URL/api/v1/me/export?days=365" \
-H "Authorization: Bearer $OSR_API_KEY"get/api/v1/notifications
Inbox
Alert episodes of the workspace, newest first, with the unread counts the dashboard bell shows.
Requires an API key.
Parameters
| Name | In | Type | Default | Description |
|---|---|---|---|---|
| unread | query | boolean | false | |
| state | query | string | null | ||
| limit | query | integer | 50 | |
| before | query | number | null |
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s "$OSR_URL/api/v1/notifications?unread=false&limit=50" \
-H "Authorization: Bearer $OSR_API_KEY"get/api/v1/notifications/channels
Channels
Requires an API key.
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s "$OSR_URL/api/v1/notifications/channels" \
-H "Authorization: Bearer $OSR_API_KEY"post/api/v1/notifications/channels
Create Channel
Add an email, webhook, Slack or Teams channel; webhooks may carry a secret for `X-OSR-Signature`.
Requires an API key.
Request bodyChannelIn
| Field | Type | Default | Description |
|---|---|---|---|
| kind(required) | string | ||
| min_severity | string | "warning" | |
| name | string | "" | |
| rules | string[] | ||
| secret | string | null | ||
| target(required) | string |
Responses
| 201 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s -X POST "$OSR_URL/api/v1/notifications/channels" \
-H "Authorization: Bearer $OSR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "kind": "string", "target": "string" }'{
"kind": "string",
"target": "string"
}patch/api/v1/notifications/channels/{channel_id}
Patch Channel
Requires an API key.
Parameters
| Name | In | Type | Default | Description |
|---|---|---|---|---|
| channel_id(required) | path | string |
Request bodyChannelPatch
| Field | Type | Default | Description |
|---|---|---|---|
| enabled | boolean | null | ||
| min_severity | string | null | ||
| name | string | null | ||
| rules | string[] | null | ||
| secret | string | null | ||
| target | string | null |
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s -X PATCH "$OSR_URL/api/v1/notifications/channels/<channel_id>" \
-H "Authorization: Bearer $OSR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "enabled": false, "min_severity": "string", "name": "default", "rules": [], "secret": "string", "target": "string" }'{
"enabled": false,
"min_severity": "string",
"name": "default",
"rules": [],
"secret": "string",
"target": "string"
}delete/api/v1/notifications/channels/{channel_id}
Delete Channel
Requires an API key.
Parameters
| Name | In | Type | Default | Description |
|---|---|---|---|---|
| channel_id(required) | path | string |
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s -X DELETE "$OSR_URL/api/v1/notifications/channels/<channel_id>" \
-H "Authorization: Bearer $OSR_API_KEY"post/api/v1/notifications/channels/{channel_id}/test
Test Channel
Send a test notification through the channel and report the result.
Requires an API key.
Parameters
| Name | In | Type | Default | Description |
|---|---|---|---|---|
| channel_id(required) | path | string |
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s -X POST "$OSR_URL/api/v1/notifications/channels/<channel_id>/test" \
-H "Authorization: Bearer $OSR_API_KEY"get/api/v1/notifications/deliveries
Deliveries
Requires an API key.
Parameters
| Name | In | Type | Default | Description |
|---|---|---|---|---|
| limit | query | integer | 100 |
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s "$OSR_URL/api/v1/notifications/deliveries?limit=100" \
-H "Authorization: Bearer $OSR_API_KEY"post/api/v1/notifications/read
Read
Mark the given notifications (or all) as read for the workspace.
Requires an API key.
Request bodyReadIn
| Field | Type | Default | Description |
|---|---|---|---|
| ids | string[] | null |
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s -X POST "$OSR_URL/api/v1/notifications/read" \
-H "Authorization: Bearer $OSR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "ids": [] }'{
"ids": []
}get/api/v1/notifications/unread
Unread
Requires an API key.
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s "$OSR_URL/api/v1/notifications/unread" \
-H "Authorization: Bearer $OSR_API_KEY"get/api/v1/onboarding
Onboarding
Getting-started checklist of the calling workspace: what is done, what to do next, with the links.
Steps: verify the e-mail address, create an API key, route a first request, report a first outcome,
connect a model provider (executable targets), invite a teammate (organizations). `complete` is
the share of steps done; the dashboard shows the list until every step is done.
Requires an API key.
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s "$OSR_URL/api/v1/onboarding" \
-H "Authorization: Bearer $OSR_API_KEY"get/api/v1/policy
Policy
The workspace-wide routing policy: constraints and budgets applied to every request.
Requires an API key.
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s "$OSR_URL/api/v1/policy" \
-H "Authorization: Bearer $OSR_API_KEY"put/api/v1/policy
Set Policy
Replace the workspace policy (admin role). Target ids are checked against the catalogue.
Requires an API key.
Request bodyPolicyIn
| Field | Type | Default | Description |
|---|---|---|---|
| config | object |
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s -X PUT "$OSR_URL/api/v1/policy" \
-H "Authorization: Bearer $OSR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "config": {} }'{
"config": {}
}delete/api/v1/policy
Delete Policy
Requires an API key.
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s -X DELETE "$OSR_URL/api/v1/policy" \
-H "Authorization: Bearer $OSR_API_KEY"get/api/v1/savings
Savings
Baseline-vs-routed cost over the window; `baseline` defaults to the priciest model.
Requires an API key.
Parameters
| Name | In | Type | Default | Description |
|---|---|---|---|---|
| days | query | integer | 30 | |
| baseline | query | string | null |
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s "$OSR_URL/api/v1/savings?days=30" \
-H "Authorization: Bearer $OSR_API_KEY"get/api/v1/signals
Signals
The account's own product-usage signals (the same facts sales sees in `/admin/pql`).
Requires an API key.
Parameters
| Name | In | Type | Default | Description |
|---|---|---|---|---|
| days | query | integer | 30 |
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s "$OSR_URL/api/v1/signals?days=30" \
-H "Authorization: Bearer $OSR_API_KEY"get/api/v1/telemetry/series
Telemetry Series
The workspace's traffic as a time series: requests, failures, p50 / p95 latency, cost and tokens per
bucket over `window (1h, 6h, 24h, 7d, 30d), with totals per target and endpoint.
Plans with stats also get http`: the deployment's requests, 5xx and latency percentiles per bucket.
Computed from the platform's own records - no external metrics system.
Requires an API key.
Parameters
| Name | In | Type | Default | Description |
|---|---|---|---|---|
| window | query | string | "24h" |
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s "$OSR_URL/api/v1/telemetry/series?window=24h" \
-H "Authorization: Bearer $OSR_API_KEY"get/api/v1/tenants
Tenants
Requires an API key.
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s "$OSR_URL/api/v1/tenants" \
-H "Authorization: Bearer $OSR_API_KEY"put/api/v1/tenants
Upsert Tenant
Requires an API key.
Request bodyTenantIn
| Field | Type | Default | Description |
|---|---|---|---|
| config | object | ||
| slug(required) | string |
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s -X PUT "$OSR_URL/api/v1/tenants" \
-H "Authorization: Bearer $OSR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "slug": "eu-health", "config": { "region": "eu", "data_boundary": "private" } }'{
"slug": "eu-health",
"config": {
"region": "eu",
"data_boundary": "private"
}
}delete/api/v1/tenants/{slug}
Delete Tenant
Requires an API key.
Parameters
| Name | In | Type | Default | Description |
|---|---|---|---|---|
| slug(required) | path | string |
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s -X DELETE "$OSR_URL/api/v1/tenants/<slug>" \
-H "Authorization: Bearer $OSR_API_KEY"get/api/v1/trace/{request_id}
Trace
Every span and event the router recorded for one of the workspace's requests, in time order.
Spans (`kind: "span") carry duration_ms and status; events carry the stage's facts
(signals, policy rejections, ranking, escalation, fallback, guard verdicts, execution steps).
outcomes lists the feedback reported for the request and audit its hash-chained records
(plans with audit`). Request text never appears - only its digest. 404 when the request id is
not this workspace's.
Requires an API key.
Parameters
| Name | In | Type | Default | Description |
|---|---|---|---|---|
| request_id(required) | path | string |
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s "$OSR_URL/api/v1/trace/<request_id>" \
-H "Authorization: Bearer $OSR_API_KEY"get/api/v1/usage
Usage
Requires an API key.
Parameters
| Name | In | Type | Default | Description |
|---|---|---|---|---|
| days | query | integer | 30 |
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s "$OSR_URL/api/v1/usage?days=30" \
-H "Authorization: Bearer $OSR_API_KEY"