> ## Documentation Index
> Fetch the complete documentation index at: https://www.nexrender.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Initiating Renders

> Learn how to initiate render jobs in Nexrender Cloud by sending a POST /jobs request. Includes full payload structure, asset injection, settings, preview mode, uploading results and webhook support. 

## Submit the Job

Submit the job with a simple POST request:

<CodeGroup>
  ```javascript Simple Job theme={null}
  curl -X POST https://api.nexrender.com/api/v2/jobs \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "template": {
        "id": "01JTGM9GCR71JV7EJYDF45QAFD",
        "composition": "main"
      },
      "assets": [
        {
          "type": "text",
          "layerName": "title",
          "value": "Hello World!"
        }
      ]
    }'
  ```

  ```javascript Simple Job (with settings + upload) theme={null}
  curl -X POST https://api.nexrender.com/api/v2/jobs \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "template": {
        "id": "01JTGM9GCR71JV7EJYDF45QAFD",
        "composition": "main"
      },
      "settings": {
        "type": "video",
        "quality": "full",
        "codec": "video_h264_vbr_15mbps"
      },
      "upload": {
        "provider": "s3",
        "prefix": "marketing/campaign-42/",
        "outputUrl": "https://videos.ourcompany.com",
        "params": {
          "region": "us-east-1",
          "bucket": "nexrender-outputs",
          "accessKeyId": "${secrets.S3_KEY_ID}",
          "accessKeySecret": "${secrets.S3_KEY_SECRET}"
        }
      }
    }
  ```
</CodeGroup>

### Job Request Expected Response

<CodeGroup>
  ```json Expected Response theme={null}
  {
    "id": "01JTRDF7HCR8QAHYW8GPCP4S9Y",
    "status": "queued",
    "progress": 0,
    "stats": {
      "createdAt": "2025-05-14T12:00:00.000Z"
    },
    "outputUrl": "https://nx1-outputs-eu.nexrender.com/01K4B3YH2GP215NAWCZX42S2GH/outputs/01K4B3YH6H97ASTA8DS3MX8P8B.mp4"
  }
  ```
</CodeGroup>

### Job Request Internals

| Field                           | Type    | Required | Description                                                                  |
| ------------------------------- | ------- | -------- | ---------------------------------------------------------------------------- |
| `template.id`                   | string  | 🟢       | ID of the template created earlier                                           |
| `template.composition`          | string  | 🟢       | Composition to render (optional for **.mogrt**)                              |
| `assets`                        | array   | 🟢       | List of asset overrides                                                      |
| `preview`                       | boolean | ⚪        | Set `true` for fast low-res preview                                          |
| `fonts`                         | array   | ⚪        | List of font **file names** to include in render environment                 |
| `webhook.url`                   | string  | ⚪        | Callback endpoint for job status                                             |
| `webhook.method`                | string  | ⚪        | Typically `POST`                                                             |
| `webhook.headers`               | object  | ⚪        | Extra HTTP headers to send with webhook                                      |
| `webhook.data`                  | object  | ⚪        | Custom JSON payload attached to webhook                                      |
| `webhook.custom`                | boolean | ⚪        | If `true`, webhook will send **only** custom data (no system metadata)       |
| `settings.type`                 | string  | ⚪        | Output type: `video`, `image` or `aep`                                       |
| `settings.frames`               | int/arr | ⚪        | Single frame (`int`) or frame range (`[start, end]`) for still/image render  |
| `settings.quality`              | string  | ⚪        | Render quality: `draft` or `full`                                            |
| `settings.codec`                | string  | ⚪        | Output codec (e.g. `video_h264_vbr_15mbps`, `video_prores_422`, `image_png`) |
| `settings.engine`               | string  | ⚪        | After Effects engine version: `ae2025` or `ae2026` (default: `ae2026`)       |
| `upload.prefix`                 | string  | ⚪        | Folder path prefix for uploaded outputs (e.g. `my-project/outputs/`)         |
| `upload.outputUrl`              | string  | ⚪        | Custom base URL for accessing uploaded files                                 |
| `upload.provider`               | string  | ⚪        | Storage provider (`s3` only at present)                                      |
| `upload.params.endpoint`        | string  | ⚪        | S3-compatible endpoint (default: `https://s3.amazonaws.com`)                 |
| `upload.params.region`          | string  | 🟢\*     | Cloud storage region                                                         |
| `upload.params.bucket`          | string  | 🟢\*     | Target bucket name for file uploads                                          |
| `upload.params.acl`             | string  | ⚪        | Access control (`public-read`, `private`)                                    |
| `upload.params.accessKeyId`     | string  | 🟢\*     | Access key ID for storage provider                                           |
| `upload.params.accessKeySecret` | string  | 🟢\*     | Secret key for storage provider                                              |

