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

# Generate Video

> Generate a video. Set `mode` to control what kind of video you get:

- `prompt` — create a video from a text description
- `animate` — animate a still image
- `reference` — use an image as a style/subject reference (not the first frame)
- `extend` — continue an existing video
- `first-last` — generate a video that transitions between two images
- `lipsync` — sync face movement to an audio clip

If `mode` is omitted, it's inferred from the inputs you provide.



## OpenAPI

````yaml api-reference/openapi/content.json POST /api/content/video
openapi: 3.1.0
info:
  title: Recoup API - Content
  description: >-
    API documentation for the Recoup platform - an AI agent platform for the
    music industry
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.recoupable.dev
security: []
paths:
  /api/content/video:
    post:
      description: >-
        Generate a video. Set `mode` to control what kind of video you get:


        - `prompt` — create a video from a text description

        - `animate` — animate a still image

        - `reference` — use an image as a style/subject reference (not the first
        frame)

        - `extend` — continue an existing video

        - `first-last` — generate a video that transitions between two images

        - `lipsync` — sync face movement to an audio clip


        If `mode` is omitted, it's inferred from the inputs you provide.
      requestBody:
        description: Video generation parameters
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContentCreateVideoRequest'
      responses:
        '200':
          description: Video generated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentCreateVideoResponse'
        '400':
          description: Validation failed — invalid or missing request body fields
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentErrorResponse'
        '401':
          description: Unauthorized — invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentErrorResponse'
      security:
        - apiKeyAuth: []
        - bearerAuth: []
components:
  schemas:
    ContentCreateVideoRequest:
      type: object
      required:
        - image_url
      properties:
        template:
          type: string
          description: >-
            Optional template ID. When provided, the template's video config
            (moods, movements) is used as the motion prompt. Caller params
            override template defaults. See [GET
            /api/content/templates](/api-reference/content/templates) for
            available options.
        mode:
          type: string
          enum:
            - prompt
            - animate
            - reference
            - extend
            - first-last
            - lipsync
          description: >-
            What kind of video to generate. If omitted, inferred from the inputs
            you provide.
        prompt:
          type: string
          description: Text describing the video content, motion, or how to continue/extend
        image_url:
          type: string
          format: uri
          description: >-
            Required. Image URL used as the input frame. The underlying model
            (fal-ai/veo3.1/fast/image-to-video) requires an image — text-only
            prompt mode is not supported. Generate an image first via POST
            /api/content/image if needed.
        end_image_url:
          type: string
          format: uri
          description: End frame image URL. Only used with `first-last` mode
        video_url:
          type: string
          format: uri
          description: >-
            Video URL to extend. Only used with `extend` mode (max 8 seconds
            input)
        audio_url:
          type: string
          format: uri
          description: >-
            Audio URL for lipsync mode. The generated face will move in sync
            with this audio
        aspect_ratio:
          type: string
          enum:
            - auto
            - '16:9'
            - '9:16'
          default: auto
          description: Aspect ratio of the output video
        duration:
          type: string
          enum:
            - 4s
            - 6s
            - 7s
            - 8s
          default: 8s
          description: Duration of the generated video
        resolution:
          type: string
          enum:
            - 720p
            - 1080p
            - 4k
          default: 720p
          description: Output resolution
        negative_prompt:
          type: string
          description: Describe what you do NOT want in the video
        generate_audio:
          type: boolean
          default: false
          description: Generate audio for the video
        model:
          type: string
          description: Override the model. Auto-selected based on mode if omitted
    ContentCreateVideoResponse:
      type: object
      required:
        - videoUrl
        - mode
      properties:
        videoUrl:
          type: string
          format: uri
          description: URL of the generated video
        mode:
          type: string
          enum:
            - prompt
            - animate
            - reference
            - extend
            - first-last
            - lipsync
          description: >-
            The resolved video generation mode (explicit or inferred from
            inputs)
    ContentErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Error message describing what went wrong
          example: Unauthorized
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Your Recoup API key. [Learn more](/quickstart#api-keys).
    bearerAuth:
      type: http
      scheme: bearer

````