Production lifecycle (API)
A production is asynchronous: you submit it, JARAI runs the pipeline over several minutes, and the deliverables become available when it finishes. This page covers how to drive that lifecycle from your own code. Exact endpoints and schemas are in the Developer Portal.
Prefer to read? Open the step-by-step transcript
- Submit a production (project type, theme, avatar(s), options) → you get an id + initial status.
- JARAI runs the 15-step pipeline asynchronously.
- Track it: poll the status endpoint, or register a webhook.
- On the terminal “ready” status, fetch the deliverables (assets + attribution).
1. Submit
Section titled “1. Submit”POST a production request describing what you want (project type, content theme, avatar selection, and any overrides). The response includes the production’s identifier and an initial status. Keep the identifier — every later call uses it.
2. Track — polling vs webhooks
Section titled “2. Track — polling vs webhooks”Pick whichever fits your architecture:
- Polling — call the production’s status endpoint on an interval. The reference recommends every 5 seconds for the first 2 minutes, then every 30 seconds. Simple; good for scripts and low volume.
- Webhooks — register an endpoint and let JARAI POST you a notification when the production’s status changes. Efficient; preferred for production systems and higher volume. Verify the callback’s authenticity and respond
2xxquickly (do heavy work asynchronously on your side).
3. Status states
Section titled “3. Status states”Productions move through a sequence that mirrors the pipeline. At the API level the states you care about are: queued/running (keep waiting), a review/awaiting state (the deliverables exist and may await approval), a terminal ready/published state (collect deliverables), and a failed state (inspect the error).
4. Collect deliverables
Section titled “4. Collect deliverables”When the production is ready, fetch its packaged deliverables — the produced assets (video/audio/text), platform variants, and the attribution package (sources and licences for everything used). Persist what you need on your side.
Idempotency & retries
Section titled “Idempotency & retries”The pipeline is idempotent step-by-step, and transient failures retry automatically server-side. On your side:
-
Retry transient HTTP errors (
5xx, timeouts) with backoff — they’re usually momentary. -
Don’t auto-retry
4xx— those are permanent (bad request, auth, budget). Fix the cause first. -
Make submission safe to retry — send an
Idempotency-Keyheader (any unique string you generate per production request) when you submit. If you retry with the same key, JARAI returns the production it already created instead of creating a duplicate.
© 2026 JARAI STUDIO Ltd. All rights reserved.