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:

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:

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.