Every recipe below targets the same workflow run lifecycle:Documentation Index
Fetch the complete documentation index at: https://docs.noxus.ai/llms.txt
Use this file to discover all available pages before exploring further.
- Async create —
POST /v1/workflows/{workflow_id}/runsreturns immediately with a run id. - Sync create —
POST /v1/workflows/{workflow_id}/runs/syncblocks server-side and returns the output. - Poll —
GET /v1/workflows/{workflow_id}/runs/{run_id}. - Stream —
GET /v1/runs/{run_id}/events(Server-Sent Events).
workflow_id and your_api_key. The body’s input keys are your
workflow’s input-node labels (or IDs).
Create a run and wait for the result
Simplest option — blocks until the run finishes. Best for short, interactive
flows. Avoid it for long-running or highly parallel workloads, where it ties
up a connection for the whole run.
Create a run and poll
Create asynchronously (returns a run id immediately), then check the run’s
status at your own cadence. The right default for long-running flows or when
launching many runs in parallel — your process never blocks on a single run.
Create a run and stream events (SSE)
Streams progress over Server-Sent Events as each node finishes. Best for live
UIs and long flows where you want incremental feedback instead of one final
payload. Each event has a
type and a data payload; the stream ends when
the run reaches a terminal state.Async / await with the SDK
Every SDK method has an
a-prefixed coroutine variant (aget, arun,
a_wait, arefresh, astream, arun_and_stream). Use them inside an async
application so the event loop is never blocked.Python SDK
Sending files as inputs
If a workflow has a File, Image, or Audio input node, pass that input as an object with auri (and ideally a name) instead of a string.
Three shapes are accepted:
- Public URL —
{"uri": "https://…", "name": "…"}. Noxus downloads it server-side and stores a copy. The URL must be publicly reachable; private, loopback, and cloud-metadata addresses are rejected, and downloads are capped at 25 MB. - Base64 data URI —
{"uri": "data:<mime>;base64,<data>", "name": "…"}. Noxus decodes and stores it. Best for files you can’t expose over a URL. - Existing Noxus file —
{"uri": "spot://<file-id>", "name": "…"}, where the id comes from a priorPOST /v1/fileupload.
"Document"); everything else in the
body works exactly like the recipes above (wait, poll, or stream).
Webhooks (fire-and-forget)
Pass acallback_url when creating a run and Noxus will POST the result to it
when the run reaches a terminal state — no polling or streaming needed.