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

# Generate Talking Video

> Generate a talking video by animating a face image or video with speech. Provide either text + voice to generate audio, or supply your own audio file.

**Input combinations:**
- **Image + text + voice** — Generates speech from text using the specified voice, then animates the face in the image
- **Image + audio** — Uses the provided audio to animate the face in the image
- **Video + text + voice** — Generates speech from text, then lip-syncs the video
- **Video + audio** — Lip-syncs the video with the provided audio

**Models:**
- `premium` — High-quality avatar generation (VEED Fabric). Supports 480p and 720p.
- `standard` — Faster generation (WaveSpeed InfiniteTalk). Supports 480p and 720p.

Video generation is asynchronous. Use the [Get Video](/api-reference/endpoint/get-video) endpoint to poll for results.

**Note:** Requires a paid plan. Image must be at least 512x512 pixels. Audio/video max 5 minutes.

## Workflow

1. **Submit** a talking video request using this endpoint
2. **Save** the `id` from the response
3. **Poll** the [Get Video](/api-reference/endpoint/get-video) endpoint every 15–30 seconds until `status` is `completed`
4. **Download** the video from the `url` field

<Note>
  Talking video generation requires a **paid plan**. Processing typically takes **1–5 minutes** depending on audio length and resolution.
</Note>

## Input combinations

| Input   | Audio Source       | Description                                |
| ------- | ------------------ | ------------------------------------------ |
| `image` | `text` + `voiceID` | Generates speech, then animates the face   |
| `image` | `audio`            | Animates the face with provided audio      |
| `video` | `text` + `voiceID` | Generates speech, then lip-syncs the video |
| `video` | `audio`            | Lip-syncs the video with provided audio    |

## Voice IDs

Use the [Get TTS Voices](/api-reference/endpoint/get-tts-voices) endpoint to discover available voice IDs. Both ElevenLabs and OpenAI voices are supported.

## Requirements

* **Image**: minimum 512x512 pixels
* **Video**: .mp4 or .mov format, 3–300 seconds
* **Audio**: max 5 minutes


## OpenAPI

````yaml POST /api/generate-talking-video
openapi: 3.0.1
info:
  title: Easy-Peasy.AI API
  description: >-
    OpenAPI Specifications for the Easy-Peasy.AI API.


    All API requests must be authenticated with an API key. Include the
    `x-api-key` API key in the request header with all requests. You can get the
    API key [here](https://easy-peasy.ai/settings/api).
  version: 1.0.4
servers:
  - url: https://easy-peasy.ai
security:
  - apiKeyAuth: []
paths:
  /api/generate-talking-video:
    post:
      summary: Generate Talking Video
      description: >-
        Generate a talking video by animating a face image or video with speech.
        Provide either text + voice to generate audio, or supply your own audio
        file.


        **Input combinations:**

        - **Image + text + voice** — Generates speech from text using the
        specified voice, then animates the face in the image

        - **Image + audio** — Uses the provided audio to animate the face in the
        image

        - **Video + text + voice** — Generates speech from text, then lip-syncs
        the video

        - **Video + audio** — Lip-syncs the video with the provided audio


        **Models:**

        - `premium` — High-quality avatar generation (VEED Fabric). Supports
        480p and 720p.

        - `standard` — Faster generation (WaveSpeed InfiniteTalk). Supports 480p
        and 720p.


        Video generation is asynchronous. Use the [Get
        Video](/api-reference/endpoint/get-video) endpoint to poll for results.


        **Note:** Requires a paid plan. Image must be at least 512x512 pixels.
        Audio/video max 5 minutes.
      operationId: generateTalkingVideo
      parameters:
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
          description: Your API key
          example: 27feb2bb-aeb4-4a83-9fb6-8f3f2a15885e
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateTalkingVideoRequest'
            examples:
              image_with_text:
                summary: Image + text-to-speech
                value:
                  image: https://example.com/portrait.jpg
                  text: Hello! Welcome to our product demo.
                  voiceID: 21m00Tcm4TlvDq8ikWAM
                  avatarModel: premium
                  resolution: 720p
              image_with_audio:
                summary: Image + audio file
                value:
                  image: https://example.com/portrait.jpg
                  audio: https://example.com/narration.mp3
                  avatarModel: standard
                  resolution: 480p
              video_with_audio:
                summary: Video lip-sync with audio
                value:
                  video: https://example.com/clip.mp4
                  audio: https://example.com/narration.mp3
      responses:
        '200':
          description: Talking video generation started
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateVideoResponse'
              example:
                id: 12345
                prompt: Hello! Welcome to our product demo.
                image_url: ''
                is_video: true
                created_at: '2025-01-15T10:30:00.000Z'
        '400':
          description: Bad request — missing required fields or invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Image or video is required
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Invalid API key
        '403':
          description: Plan limit reached or free plan
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: >-
                  Talking video generation is not available on the Free plan.
                  Please upgrade to a paid plan.
components:
  schemas:
    GenerateTalkingVideoRequest:
      type: object
      properties:
        image:
          type: string
          format: uri
          description: >-
            URL of a face image to animate. Must be at least 512x512 pixels.
            Provide either `image` or `video`.
        video:
          type: string
          format: uri
          description: >-
            URL of a video to lip-sync. Supported formats: .mp4, .mov. Duration:
            3–300 seconds. Provide either `image` or `video`.
        text:
          type: string
          description: Text to convert to speech. Required if `audio` is not provided.
        voiceID:
          type: string
          description: >-
            Voice ID for text-to-speech. Get available voices from the [Get TTS
            Voices](/api-reference/endpoint/get-tts-voices) endpoint. Required
            if `text` is provided and `audio` is not.
        audio:
          type: string
          format: uri
          description: >-
            URL of an audio file to use directly (instead of generating from
            text). Max 5 minutes.
        avatarModel:
          type: string
          enum:
            - premium
            - standard
          default: premium
          description: >-
            Avatar generation model. `premium` uses VEED Fabric (higher
            quality), `standard` uses WaveSpeed InfiniteTalk (faster). Only
            applies to image input.
        resolution:
          type: string
          enum:
            - 480p
            - 720p
          default: 480p
          description: Output video resolution.
        generateCaptions:
          type: boolean
          description: Whether to generate captions on the video.
        captionColor:
          type: string
          description: Highlight color for captions (hex code).
    GenerateVideoResponse:
      type: object
      properties:
        id:
          type: integer
          description: >-
            Video ID. Use this to poll for the result with the Get Video
            endpoint.
        prompt:
          type: string
          description: The prompt used for generation
        image_url:
          type: string
          description: Video URL. Empty string while processing.
        model:
          type: string
          description: The model used for generation
        is_video:
          type: boolean
        created_at:
          type: string
          format: date-time
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message
          example: Invalid API key
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key for authentication. Get yours at
        https://easy-peasy.ai/settings/api

````