Agent limits and safety boundaries
Understand per-key budgets, request limits, local-only access and safe reference file paths.

Before you start
- Know which key, port and scopes your client uses.
Steps
Budget for committed work, not just finished jobs
The daily credit cap is per key and uses the local day. A cap of 0 disables the cap. Before admitting work, the app counts submitted credits plus queued/running estimates and the new estimate; exceeding the cap returns
429 daily_cap. This is not the same as429 rate_limited. Cancelled work already charged by Flow is not refunded.Pace requests and bound waits
REST and MCP share a sliding-window limit of 60 requests per minute per key. Excess requests return
429 rate_limitedwithRetry-After. At most 8 requests per key may be in flight, including waits; excess concurrency returns429 too_many_inflight.Long-poll waits are at most 50 seconds each, default 30: REST uses
timeout, MCP usestimeout_sec. A returned nonterminal job means wait again, not resubmit.Keep the network boundary intact
The HTTP server binds 127.0.0.1 only, never 0.0.0.0. Every request is checked before health/schema or authentication: any
Originheader, even empty, returns403 origin_forbidden; Host must match127.0.0.1:<current port>orlocalhost:<current port>, otherwise421 host_mismatch. Replies provide no CORS permission headers.A cloud client cannot reach your PC’s loopback. Do not expose the port, add a proxy as an assumed supported connection, or disable browser protections.
Use public local files for MCP references
flow_upload_reference.file_pathmust be an absolute local-drive path on Windows, for exampleC:\Users\You\Pictures\reference.png. Relative paths, UNC/network paths, device paths, NUL characters and NTFS alternate data streams are rejected.The server resolves links and rejects files inside app data or Library folders. It requires a regular file, rechecks identity and reads through the checked handle; a changed file can return
409 file_changed. Copy your intended reference to a normal user folder outside app-owned storage. Do not point an agent at private profile or key data.Respect upload and ownership limits
Images are at most 20 MB; video at most 1 GB and requires explicit rights confirmation (
rights_confirmed: truein MCP orX-Rights-Confirmed: truein REST). MCP base64 upload accepts images only; video uses local file_path or REST raw upload. Ordinary REST JSON bodies are limited to 256 KB.Keys cannot read another key’s or the UI’s jobs, references or outputs. Characters are shared. Prefer your own input files and stable request IDs; see REST API and API keys.
When it worked
Your client stays local, respects per-key limits, waits without duplicate jobs and uploads only allowed owned references.
If something goes wrong
Why is there a 429 with few requests?
Read code: daily_cap is a credit budget, too_many_inflight is concurrent requests, and rate_limited is the one-minute request window. Only retry after addressing the relevant limit.
Why is an existing file refused?
Check for a network/device/relative path, alternate stream, app-private or Library target after link resolution, wrong media type, missing video rights confirmation or a file changed while reading.
