Skip to main content
A nested job is a child render whose output is automatically injected as a video or image layer into a parent composition. You define it inline as an asset of type: "job" inside the parent’s assets array - no separate API call required.

How It Works

When Nexrender sees an asset with type: "job", it:
  1. Creates the child job and starts rendering it
  2. Holds the parent in pending state until the child finishes
  3. Takes the child’s outputUrl and injects it into the layer specified by layerName in the parent composition
  4. Renders the parent
The creation response returns immediately with the parent job ID and a children array containing the child job IDs, so you can track either independently.

Basic Example

The simplest nested job: render a child composition and place its output into a layer called "PrecompLayer" in the parent.
The parent starts as pending. Once the child finishes, the parent is automatically promoted to queued and rendered.

Nested Job Asset Fields

Multiple Nested Jobs

You can include more than one nested job asset in a single parent. All children render in parallel - the parent waits for all of them before proceeding.
Regular assets (like the data asset above) and nested job assets can coexist in the same assets array.

Nesting Deeper

A child can have nested job assets of its own, so one request can describe a whole tree of renders. Each job waits for its own children, and the jobs at the bottom render first:
The creation response lists the children the same way, with each child’s own children inside it. A child that waits for children of its own starts as pending:
Each nx:genai function in an assets array is also a child job. It appears in children with "function": "nx:genai" and without outputUrl, because the generated file’s type is known only when generation finishes.

Limits

  • Depth: at most 4 levels of child jobs below the job you submit. A deeper request is refused with 400 and errorCode NESTED_JOB_ASSETS.
  • Size: at most 50 jobs in one tree, counting the job you submit and every nx:genai function. A larger request is refused with 400 and errorCode JOB_TREE_TOO_LARGE.
Nothing is created when a request is refused.

When a Child Job Fails

A child job that fails is retried like any other job. nx:genai jobs are the exception and are never retried. When a child has no retries left:
  • Its parent, and every job above it up to the job you submitted, fails with the error One of the child jobs failed after N attempts.
  • Jobs in the same tree that haven’t started yet are cancelled. Children that are already rendering finish on their own.
  • The job you submitted sends its webhook with the error. Child jobs have no webhook of their own.
To stop a whole tree yourself, cancel the job you submitted. See Cancelling Jobs.

Tracking a Nested Job

Track the parent job normally with GET /jobs/:id. The parent stays in pending while children are rendering and transitions to queued - then render:dorender - once all children complete. To check the child job specifically, use its ID from the children array in the creation response:

When to Use Nested Jobs

Nested jobs are useful when one composition depends on the rendered output of another:
  • A lower-third animation that needs to be composited into a final scene
  • A branded intro clip rendered from a separate template and inserted at the start
  • A data-driven chart rendered in isolation and dropped into a presentation layout
  • Any workflow where intermediate renders feed a final assembly composition
If you need to stitch multiple clips end-to-end rather than compositing them as layers, use a Join Job instead.

Join Jobs

Concatenate multiple rendered clips into a single output video

Tracking Renders

Poll status or receive a webhook when rendering completes