🟢 = Required parameter

⚪ = Optional parameter

\* Required only if you provide a custom `upload` block.

Each asset object must have:

* `type`: one of (`data`, `text`, `image`, `audio`, `video`, `essential`, `function`)
* `layerName`: exact layer name from the template
* `property`: like `"Source Text"` or `"Source Name"`
* `value` or `src`: depending on asset type

> You can inspect available `layerName` using `GET /templates/:id`

## Fonts Resolution

Nexrender automatically resolves fonts for most jobs - no `fonts` array required. When a job runs, the platform searches your team's font bank for matches against every font the template references, installs the best candidates on the render worker, and lets After Effects make the final selection.

The `fonts` array is only needed when you want to force-include a specific file that auto-resolution isn't picking up:

```json theme={null}
{
  "fonts": ["Montserrat-SemiBold.ttf"]
}
```

If any filename listed in `fonts` isn't in your team account, the job response will include a `missingFonts` array. The job still queues, but rendering may produce incorrect results - upload the missing files via `POST /fonts` before resubmitting.

<Note>
  Always upload the original font files bundled with your After Effects project. Fonts downloaded from other sources may share a family name but differ in metrics or kerning, causing layout shifts even when the platform matches the name correctly.
</Note>

See [Font Resolution](/docs/cloud/fonts/use) for a full explanation of the resolution process and how to debug font issues.

## Render Settings

<Note>
  Render settings and Preview mode are mutually exclusive.
</Note>

The settings object allows you to specify the render output:

* type: "video", "image" or "aep"
* frames: single frame number or \[start, end]  array (required for image)
* quality: "draft" or "full"
* codec: string identifier (e.g., `video_h264_vbr_15mbps`, `video_prores_422`, `image_png`, `image_jpeg`). See [Render Settings](/docs/cloud/jobs/rendering_settings) for the full list.

Supported quality list:

* draft
* full

Supported codecs:

* video\_h264\_vbr\_1mbps
* video\_h264\_vbr\_5mbps
* video\_h264\_vbr\_15mbps
* video\_h264\_vbr\_40mbps
* video\_h264\_cbr\_1mbps
* video\_h264\_cbr\_5mbps
* video\_h264\_cbr\_15mbps
* video\_h264\_cbr\_40mbps
* video\_prores\_422
* video\_prores\_4444
* image\_jpeg
* image\_png

### Examples

