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

# Create a video ad from image(s)



## OpenAPI

````yaml /openapi.yaml post /v1/videos
openapi: 3.1.0
info:
  title: Cherry Shot API
  version: 1.0.0
  description: >
    Generate studio-quality product photography and video ads programmatically.
    Authenticate with an API key (`Authorization: Bearer cs_...` or `x-api-key:
    cs_...`). Generation is asynchronous: create a shoot or video, then poll it
    until `status` is `completed`. Credits are charged the same as in the app.
servers:
  - url: https://ybhqmgyprapjxomdxifs.supabase.co/functions/v1/api
    description: Production
security:
  - ApiKeyAuth: []
  - BearerAuth: []
paths:
  /v1/videos:
    post:
      summary: Create a video ad from image(s)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - image_urls
                - duration
                - resolution
              properties:
                image_urls:
                  type: array
                  items:
                    type: string
                    format: uri
                duration:
                  type: integer
                  enum:
                    - 5
                    - 10
                    - 15
                resolution:
                  type: string
                  enum:
                    - 480p
                    - 720p
                    - 1080p
                mode:
                  type: string
                  enum:
                    - product_only
                    - with_model
                  default: product_only
                aspect_ratio:
                  type: string
                  enum:
                    - '21:9'
                    - '16:9'
                    - '4:3'
                    - '1:1'
                    - '3:4'
                    - '9:16'
                logo_url:
                  type: string
                  format: uri
                music:
                  type: boolean
                  default: true
                note:
                  type: string
                callback_url:
                  type: string
                  format: uri
      responses:
        '201':
          description: Video created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Video'
        '400':
          $ref: '#/components/responses/ValidationError'
        '402':
          $ref: '#/components/responses/InsufficientCredits'
components:
  schemas:
    Video:
      type: object
      properties:
        id:
          type: string
        object:
          type: string
          example: video
        status:
          type: string
          enum:
            - pending
            - submitted
            - generating
            - completed
            - failed
        video_url:
          type: string
          nullable: true
        credits_used:
          type: integer
        credits_remaining:
          type: integer
        created_at:
          type: string
          format: date-time
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
  responses:
    ValidationError:
      description: Invalid request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InsufficientCredits:
      description: Not enough credits
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
    BearerAuth:
      type: http
      scheme: bearer

````