Endpoints
Paths below are on the main address (http://127.0.0.1:18000 by default).
Which of them the managed address, the control listener and the metrics
listener also serve, and what each requires, is on
Listeners and authentication.
Model requests
Section titled “Model requests”| Endpoint | Method | Purpose |
|---|---|---|
/v1/chat/completions |
POST | OpenAI Chat Completions, buffered or stream: true (SSE) |
/v1/responses |
POST | OpenAI Responses API |
/v1/messages |
POST | Anthropic Messages, buffered or streamed |
/v1/messages/count_tokens |
POST | Anthropic token count for an explicit model; see Ingress dialects |
/v1beta/models/{model}:generateContent, /v1beta/models/{model}:streamGenerateContent |
POST | Gemini API |
/v1/embeddings |
POST | Embeddings |
/v1/rerank |
POST | Reranking (Cohere-compatible). top_n defaults to 64, at most 128 |
/v1/systemone |
POST | System One decisions (not chat): the TypeSafe cloud or a local decision model such as Laya, any provider with stream_protocol = "typesafe_systemone", and the decision models of a connected OpenRouter (GPT-6 Luna Decisions, Jev, Mercury Decide and others; Prism sends them to OpenRouter’s /api/alpha/decisions). The model is provider::id from /v1/models, e.g. openrouter::openai/gpt-6-luna-decisions; questions may be omitted when the model has its own decision pack |
/v1/models |
GET | OpenAI-compatible model list |
/models, /chat/completions, /responses, /embeddings |
as above | The same endpoints without the /v1 prefix |
Chat Completions, Responses, Anthropic Messages, Gemini and the Ollama chat endpoints all go through the same routing; see Choosing a model.
Ollama API
Section titled “Ollama API”Main address only. Details: Ingress dialects.
| Endpoint | Method | Purpose |
|---|---|---|
/ |
GET, HEAD | Ollama is running; Server: Prism/<version> (Ollama-compatible API) |
/api/version |
GET | {"version":"0.12.0","prism_version":"…"} |
/api/tags |
GET | Models Prism can route to |
/api/show |
POST | One model’s details |
/api/ps |
GET | {"models":[]} |
/api/chat, /api/generate |
POST | Chat and completion, routed like /v1/chat/completions |
/api/embed, /api/embeddings |
POST | Embeddings |
/api/pull |
POST | Succeeds for a model Prism serves; downloads nothing |
/api/create, /api/delete, /api/copy, /api/push |
any | 501 |
Files, images, audio, batches
Section titled “Files, images, audio, batches”These requests are forwarded to one OpenAI-compatible provider, without
routing or failover. A model of provider::model or provider/model in a
JSON body picks the provider; otherwise Prism uses the first [[providers]]
entry if it is OpenAI-compatible, else the OpenAI-compatible provider whose
name sorts first.
| Endpoint | Method | Body limit |
|---|---|---|
/v1/images/generations, /v1/images/edits, /v1/images/variations |
POST | 20 MiB |
/v1/audio/speech, /v1/audio/transcriptions, /v1/audio/translations |
POST | 30 MiB |
/v1/files |
GET, POST | 512 MiB |
/v1/files/{id} |
GET, DELETE | 512 MiB |
/v1/files/{id}/content |
GET | 512 MiB |
/v1/batches |
GET, POST | 4 MiB |
/v1/batches/{id} |
GET | 4 MiB |
/v1/batches/{id}/cancel |
POST | 4 MiB |
A wrong method on these paths gets 400 invalid_request, not 405.
Discovery
Section titled “Discovery”No key needed.
| Endpoint | Method | Purpose |
|---|---|---|
/health |
GET | {"status":"ok"} |
/.well-known/prism.json |
GET | Self-description for agents; see Agent self-description |
/prism/agent-context |
GET | The same as Markdown; ?format=json for JSON |
/prism/models |
GET | Prism’s model catalog: candidate_id (provider/model), task types, capabilities, quality tier, limits, pricing, health, whether automatic routing may pick the model and why not |
/prism/capabilities |
GET, HEAD | Routes Prism serves, with the models each can use now and a revision digest |
/prism/skills/catalog.json, /prism/skills/{release}/{skill}/SKILL.md |
GET | Agent instructions for this Prism version |
/prism/session/last-served |
GET | Last model that served the session named by X-Prism-Session |
Status, cost, metrics
Section titled “Status, cost, metrics”Open unless PRISM_ADMIN_TOKEN or PRISM_READ_TOKEN is set; then they need
X-Prism-Admin-Token, or the read token as X-Prism-Read-Token or
Authorization: Bearer.
| Endpoint | Method | Purpose |
|---|---|---|
/prism/status |
GET | Status snapshot (JSON); prism status prints it |
/prism/cost |
GET | Cost and token totals. Query: period=day|week|month|all, or days=N (default 7), or from/to (RFC 3339 or YYYY-MM-DD, at most 366 days); group_by=provider|model|app|task_type|client_agent; app=<name>. With Teams, a report not narrowed to a consumer also carries machines and total_with_machines_usd (machine cost) |
/prism/routing/arms |
GET | The auto tests (the ECI test and the quality-prior test): switch, safety stop, daily overspend, and per assigned arm the conversations, those without an answer on the first turn, turns and cost. Query: days=N (1–90, default 7) |
/metrics |
GET | Prometheus metrics. Moves to [metrics] bind when that is set |
Control
Section titled “Control”Loopback plus the owner token. See Local control API.
| Endpoint | Method | Purpose |
|---|---|---|
/prism/control |
POST | Defaults, sessions, provider recovery, discovery, pricing |
/prism/funding/clear |
POST | {"provider": "..."} or {"all": true}: clear an “unfunded” mark |
/prism/auth/clear |
POST | Same body: clear an “authentication failed” block |
/prism/health/recheck |
POST | {"provider": "..."}: probe a provider now |
/prism/traces/{trace_id} |
GET | Orchestration trace of one request (metadata only, no content); X-Prism-Trace-Id names it. Needs X-Prism-Admin-Token |
Any other path answers 404 with code route_not_found.