> ## 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.

# Create batch of jobs

> Submit multiple render jobs in a single request. Each job in the batch follows the same schema as a single job creation. Supports partial success - some jobs may succeed while others fail.



## OpenAPI

````yaml /openapi.json post /batches
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:
  /batches:
    post:
      tags:
        - Batch Management
      summary: Create batch of jobs
      description: >-
        Submit multiple render jobs in a single request. Each job in the batch
        follows the same schema as a single job creation. Supports partial
        success - some jobs may succeed while others fail.
      operationId: createBatch
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchCreation'
      responses:
        '201':
          description: >-
            Batch created successfully. Check 'status' field: 'created' means
            all jobs succeeded, 'partial' means some failed (see 'errors'
            array).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchCreationResponse'
        '400':
          description: Invalid request or all jobs in the batch failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchCreationResponse'
        '401':
          description: Unauthorized - invalid or missing API token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden - license is not valid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    BatchCreation:
      type: object
      description: >-
        Configuration for creating a batch of render jobs in a single request (1
        to 1000 jobs)
      properties:
        jobs:
          type: array
          description: >-
            Array of job configurations to create as a batch. Each item follows
            the same schema as a single job creation request.
          items:
            $ref: '#/components/schemas/JobCreation'
          minItems: 1
          maxItems: 1000
      required:
        - jobs
    BatchCreationResponse:
      type: object
      description: >-
        Response after creating a batch of jobs, including per-job results and
        any errors
      properties:
        batchId:
          type: string
          description: Unique batch identifier in ULID format for tracking the entire batch
        status:
          type: string
          enum:
            - created
            - partial
            - error
          description: >-
            'created' if all jobs succeeded, 'partial' if some failed, 'error'
            if all failed
        totalJobs:
          type: integer
          description: Total number of jobs in the batch request
        successCount:
          type: integer
          description: Number of successfully created jobs
        jobs:
          type: array
          description: Array of successfully created job details
          items:
            type: object
            properties:
              index:
                type: integer
                description: Position of this job in the original request array
              id:
                type: string
                description: Unique job identifier
              status:
                type: string
                description: Initial job status ('queued' or 'pending' for parent jobs)
              outputUrl:
                type: string
                description: URL where the rendered output will be available
              children:
                type: array
                description: >-
                  Child job details (only present for jobs with nested job
                  assets)
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    status:
                      type: string
                    outputUrl:
                      type: string
                    missingFonts:
                      type: array
                      items:
                        type: string
              missingFonts:
                type: array
                items:
                  type: string
                description: >-
                  Fonts referenced in template but not found in team's font
                  library
        errors:
          type: array
          description: >-
            Array of errors for failed jobs (only present when status is
            'partial' or 'error')
          items:
            type: object
            properties:
              index:
                type: integer
                description: Position of the failed job in the original request array
              error:
                type: string
                description: Error message describing why the job failed
              errorCode:
                type: string
                description: Machine-readable error code
      required:
        - batchId
        - status
        - totalJobs
        - successCount
        - jobs
    ErrorResponse:
      type: object
      description: Standard error response format
      properties:
        error:
          type: string
          description: Human-readable error message explaining what went wrong
      required:
        - error
    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
    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

````