<CodeGroup>
  ```json Draft video theme={null}
  {
    "template": { 
      "id": "01JTGM9GCR71JV7EJYDF45QAFD", 
      "composition": "main" 
    },
    "settings": {
      "type": "video",
      "quality": "draft",
      "codec": "video_h264_vbr_15mbps"
    }
  }
  ```

  ```json Single-frame still theme={null}
  {
    "template": { 
      "id": "01JTGM9GCR71JV7EJYDF45QAFD", 
      "composition": "poster" 
    },
    "settings": {
      "type": "image",
      "frames": 125,
      "codec": "image_png"
    }
  }
  ```

  ```json Image sequence theme={null}
  {
    "template": { 
      "id": "01JTGM9GCR71JV7EJYDF45QAFD", 
      "composition": "shot_03" 
    },
    "settings": {
      "type": "image",
      "frames": [200, 260],
      "codec": "image_jpeg"
    }
  }
  ```

  ```json Zipped AEP project theme={null}
  {
    "template": { 
      "id": "01JTGM9GCR71JV7EJYDF45QAFD", 
      "composition": "main" 
    },
    "assets": [
      {
        "type": "text",
        "layerName": "Headline",
        "value": "New value example"
      }
    ],
    "settings": {
      "type": "aep"
    }
  }
  ```
</CodeGroup>

## Preview Mode vs Final Render

<Note>
  Render settings and Preview mode are mutually exclusive.
</Note>

Nexrender Cloud supports the ability to render videos in preview mode. A fast, low-resolution render is helpful when debugging new templates or job payload changes.

Use preview mode when:

* Verifying that `layerName` overrides are correct
* Testing a new template or composition
* Integrating webhooks or downstream automation
* You want to run a batch sanity check before scaling

```json theme={null}
{
  "template": { 
    "id": "01JTGM9GCR71JV7EJYDF45QAFD", 
    "composition": "main" 
  },
  "preview": true
}
```

Previews render faster and are cheaper on infrastructure resources. If your template is broken (bad expression, missing font, wrong composition), it's better to catch it here.

> You can build an internal CI pipeline that runs preview renders against all newly uploaded templates.

## Uploading Rendering Results

By default, outputs are stored in Nexrender Cloud storage. With the upload object, you can push rendered outputs directly to your S3-compatible storage.

```json Render Upload theme={null}
{
  "template": { 
    "id": "01JTGM9GCR71JV7EJYDF45QAFD", 
    "composition": "main" 
  },
  "upload": {
    "provider": "s3",
    "prefix": "marketing/campaign-42/",
    "outputUrl": "https://cdn.example.com/media",
    "params": {
      "endpoint": "https://s3.amazonaws.com",
      "region": "us-east-1",
      "bucket": "nexrender-outputs",
      "acl": "public-read",
      "accessKeyId": "${secrets.AWS_KEY_ID}",
      "accessKeySecret": "${secrets.AWS_KEY_SECRET}"
    }
  }
}
```

<Warning>
  Don’t embed raw keys in client-side requests. [Use the Secrets API](/docs/cloud/jobs/secrets) to manage credentials securely.
</Warning>

## Webhooks

You can extend your rendering job with a webhook:

```json Webhook Configuration theme={null}
{
  "template": {
    "id": "01JTGM9GCR71JV7EJYDF45QAFD",
    "composition": "main"
  },
  "webhook": {
    "url": "https://yourdomain.com/webhooks/render-complete",
    "data": {
      "customField": "someValue"
    }
  }
}
```

## Targeting Layers in Alternate Compositions

By default, assets are injected into the composition defined in the `template.composition` field.

However, you can override this on a per-asset basis using the `composition` key inside the asset definition.

This is useful when you want to render a specific comp (like `main`), but modify a layer in a supporting comp (like `main2`).

#### Example

```json theme={null}
{
  "template": {
    "id": "01JTGM9GCR71JV7EJYDF45QAFD",
    "composition": "main"
  },
  "assets": [
    {
      "type": "data",
      "layerName": "title",
      "composition": "main2",
      "property": "Source Text",
      "value": "Hello World!"
    }
  ]
}
```

## Validate the Assets Before Submitting

Before rendering, always validate:

* `composition` name exists (from template introspection)
* `layerName` matches exactly
* URLs for assets return a `200 OK`
* Font dependencies have been preloaded

## Full API Reference


## OpenAPI

