Skip to main content
The PRYSM API is OpenAI-compatible and speaks JSON over HTTPS. If you’ve used the OpenAI API, you already know it — the only differences are an enriched response (model: "auto" and a prysm block) and a few PRYSM-specific endpoints.

Base URL

https://api.prysm1.com/v1
All endpoints below are relative to this base. It already includes the /v1 version segment.

Authentication

Every authenticated request carries your secret key as a bearer token. See Authentication for details and environment variables.
Authorization: Bearer prysm_sk_your_key
EndpointMethodAuth
/chat/completionsPOSTRequired
/v2/orchestratePOSTRequired
/v2/codePOSTRequired
/v2/compliance/previewPOSTRequired
/routePOSTRequired
/usageGETRequired
/modelsGETNone
/brain/validatePOSTNone
/proof/{request_id}GETNone
/healthGETNone

Content type

Send Content-Type: application/json with request bodies. Responses are always JSON.

The response envelope

/chat/completions returns a standard OpenAI completion plus a top-level prysm block describing the routing decision, cost, latency, and a PrysmProof. OpenAI-compatible clients ignore the extra field; the SDKs expose it via extension().
{
  "id": "prysm-a1b2c3d4",
  "object": "chat.completion",
  "model": "deepseek-v3.2",
  "choices": [ ... ],
  "usage": { ... },
  "prysm": { "routing": { ... }, "cost": { ... }, "proof": { ... } }
}

Errors

PRYSM uses conventional HTTP status codes. Error bodies wrap a detail object with a machine-readable error code and a human message:
{
  "detail": {
    "error": "invalid_api_key",
    "message": "Invalid or missing PRYSM API key."
  }
}
StatusError codeMeaning
401invalid_api_keyThe key is missing, malformed, or revoked.
404proof_not_foundNo record matches the given request ID.
429rate_limit_exceededYou’ve exceeded your plan’s per-minute limit.
502provider_errorAn upstream provider returned an error.
503no_provider_availableNo provider API keys are configured server-side.
The SDKs raise these as clean exceptions/errors rather than returning raw payloads, so you can try/catch around any call.

Versioning & compatibility

PRYSM preserves OpenAI request and response shapes. Unknown fields you send are tolerated, and the PRYSM-specific additions (routing_mode, brain_config, and the prysm response block) are designed to be ignored safely by standard OpenAI clients.