Practical guide

Automating AI Voiceover Videos: Integrating ElevenLabs with Creatomate API

Learn how to programmatically generate high-quality voiceover videos by combining ElevenLabs' text-to-speech engine with Creatomate's video rendering API. This guide covers setup, template configuration, and execution.

A diagram showing the workflow of an API request from a client to Creatomate, which then calls ElevenLabs for audio generation and returns a finished video file.

Creating engaging video content at scale requires more than just editing software; it demands automation. By integrating advanced text-to-speech services like ElevenLabs with video rendering APIs such as Creatomate, developers can produce professional-grade voiceover videos with animated captions and dynamic imagery through a single API call. This approach eliminates manual editing bottlenecks and ensures consistent quality across large volumes of content.

Context and practical value

The source provides a tutorial on creating AI voiceover videos by integrating ElevenLabs' text-to-speech API with Creatomate's video rendering API. It covers account setup, template configuration, and making API requests to generate videos with dynamic images and subtitles.

AtlasRepo structures the source tutorial into a comprehensive guide for developers, emphasizing the architectural benefits of API-driven video production. It clarifies the roles of each service, highlights best practices for asynchronous handling, and provides actionable steps for implementation, making it useful for engineers building scalable content pipelines.

Key takeaways

  • ElevenLabs provides high-fidelity, emotionally nuanced text-to-speech capabilities that surpass older robotic TTS engines.
  • Creatomate acts as an orchestration layer, handling video composition, subtitle generation, and asset integration via REST API.
  • A single API request can trigger the entire pipeline: text-to-speech conversion, subtitle creation, and final video rendering.
  • Templates in Creatomate are defined by JSON structures, allowing for programmatic customization of images and voiceover text.
  • Webhooks are the recommended method for handling asynchronous video rendering completion notifications.
  • Voice parameters like stability and similarity can be fine-tuned within the template to adjust emotional tone and consistency.

The Shift to High-Fidelity AI Voice

Traditional text-to-speech services often produced flat, robotic audio that lacked human nuance. Modern AI voice generation, particularly from providers like ElevenLabs, has significantly improved this landscape. These engines generate speech rich in emotion, tone, and depth, making it difficult to distinguish from human voice actors. For content creators and developers, this means automated videos can now maintain high engagement levels without requiring human voice talent. The integration of such high-quality audio into automated video workflows is a critical step for scaling content production.

Setting Up the Integration

To begin, you need accounts with both ElevenLabs and Creatomate. In ElevenLabs, select a voice from the library or clone a custom voice, then copy the Voice ID. Generate an API key with Text-to-Speech access enabled. In Creatomate, navigate to Project Settings and enable the ElevenLabs integration by pasting your API key. This connection allows Creatomate to call ElevenLabs directly during the rendering process, streamlining the workflow so you don't have to manage separate audio generation steps in your code.

Configuring the Video Template

Creatomate uses a template-based system where each composition represents a scene. You can select a pre-built 'Short-Form Voice Over' template or create one from scratch. Key elements include Voiceover, Subtitles, and Image placeholders. In the properties panel, set the Voiceover provider to ElevenLabs and input your Voice ID. You can adjust parameters like Stability (emotion/randomness) and Similarity (voice fidelity). Subtitles are automatically linked to the voiceover element, ensuring synchronization. Images can be set as dynamic placeholders to be replaced via API.

Executing the API Request

The core of the automation lies in the REST API call to Creatomate. You send a POST request to the renders endpoint with your API key, template ID, and a 'modifications' object. This object maps template elements to new values: image URLs for visual assets and text strings for voiceovers. Upon receiving the request, Creatomate processes the modifications, calls ElevenLabs to generate the audio, creates synchronized subtitles, and compiles the final video. The response includes a job ID and a URL to check status or download the final file.

Handling Asynchronous Rendering

Video rendering is a resource-intensive process that takes time. The API response initially returns a 'planned' status. You can poll the status endpoint periodically, but using webhooks is more efficient. By configuring a webhook in Creatomate, the service will send a POST request to your server when the video is ready. This allows your application to trigger downstream actions, such as uploading to social media platforms or notifying users, without constant polling.

Practical next steps

  1. Create an ElevenLabs account, select a voice, and copy its Voice ID for use in your templates.
  2. Generate an API key in ElevenLabs with Text-to-Speech permissions and connect it in Creatomate's Project Settings.
  3. Design a video template in Creatomate with dynamic Voiceover and Image elements, linking subtitles to the voiceover source.
  4. Write a script using cURL, Python, or Node.js to send a POST request to Creatomate's API, passing your template ID and modification data.
  5. Implement a webhook listener in your application to receive notifications when the video rendering is complete.

Limits and verification

  • Video rendering is asynchronous and may take several minutes depending on template complexity and server load.
  • The quality of the final video depends heavily on the accuracy of the text-to-speech engine and the design of the template.
  • API usage incurs costs based on the number of characters processed and video minutes rendered, which can scale quickly with high volume.

FAQ

Can I use my own voice instead of pre-made ones?

Yes, ElevenLabs allows voice cloning. You can upload recordings to create a custom voice, then use that Voice ID in your Creatomate template.

How are subtitles generated?

Creatomate automatically generates subtitles based on the text provided to the voiceover element. You can customize the style, animation, and positioning in the template editor.

What programming languages can I use?

Since Creatomate uses a standard REST API, you can use any language capable of making HTTP requests, including Python, Node.js, PHP, and more.