Rosepetal API
This section documents three interfaces. Two belong to the Rosepetal API, the server side of a Rosepetal project: every project runs its own copy, with an HTTP API for the operations that have to run on the server, and the Platform MCP, an MCP server with 53 tools that let an AI assistant read and edit datasets, images, models and users. The third, the Flows MCP, is the MCP server of a Rosepetal controller: its 78 tools let an assistant work on the controller's Node-RED.
| Interface | Use it to | Start here |
|---|---|---|
| HTTP API | Generate the training CSV of a dataset, export images as a ZIP, move, copy or delete images in bulk, rewrite tags, share the results of a model, manage user accounts | Requests and responses |
| Platform MCP: the MCP server of a Rosepetal project | Let an assistant such as Claude list datasets, inspect images and metrics, upload images and annotations, launch trainings and manage users | Connecting a client |
| Flows MCP: the MCP server of a controller's Node-RED | Let an assistant read, change and deploy the flows, follow messages, read node statuses and the runtime log, commit with git, test dashboards in a headless browser, and read the NATS traffic and resource history of the controller | Connecting a client |
The HTTP API is not a complete data API: it has no route that lists datasets or reads an image, because the Rosepetal application reads and writes that data in the project's database directly. To read and edit data from outside the application, use the Platform MCP.
Base URLs
Each Rosepetal project is a Firebase project, and the API is deployed in it as two Cloud Functions that serve exactly the same routes:
| Function | Base URL | Time limit | Memory | Meant for |
|---|---|---|---|---|
api | https://europe-west1-<projectId>.cloudfunctions.net/api | 60 s | 1 GB | Short calls |
usapi | https://us-central1-<projectId>.cloudfunctions.net/usapi | 3600 s | 4 GiB | Long operations: exports, transfers, deletions, tag rewrites |
<projectId> is the id of the Firebase project of your Rosepetal installation.
The Flows MCP is not served by these functions: it runs on each controller. See Flows MCP server.
A call to ping shows that the API answers:
curl https://europe-west1-<projectId>.cloudfunctions.net/api/ping{ "data": { "pong": true } }Requirements
- The project id of the Rosepetal installation.
- For the HTTP API, a user account of that project: every call carries the ID token of a signed-in user. See Authentication.
- For the Platform MCP, the endpoint token of the project and a client that speaks MCP over HTTP. See Connecting a client.
- For the Flows MCP, the address of the controller, its MCP token, and a client that speaks MCP over Streamable HTTP. See Flows MCP server.
HTTP API
Paths are relative to the base URL of either function.
| Route | Purpose | Page |
|---|---|---|
GET /ping | Check that the API answers | This page |
POST /dataset/{datasetId}/csv | Generate the training CSV of a dataset | Datasets |
POST /dataset/{datasetId}/downloadZip | Export images as a ZIP and get a download link | Datasets |
POST /dataset/{datasetId}/operation | Move or copy images into a dataset | Datasets |
POST /dataset/{datasetId}/images/update | Assign division, tag, labeled flag or groups to many images | Datasets |
POST /dataset/{datasetId}/reviewaction | Accept or roll back the images waiting for review | Datasets |
POST /dataset/{datasetId}/deleteBulk | Delete images of a dataset | Datasets |
POST /dataset/{datasetId}/group/delete | Delete a group | Datasets |
POST /dataset/{datasetId}/delete | Delete a whole dataset | Datasets |
POST /dataset/{datasetId}/tag/update | Rename a tag or change its color or description | Tags |
POST /dataset/{datasetId}/tag/combine | Merge several tags into one | Tags |
POST /dataset/{datasetId}/tag/clear | Remove the annotations of some tags, or of all | Tags |
POST /dataset/{datasetId}/tag/delete | Delete a tag | Tags |
POST /image/{imageId}/delete | Delete one image | Images |
POST /image/thumbnails | Create the preview of images that have none | Images |
POST /model/share/create | Create a public link to the results of a model | Models |
GET /model/share/{token} | Read the results behind a share link | Models |
POST /model/{modelId}/delete | Delete a model | Models |
GET /user/list | List the user accounts | Users |
POST /user/create, /user/update, /user/delete | Create, change or delete a user account | Users |
POST /mcp | Platform MCP server | Connecting a client |
Operations over many images can report their progress while they run: see Progress of long operations. The pages of the HTTP API are listed in HTTP API.
Platform MCP
| Page | Contents |
|---|---|
| Connecting a client | Endpoint, token, client configuration, how results and errors come back, list of the 53 tools |
| Dataset tools | List and inspect datasets, tags and groups; create, update, convert and delete them |
| Image tools | Read images and comments; set division, tag and groups; upload images and box annotations; delete |
| Model tools | List models, read metrics, evaluation images and training logs; train, stop, share and delete |
| Project tools | Project configuration and settings, users and permission profiles |
Flows MCP
| Page | Contents |
|---|---|
| Flows MCP server | What it is, where it runs, requirements, endpoint, session, token, client configuration, how deploys and errors come back, list of the 78 tools |
| Flow tools | Read the flows and one tab; update, create, rename, disable and delete tabs; reload the flows; lint them |
| Node tools | Node types, schemas and help; find, read, create, update, move, delete and restart nodes; trigger inject nodes |
| Debugging tools | Node statuses, debug messages, recorded messages and traces, sending a test message to a node, the runtime log |
| Git tools | Status, history, branches and flow diff of the project; stage, commit, checkout, merge, fetch, pull, push, reset, discard |
| Browser tools | Capture a tab as the editor draws it; open, read, use and screenshot dashboards and other pages |
| NATS and metrics tools | Recorded and live NATS traffic, gaps and rates; resource history of the host and its containers |
| Controller and runtime tools | The agent guide, server and controller identity, live resources, Node-RED settings, context, code of installed modules |