Local API
The OpenAPI spec.
On this page
Every endpoint, field and schema of the local REST API is in an OpenAPI 3 document. There are two copies:
- Your app serves the spec of the version you run at
http://127.0.0.1:10108/openapi.json(also/v1/openapi.json). It needs no token. - The website publishes the documented endpoints at
https://donutbrowser.com/openapi.json, so you can generate a client before you install the app.
The spec covers the REST API only. Remote MCP is JSON-RPC, described on the Remote MCP page.
Fetch the spec
curl -sS http://127.0.0.1:10108/openapi.json > openapi.jsonimport { writeFile } from "node:fs/promises";
const response = await fetch("http://127.0.0.1:10108/openapi.json");
await writeFile("openapi.json", await response.text());import json, requests
spec = requests.get("http://127.0.0.1:10108/openapi.json", timeout=10).json()
with open("openapi.json", "w") as f:
json.dump(spec, f, indent=2)Invoke-RestMethod -Uri "http://127.0.0.1:10108/openapi.json" |
ConvertTo-Json -Depth 100 |
Set-Content -Path "openapi.json"Generate a client
# TypeScript types
npx openapi-typescript http://127.0.0.1:10108/openapi.json --output donut-api.d.ts# Python client
openapi-generator-cli generate -i openapi.json -g python -o ./donut_client# Go client
go install github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@latest
oapi-codegen -package donut -o donut/client.go openapi.json# Rust client
openapi-generator-cli generate -i openapi.json -g rust -o ./donut-client-rsEvery /v1 call still needs the bearer token. See Authentication.
Explore it
Open the spec in Swagger UI, then paste your token in the Authorize dialog to call your own app:
docker run -p 8080:8080 \
-e SWAGGER_JSON=/openapi.json \
-v "$(pwd)/openapi.json:/openapi.json" \
swaggerapi/swagger-uiPostman and Insomnia import the same file as a collection.
Checked against the app on .