API overview
The endpoint, outcomes, calls and nodes, Model Compare settings, kept content, re-runs and comparisons, passports and their export, public verification, and what the assurance features expose.
Authentication#
The base is https://www.ospp.it.com/api. Every call carries Authorization: Bearer <OSPP API key>, except the public addresses, which need no key, and the outcome address of a call, which is its own secret.
The endpoint#
The one way to send work through OSPP. It is OpenAI-compatible; the base URL for a client is https://www.ospp.it.com/api/v1/openai.
| Call | What it does |
|---|---|
POST /v1/openai/chat/completions | One call to the model you name. The answer comes back with its passport, or with the run id while the passport is still pending |
GET /v1/openai/models | The models you can name, each with ospp: what it supports (tools, JSON output, JSON schema, images, streaming live or replayed) and its price per million tokens |
GET /v1/runs/{run_id} | The state of one call; where to read the passport id when the answer said it was pending |
An unknown or misspelled model is answered 404 model_not_found with close names.
See The endpoint, Request headers and Responses.
Outcomes#
| Call | What it does |
|---|---|
POST /v1/o/<run_id>/<token> | The outcome address of one call, given in X-OSPP-Outcome-URL and ospp.outcome_url. No API key. Takes {"values": {"score": 1}} or a flat object of whole numbers, with optional observed_at and idempotency_key |
GET /v1/o/<run_id>/<token> | Describes the address and what it takes |
POST /v1/outcomes | The same with the API key: {"passport_id": "...", "values": {...}} |
GET /v1/passports/{id}/outcome | The outcome of a passport: the latest value of each metric and every update |
The outcome address answers 409 PASSPORT_PENDING until the passport is issued, and 409 NO_PASSPORT when the call failed. It takes at most 30 updates per minute per passport; more answer 429. The default metrics score and count are created on the node's first outcome. See Outcomes.
Calls and nodes#
| Call | What it does |
|---|---|
GET /v1/calls | Your calls through the endpoint, newest first. Filters: node, model, trace, reference, since, until, status, compare. Up to 200 per page; page with before, taken from next_before |
GET /v1/calls/summary?range=30d | The figures for one range (24h, 7d, 30d, 90d or 365d), per node and model: calls, passports, errors, cost, median duration, tokens, tool-call validity and the outcome reported |
GET /v1/nodes | Your nodes: name, models used, call count, first and last call, the Model Compare setting |
GET /v1/nodes/{node}/settings | A node's Model Compare switch and retention period, and how many calls are kept |
PUT /v1/nodes/{node}/settings | Sets model_compare, retention_days (1 to 365) and, with delete_kept: true, deletes the content already kept |
GET /v1/passports/{id}/content | The conversation and the answer of a call, while OSPP keeps them |
Here {node} is the node's name. Tool-call validity counts tool calls that name an undeclared tool or carry malformed arguments. Re-runs are counted apart and stay out of the other figures. An organisation with its own gateway cannot switch Model Compare on at OSPP (409 SELF_HOSTED_GATEWAY): the content stays on its gateway. Content that is not kept answers 409 CONTENT_NOT_KEPT. See Passports and Model Compare.
Running a call again#
| Call | What it does |
|---|---|
POST /v1/passports/{id}/rerun | Runs the call again on another model: {"model": "provider/model"}. A new passport that names the original |
GET /v1/runs/{run_id}/replay | The re-run next to the original, side by side |
POST /v1/compare | Runs a selection again on several models: {passport_ids, models, title?, repeats?}. 1 to 50 passports of one node version, 1 to 8 models, repeats 1 to 5 |
GET /v1/compare | Your comparisons, with their progress |
GET /v1/experiments/{id}/comparison | The result of one comparison, as it fills |
A re-run needs the content of the original call: Model Compare on for its node, inside the retention period. Re-runs are billed as normal calls and kept out of the node's production figures. See Model Arena.
Passports#
| Call | What it does |
|---|---|
GET /v1/passports | Your organisation's passports |
GET /v1/passports/{id} | One passport |
GET /v1/passports/{id}/export | The passport as a .ospp file |
POST /v1/passports/export | A zip of .ospp files plus index.csv: {"passport_ids": [...]}, up to 500 |
GET /v1/passports/{id}/history | What was recorded on the passport after it was issued |
A single passport's file is also public, without a key: the address in X-OSPP-Passport-File, which is the passport's verify address followed by /bundle. Save it as <id>.ospp. Search, retention and legal holds are in passport management on the Platform.
Your own provider keys#
| Call | What it does |
|---|---|
GET, POST /v1/credentials; DELETE /v1/credentials/{id} | Your own provider keys in the vault: store, list (ids and providers only) and revoke. With your own key the model use is not charged by OSPP |
Public verification#
No key needed.
| Call | What it does |
|---|---|
GET /v1/public/passports/{id} | The public page of a passport |
GET /v1/public/passports/{id}/bundle | The bundle a verifier checks offline |
GET /v1/public/verify/{id} | The rule-by-rule verification result for one passport id |
POST /v1/public/verify | Verifies a .ospp file or a passport id: rules, status, freshness |
POST /v1/public/verify/batch | Up to 200 passport ids or links at once |
The other public addresses are listed under Public pages.
Assurance#
| Area | Endpoints |
|---|---|
| Statements | GET, POST /v1/statements; GET, PUT, DELETE /v1/statements/{id}; POST /v1/statements/{id}/issue, /withdraw; GET /v1/statements/{id}/pdf |
| Receipts | GET, PUT /v1/procedures/{version}/receipt-spec; POST /v1/passports/{id}/receipt; GET /v1/receipts; GET /v1/receipts/{id}; POST /v1/receipts/{id}/withdraw |
| Content credentials | POST, GET /v1/passports/{id}/credential; public: GET /v1/public/credentials/{id}, POST /v1/public/credentials/verify |
| Compliance | GET /v1/evidence; GET /v1/procedures/{version}/evidence; GET, PUT /v1/evidence/policy; GET, POST /v1/evidence/holds; POST /v1/evidence/holds/{id}/release; GET, POST /v1/evidence/packs; GET /v1/evidence/packs/{id}, /{id}/download |
| Assurance profile | GET /v1/procedures/{version}/assurance-profile |
| Model watch | GET /v1/models; GET /v1/models/{provider}/{model}; GET /v1/models/notices; POST /v1/models/notices/read; replays: POST /v1/passports/{id}/replay, GET /v1/passports/{id}/replays |
| Finance | GET /v1/finance/statement?period=YYYY-MM; GET /v1/finance/periods |
In these paths {version} is a node version, the value the endpoint returns in X-OSPP-Node. The features are described in the Assurance section.
Errors#
The endpoint answers errors in OpenAI's error shape, so existing clients show the message; see Errors. The other calls answer JSON problems with a code and a plain-words message; the codes are stable, the messages are for people.
How the Platform and the admin UI call OSPP#
Neither puts the organisation's API key in a browser. The Platform relays a signed-in member's calls through /api/organizations/{org}/ospp/…; the self-hosted admin UI through /admin/api/ospp/…. Both pass only an allow-listed set of calls, name the person acting in a header, and stream files such as packs, PDFs and CSV through a separate route. Owners' and admins' actions are enforced at the relay as well as at OSPP.
