Skip to content

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.

InterfaceUse it toStart here
HTTP APIGenerate 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 accountsRequests and responses
Platform MCP: the MCP server of a Rosepetal projectLet an assistant such as Claude list datasets, inspect images and metrics, upload images and annotations, launch trainings and manage usersConnecting a client
Flows MCP: the MCP server of a controller's Node-REDLet 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 controllerConnecting 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:

FunctionBase URLTime limitMemoryMeant for
apihttps://europe-west1-<projectId>.cloudfunctions.net/api60 s1 GBShort calls
usapihttps://us-central1-<projectId>.cloudfunctions.net/usapi3600 s4 GiBLong 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:

bash
curl https://europe-west1-<projectId>.cloudfunctions.net/api/ping
json
{ "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.

RoutePurposePage
GET /pingCheck that the API answersThis page
POST /dataset/{datasetId}/csvGenerate the training CSV of a datasetDatasets
POST /dataset/{datasetId}/downloadZipExport images as a ZIP and get a download linkDatasets
POST /dataset/{datasetId}/operationMove or copy images into a datasetDatasets
POST /dataset/{datasetId}/images/updateAssign division, tag, labeled flag or groups to many imagesDatasets
POST /dataset/{datasetId}/reviewactionAccept or roll back the images waiting for reviewDatasets
POST /dataset/{datasetId}/deleteBulkDelete images of a datasetDatasets
POST /dataset/{datasetId}/group/deleteDelete a groupDatasets
POST /dataset/{datasetId}/deleteDelete a whole datasetDatasets
POST /dataset/{datasetId}/tag/updateRename a tag or change its color or descriptionTags
POST /dataset/{datasetId}/tag/combineMerge several tags into oneTags
POST /dataset/{datasetId}/tag/clearRemove the annotations of some tags, or of allTags
POST /dataset/{datasetId}/tag/deleteDelete a tagTags
POST /image/{imageId}/deleteDelete one imageImages
POST /image/thumbnailsCreate the preview of images that have noneImages
POST /model/share/createCreate a public link to the results of a modelModels
GET /model/share/{token}Read the results behind a share linkModels
POST /model/{modelId}/deleteDelete a modelModels
GET /user/listList the user accountsUsers
POST /user/create, /user/update, /user/deleteCreate, change or delete a user accountUsers
POST /mcpPlatform MCP serverConnecting 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 ​

PageContents
Connecting a clientEndpoint, token, client configuration, how results and errors come back, list of the 53 tools
Dataset toolsList and inspect datasets, tags and groups; create, update, convert and delete them
Image toolsRead images and comments; set division, tag and groups; upload images and box annotations; delete
Model toolsList models, read metrics, evaluation images and training logs; train, stop, share and delete
Project toolsProject configuration and settings, users and permission profiles

Flows MCP ​

PageContents
Flows MCP serverWhat it is, where it runs, requirements, endpoint, session, token, client configuration, how deploys and errors come back, list of the 78 tools
Flow toolsRead the flows and one tab; update, create, rename, disable and delete tabs; reload the flows; lint them
Node toolsNode types, schemas and help; find, read, create, update, move, delete and restart nodes; trigger inject nodes
Debugging toolsNode statuses, debug messages, recorded messages and traces, sending a test message to a node, the runtime log
Git toolsStatus, history, branches and flow diff of the project; stage, commit, checkout, merge, fetch, pull, push, reset, discard
Browser toolsCapture a tab as the editor draws it; open, read, use and screenshot dashboards and other pages
NATS and metrics toolsRecorded and live NATS traffic, gaps and rates; resource history of the host and its containers
Controller and runtime toolsThe agent guide, server and controller identity, live resources, Node-RED settings, context, code of installed modules