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

# Submit a batch of creative tasks

> Submit 1–100 jobs, or at most 20 when the batch contains a video recreation job. Each item needs a distinct quoteId for the same account, workflow, and pricing inputs. Retrying the same batch with the same quotes returns the original tasks.



## OpenAPI

````yaml /openapi.json post /tasks/batch
openapi: 3.1.0
info:
  title: LuluLab API
  version: 1.0.0
  description: >-
    Create images and videos, recreate videos from a reference, manage source
    assets, and track tasks and credits.
servers:
  - url: https://customer.lululab.ai
    description: Production
security: []
tags:
  - name: Getting started
    description: Upload product photos and estimate credits.
  - name: Creative tasks
    description: Submit an asynchronous workflow task and retrieve its result.
  - name: Billing
  - name: Models and references
  - name: Files and assets
paths:
  /tasks/batch:
    post:
      tags:
        - Creative tasks
      summary: Submit a batch of creative tasks
      description: >-
        Submit 1–100 jobs, or at most 20 when the batch contains a video
        recreation job. Each item needs a distinct quoteId for the same account,
        workflow, and pricing inputs. Retrying the same batch with the same
        quotes returns the original tasks.
      operationId: submitTaskBatch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              minItems: 1
              maxItems: 100
              items:
                allOf:
                  - $ref: '#/components/schemas/TaskRequest'
                  - type: object
                    required:
                      - quoteId
                    properties:
                      workflowId:
                        enum:
                          - VideoGenV2
                          - ImageGenV2
                          - VideoCreationV1
                          - ElementReplacementV1
                          - DeepRecreationV1
                          - StoryboardRecreationV1
      responses:
        '200':
          description: Tasks in the same order as the request.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Task'
        '400':
          description: Invalid item count, workflow, or quote IDs.
        '401':
          description: Authentication required.
        '402':
          description: Insufficient credits to admit the batch.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: A quote was not found for this account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '409':
          description: >-
            Quote expired, inputs differ, or a quote belongs to another
            submission.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey: []
