Skip to content
Opod

Reference

REST API

Every route the control plane serves, grouped by resource, with the minimum role each needs, plus auth, errors, conditional writes and the event stream.

The control plane serves its API on port 8080 under /api/v1, beside the console (/), the event stream (/events), /metrics, /healthz and /readyz. The API is JSON and changes only by adding.

Version

This page describes 0.3.6, whose routes are the same as 0.3.0's. These routes arrive in 0.3.0 (45 operations): /api/v1/runs and every /api/v1/runs/{id}/… action (they replace 0.2.1's /api/v1/rollouts), /api/v1/connectors and every /api/v1/connectors/… route, /api/v1/setup, /api/v1/api-tokens, /api/v1/activity, /api/v1/endpoints/{id}/revisions, /api/v1/endpoints/{id}/kv, …/kv/advice and …/kv/tier-advice, /api/v1/door/auto-routes and its keys, /api/v1/evidence/*, /api/v1/usage/gpu-daily, /api/v1/fleet/overview, PUT /api/v1/licence/fleet, /api/v1/remnants, /api/v1/nodes/{name}/sharing, /api/v1/nodes/{name}/gpus/{index}/reset, the model approval routes (…/versions/{v}/approve, /api/v1/settings/model-approval) and /api/v1/openapi.json. Outside /api/v1, POST /otlp/v1/logs (a leader's usage push) arrives in the same release, and so do the push fields of GET /api/v1/usage/streams and GET /api/v1/topology/flow.

The machine-readable copy is an OpenAPI 3.1 document generated from the route table: GET /api/v1/openapi.json (viewer), or opodcp openapi offline. Every operation carries its minimum role (x-opod-role), its tenancy scope (x-opod-scope) and a unique command name (x-cli-name), so a generic CLI such as Restish can drive every route.

In short

Everything the console does, it does through this API, so a script can do it too. Send a bearer token, send and receive JSON, and read the role column to know who may call a route. A refusal always has the same body, with an E-… code you can script on.

How to read this page

  • Conventions first: auth, the error body, conditional writes, rate limits. They hold for every route.
  • Then one table per resource. Each row is a method and a path, the minimum role (public, viewer, operator, admin), and what it does, with its query parameters. A path written …/x continues the full path given first in the same row.
  • The curl lines under a table are runnable examples; they use $CP and $H from Conventions.
  • A route that is new in 0.3.0 is listed in the Version note above.
  • For every field of a request or answer, read GET /api/v1/openapi.json, or the guide page each section links to.

A worked example, end to end

Create an endpoint, wait for it, mint a key and call the model through the control plane:

CP=https://cp.example.com
H="Authorization: Bearer $OPODCP_TOKEN"
 
# 1. create (operator) → 201 with the record
ID=$(curl -s -H "$H" -H 'Content-Type: application/json' -X POST "$CP/api/v1/endpoints" \
  -d '{"name":"chat","model":"qwen2.5-7b-instruct","plan":{"model":{"id":"qwen2.5-7b-instruct","engine":"vllm"},"workers":[{"replicas":1}]}}' \
  | jq -r .id)
 
# 2. wait until the phase is "serving"
until [ "$(curl -s -H "$H" "$CP/api/v1/endpoints/$ID/status" | jq -r .phase)" = serving ]; do sleep 10; done
 
# 3. mint a key (operator) → 201; the plaintext "key" is in this answer only
KEY=$(curl -s -H "$H" -H 'Content-Type: application/json' -X POST "$CP/api/v1/endpoints/$ID/keys" \
  -d '{"name":"smoke"}' | jq -r .key)
 
# 4. call the model through the control plane's proxy, as a client with that key would
curl -s -H "$H" -H "X-Opod-Endpoint-Key: $KEY" -H 'Content-Type: application/json' \
  -X POST "$CP/api/v1/endpoints/$ID/gateway/v1/chat/completions" \
  -d '{"model":"qwen2.5-7b-instruct","messages":[{"role":"user","content":"hello"}]}' | jq -r '.choices[0].message.content'
 
# 5. the usage the call left, totals and per endpoint
curl -s -H "$H" "$CP/api/v1/usage/summary?endpoint=$ID" | jq .

A step that fails answers the common error body: for example 409 conflict when chat exists, or 400 with details.code: "E-FIT" when it does not fit.

Conventions

Auth. Authorization: Bearer <token> on every /api/v1 route except the public ones marked below. See Users, roles and SSO. Roles: viewer < operator < admin. A machine token with a write scope reaches only the routes its scope names.

Errors. One body: { "error": "<message>", "code": "invalid|not_found|conflict|unauthorized|forbidden|rate_limited|internal", "details": { … } }. A planner refusal is a 400 with details.code (an E-… code) and details.alternatives. See Error codes. 403 covers both a role too low and another team's object; the message never names that team. An unknown /api/ path is a JSON 404.

Conditional writes. PUT /api/v1/endpoints/{id}/policy and PUT /api/v1/alert-rules replace a whole document. Their GETs carry revision and a strong ETag; send it back as If-Match and the write applies only while the document is unchanged, else 409 with nothing written.

Rate limits. With api.rateLimit.rps above 0, each caller (a user, the admin token, an OIDC subject, a machine token) has its own token bucket of rps and burst. Over it the answer is 429 rate_limited with Retry-After; no other caller is affected. It is off by default. POST /api/v1/login always has its own bucket per client address: ten attempts at once, then one every six seconds. The address is the TCP peer, or the right-most X-Forwarded-For hop that is not a proxy listed in api.trustedProxies; an IPv6 client is counted by its /64. Every refused sign-in publishes auth.login_failed.

Body limits. Most write routes read at most 64 KiB of JSON; a larger body is 400 invalid.

A request, end to end. Every example below uses these two variables:

CP=https://cp.example.com
H="Authorization: Bearer $OPODCP_TOKEN"
curl -s -H "$H" "$CP/api/v1/me"
# {"name":"alice","role":"operator","team":"search"}
curl -s -H "$H" "$CP/api/v1/endpoints/does-not-exist"
# {"error":"…","code":"not_found"}   with status 404

Downloads and the stream. GET /events, GET /api/v1/audit/export, GET /api/v1/audit/chain and GET /api/v1/usage/export also accept ?ticket=: a single-use ticket from POST /api/v1/stream-ticket, good for 30 s and carrying the caller's own role. No other route accepts a credential in the URL.

Setup mode. With no usable database, every /api/ call but GET /api/v1/setup, GET /api/v1/doctor and POST /api/v1/connectors/state/verify answers 503 E-SETUP. A database lost while running answers 503 E-DB-UNREACHABLE.

Public and meta

Method and pathRolePurpose
GET /healthzpublicliveness
GET /readyzpublicreadiness; stays Ready with no database so the pod can report it
GET /metricspublicPrometheus metrics
GET /api/v1/setuppublicready or setup mode, its kind and sentence
POST /api/v1/loginpubliclocal sign-in {name, password} → {token, name, role, team, expiresAt}
GET /api/v1/auth/methodspublicwhich sign-in methods are on
GET /api/v1/auth/oidc/start, GET /api/v1/auth/oidc/callbackpublicthe OIDC flow; your identity provider calls the callback with ?code=&state=, or ?error=&error_description= on a refusal
POST /api/v1/logoutviewerend the session
GET /api/v1/meviewerthe caller: {name, role, team}
POST /api/v1/stream-ticketviewera single-use 30 s ticket for /events and the three downloads (see Conventions)
GET /api/v1/versionviewerversion, commit, supported leader versions, where this control plane runs, mode
GET /api/v1/openapi.jsonviewerthis API as OpenAPI 3.1
GET /api/v1/capabilitiesviewercapabilities that are partial or target
GET /api/v1/doctorviewerthe doctor rows
GET /api/v1/controllersviewerevery control loop: interval, runs, errors, last run
GET /api/v1/cellviewerthe cell: name, provider, Kubernetes version, nodes, GPUs, endpoints, door URL
GET /api/v1/configadminevery OPODCP_* variable, redacted, with the helm upgrade that changes it
GET /api/v1/metrics/fleetviewerthe one-minute fleet sample the Overview plots
GET /eventsviewerserver-sent events (below); ?since=<seq> (or the Last-Event-ID header) replays up to 1,000 missed events first
curl -s "$CP/api/v1/setup"                                   # public: {"state":"ready"}, or setup mode's state, kind and sentence
curl -s -X POST "$CP/api/v1/login" -d '{"name":"admin","password":"…"}'
# {"token":"…","name":"admin","role":"admin","team":"","expiresAt":"2026-10-31T09:00:00Z"}
curl -N -H "$H" "$CP/events?since=4812"                     # replay from event 4812, then follow

Users and machine tokens

Method and pathRolePurpose
GET /api/v1/users, POST /api/v1/users, DELETE /api/v1/users/{id}adminlocal users
GET /api/v1/api-tokens, POST /api/v1/api-tokens, DELETE /api/v1/api-tokens/{id}adminmachine tokens
GET /api/v1/teamsviewerteams with their counts, GPUs held and quota
GET /api/v1/team-quotasviewerGPU quotas
PUT /api/v1/team-quotasadminreplace the quota set

Endpoints

Method and pathRolePurpose
GET /api/v1/endpointsviewerlist; ?expand=plan attaches each plan
POST /api/v1/endpointsoperatorcreate (a run)
POST /api/v1/endpoints/previewoperatorthe create's dry run
GET /api/v1/endpoints/statusviewerevery visible endpoint's status in one call
GET /api/v1/endpoints/{id}viewerone endpoint, with url, publicUrl, TLS fingerprint, resilience; ?expand=plan attaches the plan
DELETE /api/v1/endpoints/{id}operatordelete (a run; 202)
GET /api/v1/endpoints/{id}/planviewerthe plan
PUT /api/v1/endpoints/{id}/planoperator, plans:writeedit the plan; ?dryRun=true validates only
POST /api/v1/endpoints/{id}/rolloutsoperator, plans:writestart a verified rollout with the posted plan; ?note=
GET /api/v1/endpoints/{id}/revisions, …/revisions/{rev}viewerplan history, newest first; ?before=<rev>&limit=<n> pages it (both positive integers)
GET /api/v1/endpoints/{id}/statusviewerobserved phase, proof, pods, gangs, scaling
GET /api/v1/endpoints/{id}/logsviewera pod's log tail: ?pod=<name>&tail=<lines>&previous=true; tail defaults to 200, at most 5000; previous=true reads the last crashed container
GET /api/v1/endpoints/{id}/loadviewerthe leader's /loadz; in the release after 0.3.6 also slow_workers
GET /api/v1/endpoints/{id}/registryviewerthe leader's own worker rows
GET /api/v1/endpoints/{id}/shardsviewerthe leader's gang rows
POST /api/v1/endpoints/{id}/shards/reformoperatorre-form the gangs
GET /api/v1/endpoints/{id}/kv, …/kv/advice, …/kv/tier-adviceviewerKV cache per worker and measured advice; from 0.3.2 each worker row also carries engineVersion, the engine's own version as its worker reports it (0.33.0 for vLLM, b11028-972d2313b for a llama-server build); in the release after 0.3.6 each worker's load also carries kv_xfer_bytes_total, kv_xfer_seconds_total, kv_xfers_total, kv_fetch_waiting_to_start, kv_fetch_in_progress, kv_fetch_loaded (absent when not reported)
PUT /api/v1/endpoints/{id}/slooperatorstate or clear the SLO; rolls nothing
GET /api/v1/endpoints/{id}/autoscale/statsviewerwhat parking saved, the last wake; ?since=<RFC 3339>
POST /api/v1/endpoints/{id}/adapters, DELETE …/adapters/{name}operatoradd or remove a LoRA adapter live
PUT /api/v1/endpoints/{id}/remote-keyoperatorrotate a remote endpoint's vendor key
GET, POST /api/v1/endpoints/{id}/gateway/{path}viewer, operatorproxy to the endpoint's leader (X-Opod-Endpoint-Key picks the credential)
POST /api/v1/applyoperatorcreate or update from a scenario document
curl -s -H "$H" "$CP/api/v1/endpoints?expand=plan" | jq '.[] | {name, engine, revision: .plan.revision}'
curl -s -H "$H" "$CP/api/v1/endpoints/ep_7f3a/revisions?limit=5"
curl -s -H "$H" "$CP/api/v1/endpoints/ep_7f3a/revisions?before=12&limit=5"   # the page before revision 12
curl -s -H "$H" "$CP/api/v1/endpoints/ep_7f3a/logs?pod=opodcp-ep-chat-w0-6d9f&tail=500&previous=true"
curl -s -H "$H" "$CP/api/v1/endpoints/ep_7f3a/autoscale/stats?since=2026-10-29T00:00:00Z"
curl -s -H "$H" -X PUT "$CP/api/v1/endpoints/ep_7f3a/plan?dryRun=true" -d @plan.json   # validate only
curl -s -H "$H" -X POST "$CP/api/v1/endpoints/ep_7f3a/rollouts?note=vllm%200.11" -d @plan.json

Keys, auth and policy

Method and pathRolePurpose
GET /api/v1/keysviewerevery key the caller may see
GET /api/v1/endpoints/{id}/keysviewerone endpoint's keys
POST /api/v1/endpoints/{id}/keysoperator, tokens:writemint a key (plaintext once)
DELETE /api/v1/endpoints/{id}/keys/{kid}operator, tokens:writerevoke
GET, PUT /api/v1/endpoints/{id}/authviewer, operatorrequireKeys and the snapshot's state
GET /api/v1/endpoints/{id}/worker-identitiesviewerworker certificates
POST /api/v1/endpoints/{id}/worker-identities/{node}/revokeoperatorrevoke a worker's certificate
GET /api/v1/policiesviewerevery endpoint's policy
GET, PUT /api/v1/endpoints/{id}/policyviewer, operatorone endpoint's policy (If-Match)
GET, PUT /api/v1/door/auto-routesviewer, adminthe cell door's auto routes
GET, POST /api/v1/door/auto-routes/{name}/keysviewer, adminroute keys
DELETE /api/v1/door/auto-routes/{name}/keys/{kid}operatorrevoke a route key
curl -s -H "$H" -X POST "$CP/api/v1/endpoints/ep_7f3a/keys" -d '{"name":"ci-bot","expiresAt":"2027-01-31T00:00:00Z"}'
curl -s -H "$H" "$CP/api/v1/endpoints/ep_7f3a/policy" -D - | grep -i etag          # ETag: "3f9a0c2b71de"
curl -s -H "$H" -H 'If-Match: "3f9a0c2b71de"' -X PUT "$CP/api/v1/endpoints/ep_7f3a/policy" -d @policy.json

Runs

Method and pathRolePurpose
GET /api/v1/runsviewerlist; ?kind=a,b&endpoint=<id>&limit=
GET /api/v1/runs/{id}viewerone run with its steps
GET /api/v1/runs/{id}/logviewereach step's lines; ?step=&after=&format=text
POST /api/v1/runs/{id}/canceloperatorstop and give back; ?force=true
POST /api/v1/runs/{id}/rollbackoperatorroll back to the plan the run captured
POST /api/v1/runs/{id}/promote, …/abortoperatorend an unjudged canary hold
POST /api/v1/runs/{id}/signature/accept, …/rejectadmindecide a model signature hold
GET /api/v1/activityviewerchanges and events, classified, newest first, repeats folded. ?endpoint=<id>, ?filter= (changes, events, warnings, create, edit, rollout, scale, delete, worker, health, cell), ?actor=people|system, plus the audit filters below (source, type, q, since, until, limit). Pass the answer's next back as until for the next page
GET /api/v1/events/recentviewerthe last 200 lifecycle events; it takes no query parameter
curl -s -H "$H" "$CP/api/v1/runs?kind=rollout,rollback&endpoint=ep_7f3a&limit=20"
curl -s -H "$H" "$CP/api/v1/runs/run_91c2/log?step=verify&after=120&format=text"
curl -s -H "$H" -X POST "$CP/api/v1/runs/run_91c2/cancel?force=true"
curl -s -H "$H" "$CP/api/v1/activity?endpoint=ep_7f3a&filter=rollout&actor=people&since=7d&limit=50"
curl -s -H "$H" "$CP/api/v1/activity?endpoint=ep_7f3a&until=2026-10-28T14:02:11.204Z"   # the next page: the previous answer's next

Models

Method and pathRolePurpose
GET /api/v1/models, GET /api/v1/models/{id}viewerthe registry
POST /api/v1/modelsoperatoradd a model
DELETE /api/v1/models/{id}adminremove a model not in use
GET /api/v1/models/validateviewerprobe a Hub repo and file: ?repo=<org/name>&file=<name.gguf>; repo is required
GET, POST /api/v1/models/{id}/prefetchviewer, operatorwarm a model onto a node, or read that warm's state; ?node=<name> (required on GET). In the release after 0.3.6 the answer carries bytesPerSec and source (hub or mirror <url>) once the fetch ran, and fetch Jobs use the Hub mirror (HF_ENDPOINT) like workers do
GET, POST /api/v1/models/{id}/versionsviewer, operatorversions
POST /api/v1/models/{id}/versions/{v}/promote, …/archiveoperatormove a version's label
POST, DELETE /api/v1/models/{id}/versions/{v}/approveadminapprove or clear approval
GET /api/v1/models/{id}/versions/{v}/rollback/previewviewerwhat a version rollback would do
POST /api/v1/models/{id}/versions/{v}/rollbackoperatorroll endpoints back to a version
GET, PUT /api/v1/settings/model-approvalviewer, adminrequireApproval
GET, PUT /api/v1/settings/hub-tokenviewer, adminthe cluster's Hugging Face token (never returned)
curl -s -H "$H" "$CP/api/v1/models/validate?repo=Qwen/Qwen2.5-7B-Instruct-GGUF&file=qwen2.5-7b-instruct-q4_k_m.gguf"
curl -s -H "$H" -X POST "$CP/api/v1/models/qwen2.5-7b/prefetch?node=node-b"
curl -s -H "$H" "$CP/api/v1/models/qwen2.5-7b/prefetch?node=node-b"       # the warm's state

Nodes and capacity

Method and pathRolePurpose
GET /api/v1/nodesviewernodes with cards, holders, taints, host facts. In the release after 0.3.6, each node also carries addresses ([{type, address}] from the node's status), podCIDRs, podIPCapacity (usable pod IPs in those ranges), podIPsUsed (pods of every namespace holding a pod IP there, not on the host network and not finished; absent when the control plane could not list pods cluster-wide), rdmaAllocatable, and per NIC mtu, oper (up, down, unknown) and the rates rxBps, txBps, rxErrPerMin, txErrPerMin, rxDropPerMin, txDropPerMin, rateWindowSeconds. A rate is absent until two probe samples were read, and after a counter reset
GET /api/v1/capacity/ledgerviewerthe placer's ledger
GET /api/v1/capacity/fitsviewerhow many more of a model fit; ?model=
GET /api/v1/topology/flowviewerrequest flow from captured facts; ?since=<RFC 3339>. Each usage lane carries mode (push or pull) and lastSeenAt, the newest pull, push or push check, so an idle pushing leader does not read as stale
POST /api/v1/nodes/{name}/cordon, …/uncordonadmincordon
GET /api/v1/nodes/{name}/evacuate/previewadminwhat an evacuate or drain would move
POST /api/v1/nodes/{name}/evacuateadminmove our workloads
POST /api/v1/nodes/{name}/drainadminevacuate, then evict the rest; {confirm}
PATCH /api/v1/nodes/{name}/labelsadminchange opod.io/* labels
DELETE /api/v1/nodes/{name}adminremove a dead node
POST /api/v1/nodes/{name}/sharingadmintime-slice or budget
GET /api/v1/nodes/{name}/cache, POST …/cache/pruneadminpreview and prune the model cache. ?minAge=<duration> keeps files used more recently (default 24h, so a rollback finds its weights warm); POST …/cache/prune?dryRun=true answers the preview and removes nothing
GET, POST /api/v1/nodes/{name}/gpus/{index}/resetadminpreview and reset a card held outside opod
GET /api/v1/remnantsviewerobjects nothing owns; ?all=true
POST /api/v1/remnants/{id}/cleanadminclean one
POST /api/v1/nodes/{name}/reportnode tokenthe telemetry probe's push. In the release after 0.3.6 it answers 200 with {meshPeers}, the peers this node's probe measures next. In that release only a control plane outside its cluster is pushed to; one inside reads each probe itself (POST /v1/report on the probe pod's port 9147, signed with the node report token), so every replica sees every node
curl -s -H "$H" "$CP/api/v1/capacity/fits?model=qwen2.5-7b"
curl -s -H "$H" "$CP/api/v1/topology/flow?since=2026-10-30T08:00:00Z"
curl -s -H "$H" "$CP/api/v1/nodes/node-b/cache?minAge=72h"                  # what a prune would remove
curl -s -H "$H" -X POST "$CP/api/v1/nodes/node-b/cache/prune?minAge=72h"
curl -s -H "$H" "$CP/api/v1/remnants?all=true"

Compatibility and fabric

Method and pathRolePurpose
GET /api/v1/compatviewerthe engine × vendor capability graph; from the release after 0.3.6 also options[]: per engine and vendor, whether each gated endpoint-form choice (the cpu, auto, disk and peer KV tiers, a prefill/decode role, kvEvents) is available, with the planner's code, reason, remedy and the Connectors port that fixes it (connect); and, in the release after 0.3.6, rows for every engine (engine: "") for what the install refuses — an InferencePool without its CRD, Gateway or picker; a gang across machines without the LeaderWorkerSet controller; replicas, an autoscaled max above 1 or a gang under workers.mtls=require; under KEDA a prefill/decode split or a second worker row with autoscale above its floor, and speculative decoding with a gang — where with: {field, value} names the other choice a refusal needs
GET /api/v1/compat/resolveviewerjudge one shape: ?vendor=&engine=&model=&tensor=&pipeline=&data=; &node=<name> judges it on that node (and takes its vendor); &crossNode=true asks for a shape across machines
GET /api/v1/compat/verifiedviewerproven paths
POST /api/v1/compat/verifiedoperatorrecord an integration proof (what opodcp verify sends)
GET /api/v1/compat/verified/historyviewerthe release after 0.3.6: every kept proof of one path, oldest first (the newest 50); ?pathKey= (required). [] for a path with none. A withdrawn path loses its history
DELETE /api/v1/compat/verifiedadminwithdraw a proof; ?pathKey=
GET, PUT /api/v1/fabric-policyviewer, adminthe RDMA bandwidth floor and proven domains
GET /api/v1/network/meshviewerthe release after 0.3.6: TCP connect round trips between the GPU probes over the pod network, once a minute: pairs[] with lossPct, rttP50Ms, rttP99Ms, and a DNS lookup per node. A pair not measured is absent. Empty where the probe does not run as the node agent
GET /api/v1/network/policiesviewerthe release after 0.3.6: the NetworkPolicies the control plane wrote, with their selectors and ingress rules
GET /api/v1/network/explainviewerthe release after 0.3.6: can a pod reach another on a port, answered from the NetworkPolicies of both namespaces; allowed is true, false or null (cannot be decided). Sends no packet. from and to are <namespace>/<pod>, or a namespace plus fromLabels / toLabels in kubectl -l form (app=x,role=y; present and empty = any pod); port (1–65535, required); protocol TCP (default), UDP or SCTP. 400 names what is wrong
GET /api/v1/imagesviewerevery configured image, its pin and signature
curl -s -H "$H" "$CP/api/v1/compat" | jq '.options[] | select(.engine=="vllm" and .value=="peer" and (.vendor // "")=="")'   # why peer is not selectable
curl -s -H "$H" "$CP/api/v1/compat/resolve?vendor=nvidia&engine=vllm&model=qwen2.5-32b&tensor=2"
curl -s -H "$H" "$CP/api/v1/compat/resolve?node=node-a&engine=vllm&model=qwen2.5-32b&tensor=2&pipeline=2&crossNode=true"
curl -s -H "$H" -X DELETE "$CP/api/v1/compat/verified?pathKey=nvidia/vllm/tp2-pp1-dp1/…"   # a pathKey from GET /api/v1/compat/verified
curl -s -H "$H" "$CP/api/v1/network/mesh"                                     # the release after 0.3.6
curl -s -H "$H" "$CP/api/v1/network/explain?from=team-a&fromLabels=app%3Dclient&to=opodcp/opodcp-ep-chat-leader-0&port=8080"   # the release after 0.3.6
curl -s -H "$H" "$CP/api/v1/compat/verified/history?pathKey=nvidia%2Fvllm%2Ftp1-pp2-dp1%2F…"     # the release after 0.3.6

Jobs and batches

Method and pathRolePurpose
GET, POST /api/v1/jobsviewer, operatorlist, submit
GET /api/v1/jobs/{id}, …/logsviewerread, log; ?tail=<lines> (default 200, at most 5000)
POST /api/v1/jobs/{id}/canceloperatorcancel
DELETE /api/v1/jobs/{id}operatordelete a finished job
GET /api/v1/batchesviewerbatch records
POST, GET /v1/files; GET /v1/files/{id}, …/contentoperator, viewer, or an endpoint keyOpenAI files; GET /v1/files?purpose=batch filters by purpose
POST, GET /v1/batches; GET /v1/batches/{id}; POST …/canceloperator, viewer, or an endpoint keyOpenAI batches; GET /v1/batches?limit=<n>&after=<id> pages the list (default 20, at most 100)
curl -s -H "$H" "$CP/api/v1/jobs/job_44a1/logs?tail=1000"
curl -s -H "Authorization: Bearer sk-orc-…" "$CP/v1/files?purpose=batch"
curl -s -H "Authorization: Bearer sk-orc-…" "$CP/v1/batches?limit=50&after=batch_0192"

Usage

Method and pathRolePurpose
GET /api/v1/usage/summaryviewertotals and per-endpoint, model, team, worker, job; ?since=<RFC 3339>; ?endpoint=<id> (repeatable) narrows it. ?until=<RFC 3339> (exclusive) is checked for its form on 0.2.1 but not applied; 0.3.0 applies it to every aggregate except rpm60, which is always the last hour
GET /api/v1/usage/exportoperatorCSV in a window: ?since=&until= (RFC 3339; until not before since)
GET /api/v1/usage/gpu-dailyviewerGPU-hours per UTC day, JSON or CSV: ?from=YYYY-MM-DD&to=YYYY-MM-DD&format=csv (or Accept: text/csv)
GET /api/v1/usage/streamsviewerhow each endpoint's usage arrives: endpoint, cursor, lastPullAt, lastError, lastBatch, leaderBoot, bootResets; and mode (push or pull), lastPushAt, lastSeenAt, pushBoot, pushSeq, missing (see below)
POST /otlp/v1/logsthe endpoint's admin tokena leader's usage push, not a user route (see below)
GET /api/v1/usage/retentionviewerthe window, the sink's lag
POST /api/v1/usage/sink/skipadminaccept that the sink never gets rows before ?before=
curl -s -H "$H" "$CP/api/v1/usage/summary?since=2026-10-01T00:00:00Z&endpoint=ep_7f3a&endpoint=ep_19bd"
curl -s -H "$H" "$CP/api/v1/usage/export?since=2026-10-01T00:00:00Z&until=2026-11-01T00:00:00Z" > usage-oct.csv
curl -s -H "$H" "$CP/api/v1/usage/gpu-daily?from=2026-10-01&to=2026-10-31&format=csv" > gpu-hours-oct.csv
curl -s -H "$H" -X POST "$CP/api/v1/usage/sink/skip?before=2026-10-15T00:00:00Z"

The usage push. POST /otlp/v1/logs and the push fields are new in 0.3.0. A leader from core v0.4.0 (feature usage_push) sends its usage records here as OTLP/HTTP protobuf, and the control plane pulls only a leader without that feature. The control plane renders the URL and the credential into every leader, so you never call this route yourself:

POST /otlp/v1/logs
Content-Type: application/x-protobuf
Authorization: Bearer <the endpoint's admin token>
X-Opod-Endpoint: <endpoint id>
AnswerMeaning
200Stored. A resend of the same (opod.leader.boot, opod.usage.seq) is one row. partialSuccess.rejectedLogRecords counts records with no key, which the leader drops.
400The body is not an ExportLogsServiceRequest. The leader drops the batch.
401, 404, 415Wrong token, unknown endpoint, not protobuf. The leader keeps the records and sends them again.
413The body is larger than 4 MiB; a leader sends at most 1 MiB.
503 + Retry-After: 10The control plane has just started and has not yet read the endpoint's workers. The leader sends again.

In GET /api/v1/usage/streams, mode is push or pull. lastSeenAt is the newest pull, push or push check: it says the lane works, because an idle pushing leader sends nothing. pushBoot and pushSeq are the leader boot and sequence last stored. missing counts the sequences of one boot that never arrived, which are the records the leader dropped at its queue's cap. The record is kept in the state store, so with replicas above 1 every replica answers the same, whichever one took the pushes or runs the pull. A leader restart loses what it held and shows as a new pushBoot, not in missing. A leader that pushed in the last 2 minutes is not pulled.

Alerts, audit and evidence

Method and pathRolePurpose
GET /api/v1/alerts, GET /api/v1/alerts/{id}vieweralerts; ?state=open|resolved|all, ?object=endpoints/<id> (exact), ?since=<RFC 3339>, ?limit=<n> (default 200)
POST /api/v1/alerts/{id}/ackoperatoracknowledge
GET, PUT /api/v1/alert-rulesviewer, adminyour alert rules (If-Match)
GET /api/v1/auditviewerthe audit record. ?source=leader|cp, ?type=<prefix>, ?q=<text> (case-insensitive, over type, subject, endpoint, actor and data), ?since= (RFC 3339 or a duration back from now: 24h, 7d), ?until=<RFC 3339> (inclusive cursor for older rows), ?limit= (default 200, at most 2000)
GET /api/v1/audit/exportoperatorCSV, with the same filters as GET /api/v1/audit
GET /api/v1/audit/verify, GET /api/v1/audit/chainadminwalk the chain, export it
POST /api/v1/audit/rebaseadmindeclare the chain verified from its head
GET, PUT /api/v1/audit/retention; PUT /api/v1/audit/keep-allviewer, adminaudit retention
GET /api/v1/evidence/ml-bomadminCycloneDX 1.6 ML-BOM of deployed models
GET /api/v1/evidence/retentionviewerlog retention against six months
curl -s -H "$H" "$CP/api/v1/alerts?state=open&object=endpoints/ep_7f3a&limit=20"
curl -s -H "$H" "$CP/api/v1/audit?source=cp&type=key.&q=ci-bot&since=24h"
curl -s -H "$H" "$CP/api/v1/audit?until=2026-10-29T10:12:00.512Z&limit=200"   # older rows
curl -s -H "$H" "$CP/api/v1/audit/export?type=auth.&since=30d" > auth-30d.csv

Connectors, licence, fleet and store

Method and pathRolePurpose
GET /api/v1/connectorsviewerevery port, its adapters and settings
POST /api/v1/connectors/{port}/verifyadmincheck the running adapter or a candidate
POST /api/v1/connectors/state/verifythe admin token, in setup modecheck a candidate database before you set it: {"fields": {"dsn": "postgres://…"}} → {port, ok, kind, detail}. Outside setup mode the {port} route above answers the same path
PUT /api/v1/connectors/{port}/settingsadminsave settings into the database; the replica that served it restarts (in the release after 0.3.6, every replica within about 15 s, and one following a run once that run ends, at most 3 min)
POST /api/v1/connectors/notifier/testadminsend a TEST alert to every sink
POST /api/v1/connectors/secrets/syncadminrecord every existing token in the secret store
GET, PUT /api/v1/licenceviewer, adminthe tier; install or clear a key
PUT /api/v1/licence/fleetadmin, fleet tokenthe fleet's licence fact
GET /api/v1/fleet/overviewviewerfleet mode only
GET /api/v1/backupadmina JSON-lines dump
POST /api/v1/restoreadminrestore a dump; ?wipe=1
curl -s -H "$H" "$CP/api/v1/backup" > opodcp-backup.jsonl
curl -s -H "$H" -X POST "$CP/api/v1/restore?wipe=1" --data-binary @opodcp-backup.jsonl

Events

GET /events is a server-sent event stream: event: <type> and data: {"ts","type","subject","data"}, with a heartbeat comment every 15 s. A browser authenticates with a stream ticket (?ticket=); a script sends the header. Types include endpoint.created, endpoint.updated, endpoint.deleted, plan.applied, status.changed, run.started, run.step, run.step-progress, run.finished, alert.fired, alert.resolved, alert.acked, licence.updated, model.added, model.deleted, key.created, key.revoked, auth.login, auth.login_failed, user.created, auth.user_deleted, endpoint.cert-renewed, endpoint.template-drift, connector.saved, connector.changed.

Last updated · Source: content/docs/control-plane-reference/api.mdx · View as Markdown