OpenAPI Spec
The Rensei OpenAPI 3.x spec and the interactive API reference it generates.
Rensei's REST surface is described by the platform's executable OpenAPI 3.1.2 registry. The registry generates platform/public/openapi.json; this docs repo copies that artifact to openapi/rensei-api.json and generates the interactive API reference from it. There is no separately authored docs contract.
What the spec covers
| Tag | Surface |
|---|---|
| Workflows, Projects, Org | Management routes for workflows, projects, invitations, requester registrations, and API keys |
| Worker Protocol | /api/daemon/*, /api/workers/*, /api/sessions/* - registration, poll, heartbeat, session lifecycle |
| Sessions (Public) | /api/public/* - org-scoped stats, session list/detail, prompt/stop |
| Authentication | /api/oauth/token M2M grant + API key management |
| A2A | /.well-known/agent-card.json discovery + dispatch listing |
| Webhooks | /api/webhooks/ingest/[provider] HMAC ingest |
| Audit | Audit events + /.well-known/audit-keys JWKS |
| MCP | The JSON-RPC tool endpoint |
Browse it at API Reference, or start from the prose guides:
API Overview
Auth mechanisms and full route-group map.
Worker Protocol
Registration, poll, heartbeat, session lifecycle - the self-hoster reference.
Public Sessions API
Org-scoped stats and session endpoints.
A2A Protocol
Agent discovery and dispatch.
MCP Tool Endpoint
JSON-RPC tool surface for agents.
Webhook Ingest
HMAC-verified ingest gateway.
How it stays fresh
- Platform generation is deterministic. Its drift gate compares a fresh registry build with
public/openapi.json, checks scopes and security scheme shapes, and verifies every documented method against a current Next route export. - The weekly docs routine runs
pnpm sync:openapiagainstplatform/public/openapi.json. It copies the artifact, regenerates reference pages, and refreshes the docs map andllms.txttogether. - Docs CI regenerates the API reference and fails if the checked-in pages differ from the canonical copy.
Do not edit openapi/rensei-api.json or generated reference pages directly. Change the platform registry, run the platform OpenAPI gate, then run pnpm sync:openapi here.