> ## 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 creative task

> Select a first-batch capability with workflowId. ImageGenV2 creates images; VideoGenV2 creates videos; SalesVideoPromptV3 and ProductImagePromptV1 create plans; VideoCreationV1 renders a planned product video. Planning results must be read from output and submitted as separate generation tasks.



## OpenAPI

````yaml /openapi.json post /tasks
openapi: 3.1.0
info:
  title: LuluLab API · First batch
  version: 1.0.0
  description: >-
    Image generation, video generation, product video planning, product image
    planning, and the common upload and task APIs.
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.
paths:
  /tasks:
    post:
      tags:
        - Creative tasks
      summary: Submit a creative task
      description: >-
        Select a first-batch capability with workflowId. ImageGenV2 creates
        images; VideoGenV2 creates videos; SalesVideoPromptV3 and
        ProductImagePromptV1 create plans; VideoCreationV1 renders a planned
        product video. Planning results must be read from output and submitted
        as separate generation tasks.
      operationId: submitTask
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaskRequest'
            examples:
              image:
                summary: Generate an image
                value:
                  workflowId: ImageGenV2
                  input:
                    model: gpt-image-2-5-flare
                    prompt: Studio product photo of a ceramic cup on a clean table
                    aspectRatio: '1:1'
                    resolution: 1K
                  attributes:
                    saveGeneratedAssets: true
                    creationSource: api
              video:
                summary: Generate a video
                value:
                  workflowId: VideoGenV2
                  input:
                    taskType: reference
                    model: seedance-2-mini
                    prompt: A close-up of a ceramic cup on a table
                    aspectRatio: '9:16'
                    resolution: 480p
                    duration: 5
                    generateAudio: true
                    referenceImages: []
                  attributes:
                    saveGeneratedAssets: true
                    creationSource: api
              productVideoPlan:
                summary: Plan a product video
                value:
                  workflowId: SalesVideoPromptV3
                  input:
                    model: seedance-2-mini
                    duration: 5
                    videoCount: 1
                    aspectRatio: '9:16'
                    resolution: 480p
                    generateAudio: true
                    referenceImages:
                      - url: https://example.com/product.jpg
                        mimeType: image/jpeg
                    creativeType: auto
                    salesRegion: United States
                    speechLanguage: English
                    promptLanguage: en-US
                    interactionLanguage: en-US
                    productInfo:
                      name: Ceramic cup
                      category: Home goods
                      sellingPoints: Handmade finish
              productImagePlan:
                summary: Plan product images
                value:
                  workflowId: ProductImagePromptV1
                  input:
                    productBrief:
                      productName: Ceramic cup
                      sellingPoints:
                        - Handmade finish
                      targetCountry: United States
                      targetAudience: Coffee lovers
                      productImages:
                        - url: https://example.com/product.jpg
                          mimeType: image/jpeg
                    creativeRequirement: Use only verified product facts.
                    userConfig:
                      creativeMode: original
                      cardsPerSet: 3
                      aspectRatio: '9:16'
                      targetLanguage: en-US
                      storyStyle: storyDrivenCarousel
                      imageStyle: storyDrivenCarousel
                    creatorBrief:
                      creatorMode: none
                      creatorImages: []
      responses:
        '201':
          description: The submitted asynchronous task. Save id and poll GET /tasks/{id}.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Task'
              example:
                id: TASK_ID
                workflowId: ImageGenV2
                status: Created
                output: null
                errorMessage: null
        '400':
          description: >-
            Request rejected. The response body contains an error title and
            detail.
        '401':
          description: >-
            Request rejected. The response body contains an error title and
            detail.
        '402':
          description: >-
            Request rejected. The response body contains an error title and
            detail.
        '429':
          description: >-
            Request rejected. The response body contains an error title and
            detail.
      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'
      discriminator:
        propertyName: workflowId
        mapping:
          ImageGenV2: '#/components/schemas/ImageTaskRequest'
          VideoGenV2: '#/components/schemas/VideoTaskRequest'
          SalesVideoPromptV3: '#/components/schemas/ProductVideoPlanRequest'
          VideoCreationV1: '#/components/schemas/ProductVideoRenderRequest'
          ProductImagePromptV1: '#/components/schemas/ProductImagePlanRequest'
    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: >-
            Generated result or plan when the task succeeds; null before
            completion.
        errorMessage:
          type:
            - string
            - 'null'
          description: Failure detail when available.
        credits:
          type:
            - integer
            - 'null'
          description: Credits charged when available.
    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
    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.