Skip to content

Agent limits and safety boundaries

Updated 2026-11-04Try the web sample

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

Per-key limits
Per-key limits · Real app screen with web sample data · App labels are currently in Vietnamese

Before you start

  • Know which key, port and scopes your client uses.

Steps

  1. 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 as 429 rate_limited. Cancelled work already charged by Flow is not refunded.

  2. 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_limited with Retry-After. At most 8 requests per key may be in flight, including waits; excess concurrency returns 429 too_many_inflight.

    Long-poll waits are at most 50 seconds each, default 30: REST uses timeout, MCP uses timeout_sec. A returned nonterminal job means wait again, not resubmit.

  3. 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 Origin header, even empty, returns 403 origin_forbidden; Host must match 127.0.0.1:<current port> or localhost:<current port>, otherwise 421 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.

  4. Use public local files for MCP references

    flow_upload_reference.file_path must be an absolute local-drive path on Windows, for example C:\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.

  5. Respect upload and ownership limits

    Images are at most 20 MB; video at most 1 GB and requires explicit rights confirmation (rights_confirmed: true in MCP or X-Rights-Confirmed: true in 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.