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

# Text To Video Generator

> Generate a real life avatar video from text. Provide a script along with an avatar, voice, and provider configuration to produce a rendered video. The response returns a `generation_id` which can be used to track the status of the video generation.



## OpenAPI

````yaml POST /script-to-video/createVideo
openapi: 3.0.3
info:
  title: TruGen Developer Platform API
  version: 1.0.0
  description: OpenAPI specification for MCP endpoint
servers:
  - url: https://api.trugen.ai/v1
security: []
paths:
  /script-to-video/createVideo:
    post:
      summary: Text To Video Generator
      description: >-
        Generate a real life avatar video from text. Provide a script along with
        an avatar, voice, and provider configuration to produce a rendered
        video. The response returns a `generation_id` which can be used to track
        the status of the video generation.
      operationId: createTextToVideo
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - avatar_id
                - voice_id
                - provider_name
                - model_name
                - script
              properties:
                avatar_id:
                  type: string
                  description: >-
                    The unique identifier of the avatar to use for video
                    generation.
                  example: avatar_abc123
                voice_id:
                  type: string
                  description: >-
                    The unique identifier of the voice to use for the audio
                    narration.
                  example: ZUrEGyu8GFMwnHbvLhv2
                provider_name:
                  type: string
                  description: The name of the TTS provider to use for audio synthesis.
                  example: elevenlabs
                model_name:
                  type: string
                  description: >-
                    The model name within the provider to use for audio
                    synthesis.
                  example: eleven_multilingual_v2
                script:
                  type: string
                  description: >-
                    The text script that the avatar will speak in the generated
                    video.
                  example: >-
                    Welcome to Trugen AI. This is a demonstration of our text to
                    video generation capability.
                callback_url:
                  type: string
                  description: >-
                    An optional URL that will receive a POST request when the
                    video generation is complete.
                  example: https://your-app.com/webhook/video-ready
      responses:
        '200':
          description: Video generation successfully initiated.
          content:
            application/json:
              schema:
                type: object
                properties:
                  estimated_duration:
                    type: number
                    description: Estimated duration of the generated video in seconds.
                    example: 2.09
                  generation_id:
                    type: string
                    description: >-
                      Unique identifier for this video generation job. Use this
                      to track or retrieve the result.
                    example: 529fb61c-da5d-4b2d-9d49-b612deede60f
                  status:
                    type: string
                    description: Current status of the video generation job.
                    example: processing
              example:
                estimated_duration: 2.09
                generation_id: 529fb61c-da5d-4b2d-9d49-b612deede60f
                status: processing
        '401':
          description: Unauthorized – invalid or missing API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: 'Unauthorized: not a valid authorization api key'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: Failed to initiate video generation
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````