````yaml POST /jobs
openapi: 3.0.4
info:
  title: Nexrender API
  version: '2.0'
  description: >
    REST API for the Nexrender cloud rendering platform, enabling programmatic
    control over After Effects template processing, job management, and asset
    handling.


    Features include:


    - Template upload and management (AEP, MOGRT, ZIP files)

    - Job creation and status monitoring with real-time progress

    - Job nesting for multi-composition renders (parent/child jobs)

    - Job stitching to combine multiple videos into one

    - Batch job creation for submitting up to 1000 jobs at once

    - Font library management for typography consistency

    - Secret management for secure API key storage

    - Webhook notifications for job lifecycle events

    - Asset injection for dynamic content replacement


    Authentication is required for all endpoints using Bearer token
    authorization.
servers:
  - url: https://api.nexrender.com/api/v2
    description: Production API server
security:
  - apiToken: []
paths:
  /jobs:
    post:
      tags:
        - Render Management
      summary: Create new job
      description: >-
        Submit a new render job with template, assets, and configuration
        options. Assets can include nested job definitions (type: 'job') that
        render as child jobs first, with their output automatically injected as
        video/image assets into the parent composition. Function assets support
        `params.layerName` as a string, and selected NX layer functions also
        support `params.layerName` as an array of strings expanded in order.
        When nested jobs are present, the parent job enters 'pending' state
        until all children complete.
      operationId: createJob
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JobCreation'
      responses:
        '201':
          description: >-
            Job successfully created and queued for processing. Returns
            'pending' status with children array when nested job assets are
            present.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobCreationResponse'
        '400':
          description: >-
            Invalid request - missing required fields or invalid template
            configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthorized - invalid or missing API token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Template not found - the specified template ID does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    JobCreation:
      type: object
      description: >-
        Configuration object for creating a new render job with template,
        assets, and options
      properties:
        template:
          $ref: '#/components/schemas/JobTemplate'
        preview:
          type: boolean
          default: false
          description: Generate a low-quality preview render instead of full quality output
        fonts:
          type: array
          items:
            type: string
          default: []
          description: List of font file names to include in the render environment
        assets:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/JobAsset'
              - $ref: '#/components/schemas/JobAssetNested'
            discriminator:
              propertyName: type
              mapping:
                job:
                  $ref: '#/components/schemas/JobAssetNested'
          default: []
          description: >-
            Collection of media assets (images, videos, audio, scripts, text) or
            nested job assets (type: 'job') to use in the render. Nested job
            assets render as child jobs first, with output injected into the
            parent composition. For supported NX layer functions,
            `params.layerName` can be a string or an array of strings; array
            values are expanded in place while preserving asset order.
        settings:
          type: object
          description: >-
            Render configuration settings for output format, quality, and frame
            selection
          properties:
            type:
              type: string
              enum:
                - video
                - image
                - aep
              description: >-
                Output render type - 'video' for MP4/MOV files, 'image' for
                PNG/JPG files, 'aep' for full archive
            frames:
              oneOf:
                - type: integer
                  minimum: 0
                  description: Single frame number to render as image
                - type: array
                  items:
                    type: integer
                    minimum: 0
                  minItems: 2
                  maxItems: 2
                  description: Frame range [start, end] where end > start
              description: >-
                Frame specification - single frame number or [start, end] range.
                Required for image type.
            quality:
              type: string
              enum:
                - draft
                - full
              description: >-
                Render quality setting - 'draft' for faster low-quality preview,
                'full' for high-quality output
            codec:
              type: string
              description: >-
                Output codec specification (e.g., 'h264_vbr_15mbps',
                'prores_422', 'png', 'jpeg')
            engine:
              type: string
              enum:
                - ae2025
                - ae2026
              default: ae2026
              description: >-
                After Effects render engine version used when the job is picked
                up by a worker
          additionalProperties: false
        upload:
          type: object
          description: >-
            Custom upload configuration for output files to external storage
            providers
          properties:
            prefix:
              type: string
              description: >-
                Folder prefix/path where output files will be stored (e.g.,
                'my-project/outputs/')
            outputUrl:
              type: string
              description: Custom base URL for accessing uploaded files publicly
            provider:
              type: string
              enum:
                - s3
              default: s3
              description: Storage provider - 's3' for Amazon S3 compatible
            params:
              type: object
              description: Provider-specific upload parameters and credentials
              properties:
                endpoint:
                  type: string
                  default: https://s3.amazonaws.com
                  description: Custom S3-compatible endpoint URL
                region:
                  type: string
                  description: AWS region or storage region identifier (required)
                bucket:
                  type: string
                  description: Target bucket name for file uploads (required)
                acl:
                  type: string
                  description: >-
                    Access control list setting for uploaded files (e.g.,
                    'public-read', 'private')
                accessKeyId:
                  type: string
                  description: AWS access key ID or equivalent credential (required)
                accessKeySecret:
                  type: string
                  description: AWS secret access key or equivalent credential (required)
              required:
                - region
                - bucket
                - accessKeyId
                - accessKeySecret
              additionalProperties: false
          additionalProperties: false
        webhook:
          $ref: '#/components/schemas/JobWebhook'
      required:
        - template
      additionalProperties: true
    JobCreationResponse:
      type: object
      description: Response after creating a job, includes children info for parent jobs
      properties:
        id:
          type: string
          description: Unique job identifier
        status:
          type: string
          enum:
            - queued
            - pending
          description: >-
            'queued' for regular jobs, 'pending' for parent jobs waiting on
            children
        outputUrl:
          type: string
          description: URL where the rendered output will be available
        children:
          type: array
          description: >-
            Child job details (only present for parent jobs with nested job
            assets)
          items:
            type: object
            properties:
              id:
                type: string
                description: Child job identifier
              status:
                type: string
                description: Child job status (typically 'queued')
              outputUrl:
                type: string
                description: URL where the child job's rendered output will be available
              missingFonts:
                type: array
                items:
                  type: string
                description: >-
                  List of fonts referenced in child's template but not found in
                  team's font library (only present if fonts are missing)
            required:
              - id
              - outputUrl
        missingFonts:
          type: array
          items:
            type: string
          description: >-
            List of fonts referenced in template but not found in team's font
            library
      required:
        - id
        - status
        - outputUrl
    ValidationErrorResponse:
      type: object
      description: Validation error response with detailed field information
      properties:
        error:
          type: string
          description: Main error message
        details:
          type: array
          description: Array of specific validation errors for individual fields
          items:
            type: object
            properties:
              field:
                type: string
                description: Field name that failed validation
              message:
                type: string
                description: Specific validation error for this field
    ErrorResponse:
      type: object
      description: Standard error response format
      properties:
        error:
          type: string
          description: Human-readable error message explaining what went wrong
      required:
        - error
    JobTemplate:
      type: object
      description: >-
        Template configuration defining the After Effects project and
        composition to render
      properties:
        id:
          type: string
          pattern: ^[A-Z0-9]{26}$
          description: >-
            Unique template identifier in ULID format (26 characters, uppercase
            alphanumeric)
        src:
          type: string
          description: >-
            Source URL to the After Effects template (.aep, .mogrt, or .zip
            file)
        composition:
          type: string
          description: >-
            Name of the specific composition within the template to render
            (optional for .mogrt)
          nullable: true
      required:
        - id
      additionalProperties: true
    JobAsset:
      type: object
      description: >-
        Asset to be used in job rendering, containing source information and
        target layer details. For function assets, provide the function
        identifier in `name` and arguments in `params`.
      properties:
        src:
          type: string
          description: >-
            Source URL, script data or file path for the asset (supports
            HTTP/HTTPS URLs or local paths)
        type:
          type: string
          description: Asset type (e.g., image, video, audio, text, data, script, job)
        layerName:
          type: string
          description: >-
            Target layer name in the After Effects composition where this asset
            will be applied
        name:
          type: string
          description: >-
            Human-readable name for the asset. For function assets (`type:
            function`), this should be the NX function name (for example,
            `nx:layer-autoscale`).
        conform:
          type: boolean
          description: >-
            When true for video, image, or audio assets, the worker normalizes
            the downloaded media to a render-engine-safe target format before
            assembly. If omitted, the API auto-enables conform for known risky
            inputs such as WebM, WebP, GIF, and OGG/OGA sources. GIF inputs are
            converted to a ProRes 4444 MOV file and treated as video.
        params:
          type: object
          description: >-
            Optional parameters for function assets. For supported NX layer
            functions (`nx:layer-autoscale`, `nx:layer-duration-set`,
            `nx:layer-start-set`, `nx:layer-state-set`, `nx:solid-color-set`,
            `nx:text-params-set`), `params.layerName` accepts a single string or
            an array of strings. When an array is provided, the API expands the
            function asset into multiple per-layer assets while preserving the
            original `assets` order.
          properties:
            layerName:
              description: Target layer name(s) for function assets
              oneOf:
                - type: string
                  description: Single target layer name
                - type: array
                  items:
                    type: string
                  minItems: 1
                  description: >-
                    Multiple target layer names (supported by selected NX layer
                    functions only)
          additionalProperties: true
      required:
        - type
      additionalProperties: true
    JobAssetNested:
      type: object
      description: >-
        A nested job asset that renders a child job first, then uses its output
        as a video/image asset in the parent composition. The child job's output
        URL is automatically injected into the parent's assets.
      properties:
        type:
          type: string
          enum:
            - job
          description: Must be 'job' to indicate this is a nested job asset
        layerName:
          type: string
          description: >-
            Target layer name in the parent composition where the child job's
            output will be placed (required)
        template:
          type: object
          description: Template configuration for the child job
          properties:
            id:
              type: string
              pattern: ^[A-Z0-9]{26}$
              description: Template ID for the child job (required)
            composition:
              type: string
              description: Composition name to render in the child job (required)
            name:
              type: string
              description: Template name (optional)
          required:
            - id
            - composition
        assets:
          type: array
          items:
            $ref: '#/components/schemas/JobAsset'
          description: Assets to inject into the child job
        preview:
          type: boolean
          default: false
          description: Generate preview quality for the child job
        settings:
          type: object
          description: Render settings for the child job
          properties:
            type:
              type: string
              enum:
                - video
                - image
              default: video
              description: Output type for the child job
            frames:
              oneOf:
                - type: integer
                - type: array
                  items:
                    type: integer
              description: Frame specification for image output
            quality:
              type: string
              enum:
                - draft
                - full
              description: Render quality
            codec:
              type: string
              description: Output codec
            engine:
              type: string
              enum:
                - ae2025
                - ae2026
              default: ae2026
              description: After Effects render engine version for the child job
      required:
        - type
        - layerName
        - template
    JobWebhook:
      type: object
      description: Webhook configuration for job status notifications and callbacks
      properties:
        url:
          type: string
          description: Target webhook URL that will receive job status updates
        method:
          type: string
          enum:
            - GET
            - POST
            - PUT
            - DELETE
          description: HTTP method to use when calling the webhook endpoint
          default: POST
        headers:
          type: object
          description: Additional HTTP headers to include in webhook requests
          additionalProperties: true
        data:
          type: object
          description: Custom data payload to include with webhook notifications
          additionalProperties: true
        custom:
          type: boolean
          default: false
          description: >-
            Flag indicating if webhook should only include custom data provided
            by the user
      required:
        - url
  securitySchemes:
    apiToken:
      type: http
      scheme: bearer
      description: >
        Bearer token authentication using API tokens for team-based access
        control.


        You can generate your own API token at:
        https://app.nexrender.com/settings/api-tokens

````