Docs › Reference

OpenAPI spec

|

The desktop app serves a machine-readable OpenAPI 3 spec at http://127.0.0.1:10108/openapi.json while the local API is running.

Fetch the spec

curl -sS http://127.0.0.1:10108/openapi.json \
  -H "Authorization: Bearer $DONUT_API_KEY" -o openapi.json

Codegen recipes

TypeScript (openapi-typescript)

npx openapi-typescript openapi.json -o ./src/api.d.ts

Python (openapi-generator)

openapi-generator generate -i openapi.json -g python -o ./donut-client

Rust (utoipa — same stack as the app)

The spec is generated from the same utoipa annotations as the running server — what you fetch from /openapi.json is always in sync with your installed app version.