Flows - Run a flow
Triggers the execution of a flow. Provide values for all required inputs defined in the flow’s definition (see the GET endpoint).
The inputs object maps each input’s api_key (recommended) or its id (UUID, legacy) to its value:
| Input Type | Accepted Values |
|---|---|
creation | Image URL (https://...), base64-encoded image string, or existing creation identifier |
text | Plain text string |
number | Numeric value |
select | Value from allowed options |
This endpoint is asynchronous. It returns immediately with status: "running" and a
workflow_run_identifier. Provide a webhook URL to receive notifications when the execution
completes. The webhook receives two events: initialized (run started) and finished/failed (run completed).
The webhook payload for a completed run includes a result object containing images, videos,
and audios arrays with download URLs for the generated assets.
Authorizations
Your Magnific API key. Required for authentication. Learn how to obtain an API key
Path Parameters
Short unique identifier (sqid) of the flow to execute. Discover flow identifiers via GET /v1/ai/flows.
"uqzQLDr2Aw"
Body
Map of input identifier to value. Use each input's api_key (recommended) or its id (UUID, legacy) as the key — both are accepted.
Value types by input type:
creation(image/media): URL string, base64-encoded string, or existing creation sqidtext: Plain text stringnumber: Numeric valueselect: Value from allowed options
Optional callback URL that receives status notifications during execution.
The webhook receives POST requests with the event payload (see webhook event schema).
Events are sent when the run starts (initialized) and when it finishes (finished or failed).
"https://www.example.com/webhook"
Response
Accepted - Flow execution started. Use the webhook to receive results.