Ramesh Inampudi

AI and agents

Building an AI Short Video Generator from a Single Topic

By Ramesh Inampudi · 2026-07-15 · 4 min read

Making a short video sounds like one task, but it is really five or six small ones chained together: write a script, find footage that matches it, record a voiceover, time subtitles to the speech, pick music, and render everything into the right shape. Each step has its own tools and its own way of going wrong. I built BuildshortVideos to collapse that chain into one input: you give it a topic or keyword, and it produces a publish-ready short video.

Why I built it

The pain with short-form video is not any single step, it is the hand-offs between them. A script written in one tool has to be read aloud in another, and the footage has to be searched for and trimmed by hand. The subtitles then have to be lined up against audio that already exists. I wanted a pipeline where the output of each stage feeds the next automatically, so the only creative decision left for me is the topic.

I also wanted it to work for the languages I care about. Many tools in this space assume English or Chinese. As someone based in Hyderabad, I wanted Hindi, Telugu, Tamil and the other Indian languages to be first-class, not an afterthought.

What it does

From a topic, BuildshortVideos:

You can drive it through a web UI, a REST API, or the command line. The UI is a dark gold glassmorphism theme, which is what the CSS in the repository is for.

How it works

The project is mostly Python (3.11 or newer), with CSS for the interface theme, shell and batch scripts to launch it on macOS, Linux and Windows, and a Dockerfile for containerized runs. The web UI and the REST API run side by side, and the API ships with Swagger and ReDoc documentation.

Providers behind one setting

The most reusable decision was treating every external service as a swappable provider. Script generation supports Groq (Llama 3.3 70B), OpenAI, Gemini, DeepSeek, Qwen, Azure OpenAI, Ollama, Moonshot, Cloudflare AI Gateway and Pollinations. You pick one by setting LLM_PROVIDER in a .env file. Voice works the same way: Edge TTS, Azure Speech, Google Gemini TTS, ElevenLabs or SiliconFlow. Footage comes from Pexels, Pixabay, Coverr or local files.

This matters because free tiers change, rate limits get hit, and quality differs by language. If a provider becomes a problem, you change a setting rather than rewrite code.

Free by default

I picked defaults so that someone can get a first video without paying for anything. Edge TTS is the default voice: it needs no API key and covers Hindi, Telugu, Tamil, Kannada, Malayalam, Marathi, Bengali, Gujarati, Punjabi and Urdu. For the script, Groq has a free tier, and Pexels and Pixabay offer free APIs for footage. The quickest path is a Groq key plus a Pexels key, and nothing else is required.

Configuration and secrets

API keys live in a .env file in the project root, which is gitignored so keys never get committed. Setup is a clone, a dependency install (I recommend uv with uv sync --frozen, with pip and a virtual environment as the alternative), a .env file, and then sh webui.sh or webui.bat. The REST API starts with python main.py.

Hardware

Video rendering is the heavy part. The minimum I list is 4 CPU cores, 4 GB of RAM and 2 GB of free storage, with 8 or more cores, 16 GB of RAM and 10 GB of storage recommended. A GPU is optional and mainly helps with batch generation and local transcription.

What I learned

These are the design lessons I would reuse in any pipeline that depends on third-party AI services.

  1. Put an interface in front of every provider. With ten LLM options and five voice options, the only way to stay sane is one narrow contract per stage and one setting to choose the implementation.
  2. Make the free path the default path. A tool that needs three paid accounts before the first output loses people early. Defaulting to Edge TTS and a free LLM tier lets anyone see a result first and decide about upgrades later.
  3. Treat language as a feature of every stage. Supporting Telugu is not only a TTS question. The script model must write it well, the voice must pronounce it, and the subtitle font must render it. Listing languages by locale code (such as te-IN or hi-IN) keeps the choice consistent across stages.
  4. Offer more than one interface. A web UI is friendly for one-off videos, while an API and a CLI make batch work and automation possible. Keeping all three on the same core logic avoids three diverging code paths.
  5. Keep secrets out of the repository from day one. A gitignored .env file is a small habit that prevents a very common mistake.

Conclusion

BuildshortVideos is my attempt to turn a multi-tool video workflow into a single step: topic in, finished short video out. The part I would carry into other projects is the provider-per-stage design, with free defaults and one setting to switch. If you are building something that chains several AI services, start there. If you have questions or ideas about the project, you can reach me at hello@iramesh.com.