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

# Create a video

> `ugc` makes a 30 second UGC voiceover video from the dialog's four choices: audience, recipe, concept and voice. Omitted concept or voice is chosen for you, as when the app is left on its defaults. `animation` turns a completed Quick Shoot photo into a 5 to 15 second video.



## OpenAPI

````yaml /api/openapi.yaml post /videos
openapi: 3.1.0
info:
  title: LocalAds API
  version: 1.0.0
  description: Public API for LocalAds customer integrations.
servers:
  - url: https://makelocalads.com/api/v1
security:
  - apiKey: []
tags:
  - name: Account
    description: Your organization, balance and prices.
  - name: Set up
    description: Brands, products, audiences and image uploads.
  - name: Ad campaigns
    description: Campaigns and their creatives.
  - name: Listing images
    description: Amazon listing image ideas and renders.
  - name: Photoshoots
    description: Photoshoots, templates and moodboards.
  - name: ChatGPT ads
    description: ChatGPT ad groups and ads.
  - name: UGC videos
    description: Recipes, concepts, voices and videos.
  - name: Creatives
    description: The cross-type list of finished images and videos.
paths:
  /videos:
    post:
      tags:
        - UGC videos
      summary: Create a video
      description: >-
        `ugc` makes a 30 second UGC voiceover video from the dialog's four
        choices: audience, recipe, concept and voice. Omitted concept or voice
        is chosen for you, as when the app is left on its defaults. `animation`
        turns a completed Quick Shoot photo into a 5 to 15 second video.
      operationId: createVideo
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VideoCreate'
            examples:
              ugc:
                summary: UGC voiceover video
                value:
                  type: ugc
                  product_id: a1516a75-9be5-461a-93af-c1896a0a3127
                  recipe_id: ugc-30s-voiceover
                  audience_id: 0f0c5a4e-54f7-4f0e-9d4e-1a8c3a6b5d11
                  concept_id: 5b7e0f7a-6a55-4f0b-9f6c-8f0a2c1d3e4f
                  voice_id: 9c3b7a1e-2d4f-4e6a-8b0c-1d2e3f4a5b6c
                  max_credits: 60
              animation:
                summary: Animate a photo
                value:
                  type: animation
                  source_creative_id: 3f2a1b0c-9d8e-4f7a-b6c5-d4e3f2a1b0c9
                  duration_seconds: 10
                  aspect_ratio: '9:16'
                  prompt: Slow push-in as steam rises from the cup.
      responses:
        '202':
          description: Video accepted.
          headers:
            Location:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Video'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/Unprocessable'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      description: >-
        Optional caller-generated value that prevents duplicate generation when
        retrying the same request.
      schema:
        type: string
        minLength: 1
        maxLength: 255
  schemas:
    VideoCreate:
      oneOf:
        - $ref: '#/components/schemas/UgcVideoCreate'
        - $ref: '#/components/schemas/AnimationVideoCreate'
      discriminator:
        propertyName: type
    Video:
      allOf:
        - $ref: '#/components/schemas/VideoSummary'
        - type: object
          required:
            - credits_charged
          properties:
            credits_charged:
              type: integer
              description: Net credits charged. A failed render is refunded.
    UgcVideoCreate:
      type: object
      additionalProperties: false
      required:
        - type
        - product_id
        - audience_id
      properties:
        type:
          type: string
          const: ugc
        product_id:
          type: string
          format: uuid
        recipe_id:
          type: string
          default: ugc-30s-voiceover
        audience_id:
          type:
            - string
            - 'null'
          format: uuid
          description: >-
            Required. A saved audience of the product, from GET
            /products/{product_id}/audiences, or `null` for a broad video.
        concept_id:
          type: string
          format: uuid
          description: A concept from GET /video-concepts for this product.
        voice_id:
          type: string
          format: uuid
          description: A voice from GET /voices.
        max_credits:
          type: integer
          minimum: 1
          description: >-
            Refuse the request with 422 credit_limit_exceeded, before anything
            is charged, if it would cost more than this many credits.
    AnimationVideoCreate:
      type: object
      additionalProperties: false
      required:
        - type
        - source_creative_id
      properties:
        type:
          type: string
          const: animation
        source_creative_id:
          type: string
          format: uuid
          description: A completed Quick Shoot photo, or a video made from one.
        duration_seconds:
          type: integer
          minimum: 5
          maximum: 15
          default: 10
        aspect_ratio:
          type: string
          enum:
            - '9:16'
            - '16:9'
            - '1:1'
          default: '9:16'
        prompt:
          type: string
          minLength: 1
          maxLength: 2000
          description: Optional motion direction.
        max_credits:
          type: integer
          minimum: 1
          description: >-
            Refuse the request with 422 credit_limit_exceeded, before anything
            is charged, if it would cost more than this many credits.
    VideoSummary:
      type: object
      required:
        - id
        - type
        - product_id
        - status
        - title
        - recipe_id
        - audience_id
        - source_creative_id
        - video_url
        - thumbnail_url
        - duration_seconds
        - aspect_ratio
        - created_at
      properties:
        id:
          type: string
          format: uuid
        type:
          type: string
          enum:
            - ugc
            - animation
        product_id:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - queued
            - in_progress
            - completed
            - failed
            - canceled
        title:
          type:
            - string
            - 'null'
        recipe_id:
          type:
            - string
            - 'null'
        audience_id:
          type:
            - string
            - 'null'
          format: uuid
        source_creative_id:
          type:
            - string
            - 'null'
          format: uuid
        video_url:
          type:
            - string
            - 'null'
          format: uri
        thumbnail_url:
          type:
            - string
            - 'null'
          format: uri
        duration_seconds:
          type:
            - integer
            - 'null'
        aspect_ratio:
          type:
            - string
            - 'null'
        created_at:
          type: string
          format: date-time
    Problem:
      type: object
      required:
        - type
        - title
        - status
        - detail
        - code
        - request_id
      properties:
        type:
          type: string
          format: uri
        title:
          type: string
        status:
          type: integer
        detail:
          type: string
        code:
          type: string
        request_id:
          type: string
  responses:
    BadRequest:
      description: Invalid request.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    Forbidden:
      description: >-
        The API key lacks the required permission (`insufficient_permission`),
        the organization's plan does not include API access
        (`plan_upgrade_required`; Pro and Enterprise only), or the organization
        is suspended (`org_suspended`).
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    NotFound:
      description: Resource not found.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    Conflict:
      description: >-
        Idempotency key conflict, an identical request still in progress, or a
        brand already exists for the requested website.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    Unprocessable:
      description: >-
        A product rule, plan limit, or credit limit blocked the request: not
        enough credits (`insufficient_credits`), an API key's monthly credit
        budget (`key_budget_exceeded`), a request costing more than its
        `max_credits` (`credit_limit_exceeded`), a plan without the feature
        (`plan_required`), or a rule the app enforces too (`request_rejected`,
        with the reason in `detail`).
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    RateLimited:
      description: API key rate limit exceeded.
      headers:
        Retry-After:
          schema:
            type: integer
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: lads_...

````