Skip to content

Local API

Authenticate to the local API.

On this page

Every request to a /v1 route must carry the API token as a bearer token. The desktop app makes the token and keeps it on your computer.

Authorization: Bearer <token>

Where to find the token

Open Integrations (Cmd/Ctrl+I) → Local API. The tab has the Enable Local API Server switch, the Port, the Authentication Token with a copy button, and an example request. More examples opens ready requests in cURL, JavaScript and Python with your token filled in; keep copies of them private.

Integrations page, Local API tab. Enable Local API Server is on and running on http://127.0.0.1:10108. Port 10108 with Save, a masked authentication token with show and copy buttons, an example curl request, and a Connection test with the steps Configured, Reachable and Credential accepted.
The local REST API: port, token and a ready-to-run example.

Export it

# ~/.zshrc or ~/.bashrc
export DONUT_API_KEY="<token>"

Send it

curl -sS http://127.0.0.1:10108/v1/profiles \
  -H "Authorization: Bearer $DONUT_API_KEY"

/openapi.json and /v1/openapi.json need no token.

What the token grants

One token opens every /v1 route. Anyone with it can create and delete profiles, read cookies and, on Pro, launch and drive browsers. The server listens on 127.0.0.1 only, so a caller must already run on your computer. On a shared computer, keep the token out of shell history and shared scripts.

This token opens the local API only. Remote MCP uses a dmk_ credential instead; see Remote MCP.

Errors

StatusMeaning
401The Authorization header is missing, or the token is wrong. The body is empty.
402The route needs a plan you do not have, for example run without Pro.
403The Wayfern terms are not accepted yet. Accept them in the app.
429An automation route passed the hourly limit. Wait for the Retry-After seconds.

Check the status code: the 401 body is empty.

Checked against the app on .