OpenAPI Spec
Where to find the live OpenAPI document and how to generate clients from it.
The Flux server is a FastAPI app, so it ships an OpenAPI 3 document out of the box:
GET /openapi.json— the machine-readable spec.GET /docs— interactive Swagger UI.GET /redoc— Redoc UI.
All three are served at the same origin as the rest of the API; no extra configuration is required.
Generating clients
The spec is regenerated automatically on every release, so client code should be regenerated whenever you upgrade Flux. Recommended tooling:
openapi-generator— broad language coverage; good for typed clients in Java, Go, Rust, TypeScript.openapi-typescript— TypeScript types directly fromopenapi.json.- Bruno, Insomnia, Postman — import
openapi.jsonfor interactive request collections.
Example:
curl http://localhost:8000/openapi.json > flux-openapi.json
openapi-generator-cli generate -i flux-openapi.json -g typescript-fetch -o ./flux-client
Compatibility note
The spec reflects the routes registered by flux/server.py at startup, including conditional routes such as GET /metrics (only present when [flux.observability].prometheus_enabled = true). Regenerate the spec against a server that has the same configuration as your target deployment.