This is the practical API reference most developers need.
Base URL in the default local setup:
http://localhost:5001
Important note: MiroFish does not expose built-in API auth in the upstream backend routes. Treat the API as internal unless you add your own access control layer.
Most backend endpoints return JSON in one of these shapes:
{
"success": true,
"data": {}
}{
"success": false,
"error": "..."
}For copy-paste examples, see api-recipes.md.
| Method | Path | Use it for |
|---|---|---|
GET |
/health |
Confirm the backend is alive before debugging anything else |
| Method | Path | Use it for |
|---|---|---|
POST |
/api/graph/ontology/generate |
Upload seed files and generate ontology |
POST |
/api/graph/build |
Build graph from the project/ontology |
GET |
/api/graph/task/<task_id> |
Poll graph build task |
GET |
/api/graph/project/<project_id> |
Read one project |
GET |
/api/graph/project/list |
List projects |
DELETE |
/api/graph/project/<project_id> |
Delete one project |
POST |
/api/graph/project/<project_id>/reset |
Reset a project |
GET |
/api/graph/data/<graph_id> |
Read graph data |
DELETE |
/api/graph/delete/<graph_id> |
Delete graph data |
Verified from backend docstring and frontend client:
- request type:
multipart/form-data - main fields:
filessimulation_requirementproject_nameadditional_context
Frontend-verified fields:
project_idgraph_name
| Method | Path | Use it for |
|---|---|---|
POST |
/api/simulation/create |
Create a simulation record |
POST |
/api/simulation/prepare |
Generate profiles and config |
POST |
/api/simulation/prepare/status |
Poll preparation progress in the current frontend integration |
GET |
/api/simulation/<simulation_id> |
Read one simulation |
GET |
/api/simulation/list |
List simulations |
GET |
/api/simulation/history |
List recent historical simulations |
POST |
/api/simulation/start |
Start a run |
POST |
/api/simulation/stop |
Stop a run |
POST |
/api/simulation/env-status |
Check environment status |
POST |
/api/simulation/close-env |
Close the environment cleanly |
Frontend-verified fields:
project_idgraph_idenable_twitterenable_reddit
Frontend-verified fields:
simulation_identity_typesuse_llm_for_profilesparallel_profile_countforce_regenerate
Frontend-verified fields:
simulation_idplatformmax_roundsenable_graph_memory_updateforce
| Method | Path | Use it for |
|---|---|---|
GET |
/api/simulation/<simulation_id>/profiles |
Read generated profiles |
GET |
/api/simulation/<simulation_id>/profiles/realtime |
Read profiles while generation is still happening |
GET |
/api/simulation/<simulation_id>/config |
Read simulation config |
GET |
/api/simulation/<simulation_id>/config/realtime |
Read config while generation is still happening |
GET |
/api/simulation/<simulation_id>/config/download |
Download generated config |
GET |
/api/simulation/script/<script_name>/download |
Download generated scripts |
GET |
/api/simulation/<simulation_id>/run-status |
Run status |
GET |
/api/simulation/<simulation_id>/run-status/detail |
Detailed run status |
GET |
/api/simulation/<simulation_id>/actions |
Action history |
GET |
/api/simulation/<simulation_id>/timeline |
Timeline by rounds |
GET |
/api/simulation/<simulation_id>/agent-stats |
Agent statistics |
GET |
/api/simulation/<simulation_id>/posts |
Posts from the run |
GET |
/api/simulation/<simulation_id>/comments |
Comments from the run |
POST |
/api/simulation/interview |
Interview a single agent |
POST |
/api/simulation/interview/batch |
Batch interview agents |
POST |
/api/simulation/interview/all |
Interview all agents |
POST |
/api/simulation/interview/history |
Read interview history |
| Method | Path | Use it for |
|---|---|---|
POST |
/api/report/generate |
Start report generation |
POST |
/api/report/generate/status |
Poll generation status |
GET |
/api/report/<report_id> |
Read report details |
GET |
/api/report/by-simulation/<simulation_id> |
Find report by simulation |
GET |
/api/report/list |
List reports |
GET |
/api/report/<report_id>/download |
Download markdown report |
DELETE |
/api/report/<report_id> |
Delete report |
POST |
/api/report/chat |
Chat with the report agent |
GET |
/api/report/<report_id>/progress |
Read report progress |
GET |
/api/report/<report_id>/sections |
Read all generated sections |
GET |
/api/report/<report_id>/section/<section_index> |
Read one generated section |
GET |
/api/report/check/<simulation_id> |
Check report status by simulation |
GET |
/api/report/<report_id>/agent-log |
Incremental agent log |
GET |
/api/report/<report_id>/agent-log/stream |
Stream agent log |
GET |
/api/report/<report_id>/console-log |
Incremental console log |
GET |
/api/report/<report_id>/console-log/stream |
Stream console log |
POST |
/api/report/tools/search |
Graph-aware search tool |
POST |
/api/report/tools/statistics |
Graph statistics tool |
Frontend-verified fields:
simulation_idforce_regenerate
Backend-verified fields:
task_idsimulation_id
Frontend-verified fields:
simulation_idmessagechat_history
Two status endpoints are especially important for custom clients:
POST /api/simulation/prepare/statusPOST /api/report/generate/status
For both, prefer sending a JSON body with the current task_id, and optionally the related simulation_id.
For a custom integration, the practical order is:
POST /api/graph/ontology/generatePOST /api/graph/buildGET /api/graph/task/<task_id>POST /api/simulation/createPOST /api/simulation/prepare- poll preparation status
POST /api/simulation/start- inspect run endpoints
POST /api/report/generatePOST /api/report/generate/statusPOST /api/report/chat
Payload shapes above were verified against the upstream frontend API clients and backend route docstrings on 2026-04-16.
If you are building a serious integration, read the latest upstream files in:
frontend/src/api/*.jsbackend/app/api/*.py
One specific thing to double-check in your own environment: the preparation-status polling flow shows a small source-level mismatch between backend comments and frontend usage, so verify the live behavior before hard-coding an external client.
Also note:
the report-status route is currently registered as POST in the backend source, so do not assume query-string GET polling unless you have verified your exact deployed build.