Skip to main content

HTTP control API

Base path: /api/v1. All requests require Authorization: Bearer TOKEN. Mutations require operator or admin role; tenant/principal/audit administration requires admin. Cross-tenant resources return 404 to avoid existence disclosure. InferCrane publishes an executable OpenAPI 3.1 document at api/openapi.json. The Mintlify navigation generates interactive endpoint pages from the same document used to generate the Python and TypeScript low-level clients. CI compares every contracted method/path pair with the registered routes in internal/controlapi/api.go and rejects stale generated files. Errors are stable JSON objects:

Resources

Existing-target apply request:
An accepted mutation returns 202, an operation object, and a Location header. Repeating the same tenant, operation kind, and idempotency key returns the original operation. Diagnostics execute inside the control-plane process. The public CLI receives only check status, messages, and remediation; it never receives or opens the PostgreSQL URL or provider credentials. Non-success responses use one stable envelope:
Categories are authentication, authorization, validation, not_found, conflict, rate_limit, dependency, internal, or request. The mapping is deterministic from the HTTP status and error code. A retryable mutation must retain its original idempotency key.
The interactive API explorer targets the local server declared in the specification. Use it only against an InferCrane control plane you operate, and never paste production credentials into a shared browser session.