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

# Batch Create Content

> Create multiple content pieces in a single request. Brand context is resolved
once and shared across all items for consistency and efficiency.

Each item in the `items` array is an independent content creation request with
its own brief and optional overrides. All items are executed in parallel.

**Limits:** Maximum 10 items per batch.

**Response:** Returns immediately with a `batchId` and per-item status. Items
that could not be started are marked as `failed` with an error message. Successful
items are `queued` with a run ID you can poll individually.

**Agent usage pattern:**
1. Generate briefs with `POST /v1/content/brief` (count: 5)
2. Feed all briefs into this endpoint as a batch
3. Poll each `runId` from the response for results


Create multiple pieces of content in a single request.

Each item follows the same logic as the create-content endpoint — brief resolution, app selection, and execution — but all items run in parallel. Brand context is resolved once and shared across the batch.

Returns an array of results, one per item. Each successful item includes a run ID you can track via the wait or get-run endpoints. Failed items include the error reason.

Maximum 10 items per batch.


## OpenAPI

````yaml POST /v1/content/batch
openapi: 3.1.0
info:
  title: Lamina Apps API
  version: 1.0.0
  description: >
    Professional creative content production for AI agents. Create brand-aligned
    images, videos, and designs from natural-language briefs using 30+
    specialized AI pipelines.


    Unlike raw model APIs (DALL-E, Flux, Kling), Lamina automatically applies
    brand guidelines, selects the optimal multi-model pipeline, scores output
    quality, and delivers permanent CDN-hosted URLs with composability metadata
    for chaining.


    ## Authentication

    All endpoints require an API key passed via one of these headers:

    - `x-api-key: lma_your_key` (recommended)

    - `Authorization: Bearer lma_your_key`


    API keys are workspace-scoped. Create them in **Settings -> API Keys**.


    ## Quick Start (One-Call Path)

    `POST /v1/create` with `{ "brief": "product photo of sneakers", "sync": true
    }` — returns completed output inline with CDN URL.


    ## Quick Start (Advanced)

    1. `GET /v1/apps` -- browse 30+ specialized creative apps

    2. `GET /v1/apps/{appId}` -- inspect input parameters

    3. `POST /v1/apps/{appId}/runs?webhook=<url>` -- run with your inputs

    4. Receive results via webhook, poll `GET /v1/runs/{runId}`, or stream via
    `GET /v1/runs/{runId}/stream`


    ## Rate Limits

    All `/v1/*` endpoints are currently limited to 100 requests per minute per
    IP.

    On `429`, read the `RateLimit-*` and `Retry-After` headers before retrying.


    ## How Inputs Work

    When running an app, provide inputs as a JSON object keyed by parameter
    **name** (from the app details response).


    - **text** parameters: send a string value (e.g. a prompt or description)

    - **options** parameters: send the **label** of the option (e.g.
    `"Caucasian"`), not an internal value

    - **url** parameters: send a publicly accessible URL to an image or video


    Every parameter is returned with `required: true`. Parameters with a
    `default` can safely be omitted -- the app will use the default value.


    ## Endpoint Groups

    | Group | Purpose |

    |-------|---------|

    | **Apps** | Discover and inspect available content creation apps |

    | **Runs** | Run workflows, track progress, and retrieve results |

    | **Assets** | Browse generated images, videos, and text from past
    executions |

    | **Intelligence** | Brand context, performance prediction, recommendations,
    and trends |

    | **Publishing** | Publish content to connected social channels |

    | **Content** | One-call agent operations: create, score, brief, batch |

    | **Account** | Credit balance and rate limit visibility |

    | **Templates** | Content creation templates and strategies |

    | **Webhooks** | Webhook signature verification |
servers:
  - url: https://app.uselamina.ai
    description: Production
security:
  - apiKey: []
tags:
  - name: Create
    description: Create content from briefs, run specific apps, and use templates
  - name: Discover
    description: Find and inspect available apps and their input schemas
  - name: Track
    description: Monitor execution progress, retrieve results, and browse generated assets
  - name: Intelligence
    description: >-
      Brand context, performance prediction, content recommendations, and trend
      signals
  - name: Distribute
    description: Publish content to social channels and transfer assets to CDN
  - name: Score
    description: Evaluate content quality, brand alignment, and engagement potential
  - name: Account
    description: Credit balance, rate limits, and health checks
  - name: Webhooks
    description: Webhook signature verification for secure callback handling
