Skip to main content

JSON output

The CLI prints JSON on stdout by default, so it composes with jq and shell pipelines.

Exit codes

Exit code 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:
The outputId is always returned, so you can always keep polling. A status response includes a pollAfterSeconds hint telling you when to check again.