JSON output
The CLI prints JSON on stdout by default, so it composes withjq and shell pipelines.
Exit codes
| Code | Meaning |
|---|---|
0 | Success |
1 | General error |
2 | Usage error (bad flags or arguments) |
3 | Auth error (no or invalid credentials) |
4 | Timeout (work accepted but not finished in time) |
4 is not a failure: the generation was accepted and is still rendering. Poll it.
Cost preflight
Preview any cost for free. The preview takes the same parameters as the real call, so the quote matches the charge.Async and polling
generate runs a smart-wait of about 50s, then returns the finished asset or an outputId if the render is still going. To return immediately and poll yourself:
outputId is always returned, so you can always keep polling. A status response includes a pollAfterSeconds hint telling you when to check again.