Everything the UI does goes through this API, so anything you can see you
can script. Generated from the app's own OpenAPI schema by
scripts/gen_api_docs.py — run it after adding a route.
Base URL: http://127.0.0.1:5900. Interactive docs: /docs.
GET /ws/generate (WebSocket). Send {"prompt": "..."} and receive
{"type":"token","text":"..."} frames, then one {"type":"done"}.
A generation that fails mid-stream sends {"type":"error","message":...} —
it does not silently close as a success.
you asked for something in the wrong order, or a dependency is down. The body has an actionable message.
413
the upload was larger than the limit — a .mri is not that big, so it is probably not one.
422
the request was malformed, the model is gated and you have not accepted its licence, a custom adapter could not be loaded, or a session file could not be read.
There is deliberately no 500 path for ordinary failures: an unreachable
Ollama, a stalled download, an out-of-memory load and a user's adapter
raising on import all return a status that says what happened.