Calling Your Flow
How to call your published flow — sync vs async execution, error handling, and response format.
Once your flow is published and set as production, call it via the slug URL.
Sync Execution
Blocks until the flow completes. Best for flows that run in under 30 seconds.
Request
| Field | Type | Required | Description |
|---|---|---|---|
message | string | Yes | Primary input text |
parameters | object | No | Additional key-value parameters |
attachments | array | No | Media inputs (e.g. image URLs). See With Attachments below. |
block_overrides | object | No | Per-step field overrides |
Response (200)
Async Execution
Returns immediately with an execution ID. Best for long-running flows.
Response (202)
Polling for Results
Poll until status is completed or failed.
Step-Through (Pause Between Steps)
For UIs that show each step's output before continuing — or that let users edit a block's output / prompt mid-run — use the step-through endpoint:
The server stays stateless between calls; your client carries the cursor and accumulated outputs. See Step-Through Execution for the client loop and full TypeScript / Python examples.
With Attachments
Pass image URLs alongside message to feed media into vision-capable LLM blocks. Noukai never stores the bytes — your file lives on your CDN, S3 bucket, or any HTTPS host that OpenRouter can reach.
For the full attachment object schema, supported MIME types, error codes, and a deeper walkthrough see Using Attachments. The minimum example:
The block's model must support the attached MIME type. If it doesn't, the request is rejected with 400 MODEL_MIME_INCOMPATIBLE before any work runs. Use a vision-capable model on any LLM block that needs to see the image.
Versioned Calls
Call a specific version instead of the production version:
Error Handling
| Status | Meaning | Action |
|---|---|---|
| 200 | Success | Parse result |
| 202 | Accepted (async) | Poll for results |
| 401 | Unauthorized | Check API key |
| 404 | Flow not found | Verify slug and that flow is published |
| 422 | Validation error | Check request body format |
| 500 | Execution error | Check flow configuration |
A 200 response with "status": "failed" means the flow executed but encountered an error during processing. Check the result field for error details.