components:
  schemas:
    TaskRequest:
      oneOf:
        - $ref: '#/components/schemas/ImageTaskRequest'
        - $ref: '#/components/schemas/VideoTaskRequest'
        - $ref: '#/components/schemas/ProductVideoPlanRequest'
        - $ref: '#/components/schemas/ProductVideoRenderRequest'
        - $ref: '#/components/schemas/ProductImagePlanRequest'
        - $ref: '#/components/schemas/DeepRecreationV1Request'
        - $ref: '#/components/schemas/StoryboardRecreationV1Request'
        - $ref: '#/components/schemas/ElementReplacementV1Request'
      discriminator:
        propertyName: workflowId
        mapping:
          ImageGenV2: '#/components/schemas/ImageTaskRequest'
          VideoGenV2: '#/components/schemas/VideoTaskRequest'
          SalesVideoPromptV3: '#/components/schemas/ProductVideoPlanRequest'
          VideoCreationV1: '#/components/schemas/ProductVideoRenderRequest'
          ProductImagePromptV1: '#/components/schemas/ProductImagePlanRequest'
          DeepRecreationV1: '#/components/schemas/DeepRecreationV1Request'
          StoryboardRecreationV1: '#/components/schemas/StoryboardRecreationV1Request'
          ElementReplacementV1: '#/components/schemas/ElementReplacementV1Request'
    Task:
      type: object
      properties:
        id:
          type: string
          description: Save this id to query the result.
        workflowId:
          type: string
        status:
          type: string
          enum:
            - Created
            - Pending
            - Running
            - Succeeded
            - Failed
            - Cancelled
        output:
          type:
            - object
            - 'null'
          additionalProperties: true
          description: >-
            Workflow-specific result. Some video outputs gain captionStatus and
            captionCues after generation completes.
        errorMessage:
          type:
            - string
            - 'null'
          description: Failure detail when available.
        credits:
          type:
            - integer
            - 'null'
          description: Credits charged when available.
        billingStatus:
          type:
            - 'null'
            - string
          description: >-
            Credit lifecycle, distinct from task status. Values include
            Reserving, Held, Captured, Released, and Included.
        quotedCredits:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - 'null'
            - integer
            - string
          format: int64
        createdAt:
          type:
            - 'null'
            - string
          description: The time when the task was created.
          format: date-time
        startedAt:
          type:
            - 'null'
            - string
          description: The time when the task started running.
          format: date-time
        endedAt:
          type:
            - 'null'
            - string
          description: The time when the task finished running.
          format: date-time
        attributes:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/JsonDocument'
              description: >-
                Public task presentation and interaction data, when available.
                Internal orchestration state is omitted.
        input:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/JsonDocument'
              description: The JSON input submitted to the workflow.
    ProblemDetails:
      type: object
      properties:
        type:
          type:
            - 'null'
            - string
        title:
          type:
            - 'null'
            - string
        status:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - 'null'
            - integer
            - string
          format: int32
        detail:
          type:
            - 'null'
            - string
        instance:
          type:
            - 'null'
            - string
    ImageTaskRequest:
      type: object
      required:
        - workflowId
        - input
      properties:
        workflowId:
          type: string
          enum:
            - ImageGenV2
        input:
          $ref: '#/components/schemas/ImageGenerationInput'
        attributes:
          type: object
          properties:
            saveGeneratedAssets:
              type: boolean
            creationSource:
              type: string
        quoteId:
          type: string
          format: uuid
    VideoTaskRequest:
      type: object
      required:
        - workflowId
        - input
      properties:
        workflowId:
          type: string
          enum:
            - VideoGenV2
        input:
          $ref: '#/components/schemas/VideoGenerationInput'
        attributes:
          type: object
          properties:
            saveGeneratedAssets:
              type: boolean
            creationSource:
              type: string
        quoteId:
          type: string
          format: uuid
    ProductVideoPlanRequest:
      type: object
      required:
        - workflowId
        - input
      properties:
        workflowId:
          type: string
          enum:
            - SalesVideoPromptV3
        input:
          $ref: '#/components/schemas/ProductVideoPlanInput'
        quoteId:
          type: string
          format: uuid
    ProductVideoRenderRequest:
      type: object
      required:
        - workflowId
        - input
      properties:
        workflowId:
          type: string
          enum:
            - VideoCreationV1
        input:
          $ref: '#/components/schemas/VideoGenerationInput'
        attributes:
          type: object
          properties:
            saveGeneratedAssets:
              type: boolean
            creationSource:
              type: string
        quoteId:
          type: string
          format: uuid
    ProductImagePlanRequest:
      type: object
      required:
        - workflowId
        - input
      properties:
        workflowId:
          type: string
          enum:
            - ProductImagePromptV1
        input:
          $ref: '#/components/schemas/ProductImagePlanInput'
        quoteId:
          type: string
          format: uuid
    DeepRecreationV1Request:
      type: object
      required:
        - workflowId
        - input
      properties:
        workflowId:
          type: string
          const: DeepRecreationV1
        input:
          type: object
          additionalProperties: true
          required:
            - model
            - sourceAssetId
            - sourceDurationMs
          properties:
            model:
              type: string
            sourceAssetId:
              type: string
              format: uuid
            sourceDurationMs:
              type: integer
              minimum: 1
        quoteId:
          type: string
          format: uuid
        attributes:
          type: object
          additionalProperties: true
    StoryboardRecreationV1Request:
      type: object
      required:
        - workflowId
        - input
      properties:
        workflowId:
          type: string
          const: StoryboardRecreationV1
        input:
          type: object
          additionalProperties: true
          required:
            - benchmarkVideo
            - userConfig
            - settings
          properties:
            benchmarkVideo:
              type: object
              required:
                - assetId
                - url
                - mimeType
                - duration
              additionalProperties: true
              properties:
                assetId:
                  type: string
                  format: uuid
                url:
                  type: string
                  format: uri
                mimeType:
                  type: string
                duration:
                  type: number
            userConfig:
              type: object
            settings:
              type: object
        quoteId:
          type: string
          format: uuid
        attributes:
          type: object
          additionalProperties: true
    ElementReplacementV1Request:
      type: object
      required:
        - workflowId
        - input
      properties:
        workflowId:
          type: string
          const: ElementReplacementV1
        input:
          type: object
          additionalProperties: true
          required:
            - model
            - sourceAssetId
            - sourceDurationMs
          properties:
            model:
              type: string
            sourceAssetId:
              type: string
              format: uuid
            sourceDurationMs:
              type: integer
              minimum: 1
        quoteId:
          type: string
          format: uuid
        attributes:
          type: object
          additionalProperties: true
    JsonDocument: {}
    ImageGenerationInput:
      type: object
      required:
        - model
        - prompt
        - aspectRatio
        - resolution
      properties:
        model:
          type: string
          enum:
            - gpt-image-2-5-sunburst
            - gpt-image-2-5-flare
          description: Image model ID offered in the current LuluLab creation UI.
        prompt:
          type: string
          minLength: 1
          maxLength: 20000
          description: >-
            Subject, composition, scene, and style. The site limits prompts to
            20,000 characters.
        aspectRatio:
          type: string
          enum:
            - '1:1'
            - '16:9'
            - '9:16'
            - '4:3'
            - '3:4'
            - '3:2'
            - '2:3'
            - '5:4'
            - '4:5'
            - '2:1'
            - '1:2'
            - '21:9'
            - '9:21'
          description: Target image aspect ratio.
        resolution:
          type: string
          enum:
            - 1K
            - 2K
            - 4K
          description: Output resolution supported by the model.
        referenceImages:
          type: array
          items:
            $ref: '#/components/schemas/MediaReference'
          description: >-
            Optional reference images for image-to-image; omit for
            text-to-image.
    VideoGenerationInput:
      type: object
      required:
        - model
        - prompt
        - aspectRatio
        - resolution
        - duration
      description: >-
        Use a model-supported combination of aspectRatio, resolution, and
        duration. The model matrix is on the video generation guide.
      properties:
        taskType:
          type: string
          enum:
            - reference
          default: reference
          description: The first-batch generation mode. Omission defaults to reference.
        model:
          type: string
          enum:
            - seedance-2-mini
            - seedance-2-fast
            - seedance-2-5-flash
            - seedance-2
            - seedance-2-5
            - minimax-h3
            - google-veo
            - grok-imagine-1-5-preview
            - wan-3
          description: >-
            Video model ID. See the video generation guide for its supported
            combinations.
        prompt:
          type: string
          minLength: 1
          description: Describe the scene, movement, camera, and audio requirements.
        aspectRatio:
          type: string
          enum:
            - '21:9'
            - '16:9'
            - '4:3'
            - '1:1'
            - '3:4'
            - '9:16'
          description: Only choose a ratio supported by the selected model.
        resolution:
          type: string
          enum:
            - 720p
            - 480p
            - 1080p
            - 1440p
          description: Only choose a resolution supported by the selected model.
        duration:
          type: number
          exclusiveMinimum: 0
          description: Seconds; range depends on the model.
        generateAudio:
          type: boolean
          default: true
          description: Whether to generate audio where supported.
        referenceImages:
          type: array
          items:
            $ref: '#/components/schemas/MediaReference'
          description: Optional image references. Model-specific limits apply.
        referenceVideos:
          type: array
          items:
            $ref: '#/components/schemas/MediaReference'
          description: >-
            Optional video references where supported. Model-specific limits
            apply.
        referenceAudios:
          type: array
          items:
            $ref: '#/components/schemas/MediaReference'
          description: >-
            Optional audio references where supported. Model-specific limits
            apply.
    ProductVideoPlanInput:
      type: object
      required:
        - model
        - duration
        - aspectRatio
        - resolution
        - referenceImages
        - salesRegion
        - speechLanguage
        - productInfo
      properties:
        model:
          type: string
          enum:
            - seedance-2-mini
            - seedance-2-fast
            - seedance-2-5-flash
            - seedance-2
            - seedance-2-5
            - minimax-h3
            - google-veo
            - grok-imagine-1-5-preview
            - wan-3
          description: Use the same model in the later VideoCreationV1 request.
        duration:
          type: integer
          minimum: 1
          description: Seconds per video, within the selected model range.
        videoCount:
          type: integer
          minimum: 1
          maximum: 20
          default: 1
          description: Number of distinct video plans.
        aspectRatio:
          type: string
          enum:
            - '21:9'
            - '16:9'
            - '4:3'
            - '1:1'
            - '3:4'
            - '9:16'
          description: Output ratio supported by the model.
        resolution:
          type: string
          enum:
            - 720p
            - 480p
            - 1080p
            - 1440p
          description: Output resolution supported by the model.
        generateAudio:
          type: boolean
          default: true
        referenceImages:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/MediaReference'
          description: Product photo references.
        creativeType:
          type: string
          enum:
            - auto
            - productPitch
            - storyDrivenAd
            - lifestyleSeeding
          default: auto
          description: Creative format; auto lets the planner select one.
        salesRegion:
          type: string
          description: Target sales country or region.
        speechLanguage:
          type: string
          description: Language spoken in the video, e.g. English.
        promptLanguage:
          type: string
          enum:
            - zh-CN
            - en-US
          description: Planning prompt language offered by the site.
        interactionLanguage:
          type: string
          enum:
            - zh-CN
            - en-US
          description: Language for planning explanations.
        productInfo:
          $ref: '#/components/schemas/ProductVideoInfo'
        creativeBrief:
          type: string
          description: Additional direction consistent with the supplied product facts.
    ProductImagePlanInput:
      type: object
      required:
        - productBrief
        - userConfig
        - creatorBrief
      properties:
        productBrief:
          $ref: '#/components/schemas/ProductImageBrief'
        creativeRequirement:
          type: string
          description: Optional creative direction.
        userConfig:
          $ref: '#/components/schemas/ProductImageConfig'
        creatorBrief:
          type: object
          required:
            - creatorMode
          properties:
            creatorMode:
              type: string
              enum:
                - none
                - provided
              description: Whether creator reference images are supplied.
            creatorImages:
              type: array
              items:
                $ref: '#/components/schemas/MediaReference'
              description: Only for provided creatorMode.
    MediaReference:
      type: object
      required:
        - url
      description: >-
        An uploaded image, video, or audio file. POST the file to presignedUrl
        first, then use the upload response location as url.
      properties:
        url:
          type: string
          format: uri
          description: >-
            The location returned after uploading the file; do not use
            presignedUrl.
        mimeType:
          type: string
          description: Media MIME type, e.g. image/jpeg or video/mp4.
    ProductVideoInfo:
      type: object
      required:
        - name
        - sellingPoints
      properties:
        name:
          type: string
          description: Product name.
        category:
          type: string
          description: Product category.
        features:
          type: string
          description: Verified product features.
        sellingPoints:
          type: string
          description: Verified selling points; do not invent claims.
        targetAudience:
          type: string
          description: Target audience.
        usageScenarios:
          type: string
          description: Usage scenarios.
    ProductImageBrief:
      type: object
      required:
        - productName
        - sellingPoints
        - targetCountry
        - productImages
      properties:
        productName:
          type: string
          description: Product name.
        sellingPoints:
          type: array
          items:
            type: string
          description: Verified selling points.
        targetCountry:
          type: string
          description: Target sales country.
        targetAudience:
          type: string
          description: Target audience.
        productImages:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/MediaReference'
          description: Product photos.
    ProductImageConfig:
      type: object
      required:
        - creativeMode
        - cardsPerSet
        - aspectRatio
        - targetLanguage
        - storyStyle
        - imageStyle
      properties:
        creativeMode:
          type: string
          enum:
            - original
          description: First-batch creation mode.
        cardsPerSet:
          type: integer
          minimum: 1
          maximum: 10
          description: Number of planned image cards.
        aspectRatio:
          type: string
          enum:
            - '9:16'
            - '3:4'
            - '4:5'
            - '1:1'
            - '16:9'
          description: Aspect ratio of planned images.
        targetLanguage:
          type: string
          description: Language of the marketing copy, e.g. en-US.
        storyStyle:
          type: string
          enum:
            - storyDrivenCarousel
        imageStyle:
          type: string
          enum:
            - storyDrivenCarousel
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: Authorization
      description: Send the raw luk- API key. Do not add Bearer.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.