paths:
  /v1/content/batch:
    post:
      tags:
        - Create
      summary: Batch Create Content
      description: >
        Create multiple content pieces in a single request. Brand context is
        resolved

        once and shared across all items for consistency and efficiency.


        Each item in the `items` array is an independent content creation
        request with

        its own brief and optional overrides. All items are executed in
        parallel.


        **Limits:** Maximum 10 items per batch.


        **Response:** Returns immediately with a `batchId` and per-item status.
        Items

        that could not be started are marked as `failed` with an error message.
        Successful

        items are `queued` with a run ID you can poll individually.


        **Agent usage pattern:**

        1. Generate briefs with `POST /v1/content/brief` (count: 5)

        2. Feed all briefs into this endpoint as a batch

        3. Poll each `runId` from the response for results
      operationId: batchCreate
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                items:
                  type: array
                  items:
                    $ref: '#/components/schemas/BatchCreateItem'
                  minItems: 1
                  maxItems: 10
                  description: Array of content creation requests (1-10 items).
                brandProfileId:
                  type: string
                  format: uuid
                  nullable: true
                  description: >-
                    Default brand profile for all items (individual items can
                    override).
                campaignId:
                  type: string
                  format: uuid
                  nullable: true
                  description: >-
                    Default campaign for all items (individual items can
                    override).
              required:
                - items
            example:
              items:
                - brief: >-
                    Lifestyle photo of sneakers in urban park, golden-hour
                    lighting
                  platform: instagram
                  modality: image
                - brief: Product flat-lay of full colorway lineup, minimalist styling
                  platform: instagram
                  modality: image
                - brief: >-
                    15-second video of sneaker unboxing with ASMR-style
                    close-ups
                  platform: tiktok
                  modality: video
              brandProfileId: null
              campaignId: null
      responses:
        '202':
          description: Batch creation started. Poll individual run IDs for results.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/BatchResult'
              example:
                data:
                  batchId: batch-001
                  total: 3
                  queued: 2
                  failed: 1
                  items:
                    - index: 0
                      status: queued
                      runId: exec-001
                      workflowId: 80d4d454-8844-489f-b903-2ad65a414482
                      workflowName: AI Product Photography
                    - index: 1
                      status: queued
                      runId: exec-002
                      workflowId: 80d4d454-8844-489f-b903-2ad65a414482
                      workflowName: AI Product Photography
                    - index: 2
                      status: failed
                      error: No video-capable app found for this workspace
        '400':
          description: >-
            Invalid request (missing items, items exceed limit, or item
            validation failed)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: items[2].brief is required (string)
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  schemas:
    BatchCreateItem:
      type: object
      description: A single item in a batch content creation request.
      required:
        - brief
      properties:
        brief:
          type: string
          description: Natural-language content creation brief
        platform:
          type: string
          nullable: true
          description: Target platform for this item
        modality:
          type: string
          nullable: true
          description: Desired content modality
        appId:
          type: string
          format: uuid
          nullable: true
          description: Force a specific app for this item
        brandProfileId:
          type: string
          format: uuid
          nullable: true
          description: Override the batch-level brand profile for this item
        campaignId:
          type: string
          format: uuid
          nullable: true
          description: Override the batch-level campaign for this item
        inputs:
          type: object
          nullable: true
          description: Override specific input parameters for this item
    BatchResult:
      type: object
      description: Result of a batch content creation request.
      required:
        - batchId
        - total
        - items
      properties:
        batchId:
          type: string
          format: uuid
          description: Unique batch identifier
        total:
          type: integer
          description: Total number of items in the batch
        queued:
          type: integer
          description: Number of items successfully queued
        failed:
          type: integer
          description: Number of items that failed to start
        items:
          type: array
          items:
            $ref: '#/components/schemas/BatchResultItem'
          description: Per-item results
    Error:
      type: object
      description: Standard error response
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable error message
        details:
          type: array
          items:
            type: string
          description: Additional validation error details (present on 400 responses)
    BatchResultItem:
      type: object
      description: Status of a single item in a batch creation result.
      required:
        - index
        - status
      properties:
        index:
          type: integer
          description: Zero-based index of this item in the original `items` array
        status:
          type: string
          enum:
            - queued
            - failed
          description: |
            `queued` -- execution started, poll `runId` for results
            `failed` -- could not start, check `error` field
        runId:
          type: string
          format: uuid
          description: Run ID to poll for results (only present when status is `queued`)
        workflowId:
          type: string
          format: uuid
          description: >-
            App/workflow that was selected (only present when status is
            `queued`)
        workflowName:
          type: string
          description: App name (only present when status is `queued`)
        error:
          type: string
          description: Error message (only present when status is `failed`)
  responses:
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
          example:
            error: Invalid API key
    TooManyRequests:
      description: >-
        Rate limit exceeded. All `/v1/*` endpoints are currently limited to 100
        requests per minute per IP.
      headers:
        RateLimit-Policy:
          description: Active rate limit policy.
          schema:
            type: string
            example: 100;w=60
        RateLimit-Limit:
          description: Max requests allowed in the current window.
          schema:
            type: integer
            example: 100
        RateLimit-Remaining:
          description: Requests remaining in the current window.
          schema:
            type: integer
            example: 0
        RateLimit-Reset:
          description: Seconds until the current window resets.
          schema:
            type: integer
            example: 60
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
            example: 60
      content:
        text/plain:
          schema:
            type: string
          example: Too many requests from this IP, please try again in a minute
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: 'Workspace API key. Prefix: `lma_`. Example: `lma_abc123...`'

````