REST API Overview
miStudio's backend exposes a full REST API — everything the UI does, you can script. The interactive Swagger UI at http://<backend>:8000/docs is generated from the same code and is always current; these pages add organization and context.
Base URL
All endpoints are rooted at:
/api/v1
Through the standard nginx/ingress deployment this is same-origin with the frontend (e.g., http://mistudio.example.com/api/v1/datasets); hitting the backend directly, it's port 8000.
Conventions
- Async job pattern: endpoints that start heavy work return
202 Acceptedimmediately with the created record; progress arrives via WebSocket or by polling the record'sGETendpoint. The record carriesstatus,progress(0–100), anderror_message. - Errors return structured JSON with an appropriate status code and a
detailmessage. - Pagination: list endpoints accept
?page=1&limit=50(orskip/limit) and return totals in the response body.
Common status codes
| Code | Meaning in miStudio |
|---|---|
200 | Success |
201 | Resource created |
202 | Background job accepted — track via WebSocket or polling |
204 | Deleted / no content |
404 | Resource not found |
409 | Conflict — e.g., deleting a model that a training still references |
410 | Endpoint removed — you're calling a deprecated path (hard-refresh the frontend) |
422 | Validation error (FastAPI/Pydantic detail included) |
503 | Dependent service unavailable — e.g., labeling LLM has no model loaded |
Endpoint groups
| Group | Prefix | Page |
|---|---|---|
| Datasets & tokenization | /datasets | Datasets |
| Models & activation extraction | /models | Models |
| SAE training | /trainings | Trainings |
| SAE management | /saes | SAEs |
| Features & labeling | (no prefix) /features, /extractions, /labeling | Features & Labeling |
| Steering | /steering | Steering |
| Circuits & clusters | /circuits, /circuit-capture, /circuit-discovery, /validation-manifests, /cluster-profiles | Circuits & Clusters |
| Neuronpedia export & push | /neuronpedia | Neuronpedia |
| System monitoring & task queue | /system, /task-queue, /workers | System |
| Templates & settings | /*-templates, /settings | Templates & Settings |