Skip to main content

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 Accepted immediately with the created record; progress arrives via WebSocket or by polling the record's GET endpoint. The record carries status, progress (0–100), and error_message.
  • Errors return structured JSON with an appropriate status code and a detail message.
  • Pagination: list endpoints accept ?page=1&limit=50 (or skip/limit) and return totals in the response body.

Common status codes

CodeMeaning in miStudio
200Success
201Resource created
202Background job accepted — track via WebSocket or polling
204Deleted / no content
404Resource not found
409Conflict — e.g., deleting a model that a training still references
410Endpoint removed — you're calling a deprecated path (hard-refresh the frontend)
422Validation error (FastAPI/Pydantic detail included)
503Dependent service unavailable — e.g., labeling LLM has no model loaded

Endpoint groups

GroupPrefixPage
Datasets & tokenization/datasetsDatasets
Models & activation extraction/modelsModels
SAE training/trainingsTrainings
SAE management/saesSAEs
Features & labeling(no prefix) /features, /extractions, /labelingFeatures & Labeling
Steering/steeringSteering
Circuits & clusters/circuits, /circuit-capture, /circuit-discovery, /validation-manifests, /cluster-profilesCircuits & Clusters
Neuronpedia export & push/neuronpediaNeuronpedia
System monitoring & task queue/system, /task-queue, /workersSystem
Templates & settings/*-templates, /settingsTemplates & Settings