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

# Create a media processing job

> Create a processing job for source media owned by the current account. Use the same idempotency key only with the same operation and inputs.



## OpenAPI

````yaml /openapi.json post /media/jobs
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:
  /media/jobs:
    post:
      tags:
        - Files and assets
      summary: Create a media processing job
      description: >-
        Create a processing job for source media owned by the current account.
        Use the same idempotency key only with the same operation and inputs.
      operationId: createMediaJob
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomerMediaJobForm'
          text/json:
            schema:
              $ref: '#/components/schemas/CustomerMediaJobForm'
          application/*+json:
            schema:
              $ref: '#/components/schemas/CustomerMediaJobForm'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MediaJobModel'
        '400':
          description: Invalid job or unsupported operation.
        '401':
          description: Authentication required.
        '409':
          description: The idempotency key was used with different job inputs.
      security:
        - ApiKey: []
components:
  schemas:
    CustomerMediaJobForm:
      required:
        - operation
        - input
      type: object
      properties:
        operation:
          maxLength: 32
          minLength: 0
          type: string
        input:
          $ref: '#/components/schemas/JsonElement'
        idempotencyKey:
          maxLength: 128
          minLength: 0
          type:
            - 'null'
            - string
    MediaJobModel:
      type: object
      properties:
        jobId:
          type: string
          format: uuid
        status:
          type: string
        progress:
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$
          type:
            - 'null'
            - number
            - string
          format: double
        result:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/JsonElement'
        error:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/MediaJobErrorModel'
    JsonElement: {}
    MediaJobErrorModel:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
  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.