Run nodes
Needs a key withworkflows:run
Runs nodes of a workflow in the background. Each node runs count times (per item, when an iterator or a splitter feeds it) and adds that many results to the ones it has; its results show up pending at once. Only the nodes asked for run: what's upstream (one hop, and one more past a Router) is read as the result it shows and never run again. Nodes of the run that feed each other run in dependency order.
A run is refused with 409 RUN_REFUSED when a node asked for is already running, a required input isn't connected, or something upstream is still processing, has failed or has nothing to give (data.code says which, data.nodeIds names the nodes). An auto version of the workflow is saved with every run.
The response is 202 Accepted with the run. Follow it with GET /workflows/{workflowId}/events, or poll GET /workflow-runs/{runId}.
Requires scope workflows:run.
apiKeyx-api-key<token>An API key of your workspace (rmg_…), created in the web app. It acts for that workspace, not for a person, and keeps working when its creator leaves.
workflowId*string1 <= length <= 128Idempotency-Key?stringMakes the request safe to retry: send a unique value (a UUID, say). The same request sent again with the same key within 24 hours gets the first one's response back, and nothing runs or is charged twice. Reusing a key for a different request, or while the first is still running, is 409 CONFLICT. A request that fails frees its key.
1 <= length <= 255application/json- body
count?integerHow many results each node makes (per item, when an iterator or a splitter feeds it), 1–20.
1 <= value <= 201fromDraft?Render final: run the one Video node in nodeIds as the final (1080p, billed in full) of its draft result resultId, rather than with its settings. Drafts can be rendered for 7 days.
idempotencyKey?stringSend the same key again (a retry after a timeout) and you get the run the first request started, not a second one.
1 <= length <= 200nodeIds*array<>The nodes to run (node, selection), or the Sections whose runnable nodes run (section).
1 <= items <= 500pageId?stringThe page they're on; the first page when left out.
1 <= length <= 128priceVersion?integerThe price book version (GET /pricing) your estimate came from. If prices went up since, the run is refused with 409 PRICE_CHANGED and its new estimate, rather than charged more than you showed.
0 <= valuerunType?string"node""node""selection""section"Accepted: the run is going.
application/json- response
One run of nodes of a workflow.
completedAt*|nullcount*integercreatedAt*stringdate-timecreditsEstimated*integerWhat the run was estimated to cost when it started: Σ per node of one result's price × count × items.
creditsSpent*integerWhat its results have cost so far (refunds taken off).
error*string|nullid*stringnodeIds*array<string>The nodes it runs, each after the ones of them it reads.
pageId*stringresults?array<>Its results so far (with the run on its own).
runType*string"node""selection""section"status*stringrunning → completed (every result finished), failed (some really failed), cancelled (stopped, nothing kept) or stopped (stopped, or some results cancelled, with what was kept said in error: results already rendering finish and are charged).
"running""completed""failed""cancelled""stopped"workflowId*stringcurl -X POST 'https://api.remagica.com/api/v1/workflows/cb35dcdb-5b3d-4f60-8e2a-1d9c6b4f7e05/runs' \ -H 'Content-Type: application/json' \ -d '{ "nodeIds": [ "string" ]}'{ "completedAt": "2026-10-21T12:00:00.000Z", "count": 1, "createdAt": "2026-10-21T12:00:00.000Z", "creditsEstimated": 12, "creditsSpent": 12, "error": null, "id": "8e41b2d7-0c5f-4a93-b6e2-1f7d9a3c5b08", "nodeIds": [ "string" ], "pageId": "c5dd13a6-5b3d-4f60-8e2a-1d9c6b4f7e05", "results": [ { "createdAt": "string", "credits": 12, "error": null, "id": "a5614527-5b3d-4f60-8e2a-1d9c6b4f7e05", "outputs": {}, "provider": "string", "runId": "599e5591-5b3d-4f60-8e2a-1d9c6b4f7e05", "settings": {}, "status": "pending", "stop": "kept", "item": 1, "nodeId": "7b79be4b-5b3d-4f60-8e2a-1d9c6b4f7e05", "variation": 1 } ], "runType": "node", "status": "running", "workflowId": "cb35dcdb-5b3d-4f60-8e2a-1d9c6b4f7e05"}