sk- key” to “I have
a file with the workflow output on disk”. Three calls:
POST /r/workflows/slug/{slug}/run— submit the task. Returns202 Acceptedwith thetask_id; the task runs asynchronously, so don’t assert on a200status.GET /r/tasks/{taskId}/events(SSE) orGET /r/tasks/{taskId}(polling) — wait for it to finish.GET /r/tasks/{taskId}/result— get a download URL.
sk- key, see
Generate an API key.
Discover a workflow
The workflow’sparameters array tells you which keys to send in
the run request.
slug@version (e.g. text-to-image@2) to pin to a specific
workflow snapshot.
End-to-end: SSE
The recommended path. The stream closes on terminal state.End-to-end: polling
Use this when SSE is impractical — restrictive networks, serverless functions with short timeouts, batch jobs that don’t need real-time progress.What to read next
Stream task events (SSE)
Full event-type reference and fallback strategy.
Upload input files
Workflows with file parameters take a
file_key from the
presign endpoint.Call a container service
Reach long-running services hosted on your team’s agents.
Webhooks
Push delivery of terminal events instead of holding a stream
or polling.
