跪拜 Guibai
← Back to the summary

Build Your Own AI Image & Video Studio on a Free API

Here's the Story

Last month I came across a news item about a team called Agnes AI that had made the APIs for their text, image, and video models completely free — indefinitely.

My first reaction was: Is this thing legit?

After all, the word "free" in the AI world usually means: free for the first few tries → then you start paying → and it's not cheap. But after looking into it, Agnes wasn't running some limited-time promotion — they genuinely made all API tokens free. In the first week alone, the image model generated over 2 million images.

Honestly, I was moved.

I often need to create illustrations and cover images, and sometimes I want to make a short video for fun, but I don't want to spend dozens of dollars a month on AI tools. Midjourney costs money, Runway costs money, Pika costs money — they're great, but for a light user like me, subscribing just for a few images always feels like a waste.

So I thought: Since the API is free, why not build my own tool that wraps these capabilities into something I can use freely?

And that's how this project — Agnes Creator Studio — was born.

Project repo here, a Star⭐️ would be appreciated: 👉 https://github.com/you-want/agnes-image-tool

What This Tool Can Do

Simply put, it's a Gradio-based web interface that calls Agnes AI's free APIs to generate images and videos.

Currently supported features:

Text-to-Image: Enter a description and the AI generates an image. Supports sizes like 1024×1024, 1024×1792 (TikTok portrait), 1792×1024 (landscape), and more.

Image-to-Image: Upload your own image and tell the AI what style to convert it to. For example, upload a landscape photo and enter "oil painting style, impressionist" — the AI outputs an oil-painted version. You can adjust the redraw strength from 0.1 to 1.0; higher values mean more change.

Text-to-Video: Enter a description to generate a 3- to 18-second video. Supports resolutions of 1080p, 720p, 480p, and frame rates from 12 to 60 FPS. Aspect ratios include 16:9, 9:16, 1:1, 4:3, and 3:4.

Image-to-Video: Upload an image to generate a dynamic video. This requires the image to have a public URL — but if you deploy the project on a server, uploading local images also works.

Multi-Image Video / Keyframe Animation: Upload multiple images and generate smooth transitions between them. Great for product showcases or creative shorts.

There's also a history feature that automatically saves all generated content for later viewing and download.

d2939f48f2cad4c26af861d5b2e8db6a.png

How to Use

If you want to run it on your own machine, the steps are simple:

# 1. Clone the project
git clone https://github.com/you-want/agnes-image-tool.git
cd agnes-image-tool

# 2. Install dependencies
pip install -r requirements.txt

# 3. Get a free API Key from agnes-ai.com, then set the environment variable
export AGNES_API_KEY="your-api-key"

# 4. Launch
python app.py

Then open http://localhost:7860 in your browser and you're ready to go.

If you don't want to run it locally, you can also deploy it with Docker in one click, or directly to Hugging Face Spaces.

The entire project consists of just five core files: app.py (main interface), api_client.py (API calls), config.py (configuration), utils.py (utility functions), and styles.py (styles). The codebase is small and clean, making it easy to modify.

Tech Stack

The backend uses Python 3.10+, and the UI framework is Gradio 6.0. Gradio is especially suitable for rapid prototyping of AI tools — you can build a demo with a UI in just a few lines of code.

API requests are handled with Requests, and images are transmitted using Base64 encoding. Nothing fancy — the focus is on simplicity and usability.

Some Real Thoughts

The process of writing this tool made me rethink a question: How should AI tools be built?

Currently, AI tools on the market tend to fall into two extremes. Either they are extremely powerful but prohibitively expensive, or they are free but come with all sorts of restrictions — limited daily usage, watermarks, no commercial use, endless queues.

Agnes's free API offering actually presents a third possibility: Developers can build their own tools on top of free APIs, so users don't have to pay for every small need.

For me personally, this tool solves a very practical pain point — when I need an illustration, I open the webpage, enter a description, click generate, and I'm done. No need to open the Midjourney Discord channel, no need to remember complex parameters, no need to wait in line.

And because it's deployed locally, all data stays on your own machine, which is reassuring for privacy.

Let's Be Real

This project certainly can't compare to products that big companies have spent tens of millions on. The interface isn't flashy, and the features aren't the most comprehensive.

But its core value lies in: Free, usable, and under your own control.

If you're like me — occasionally needing AI-generated images and videos without wanting to waste money on subscriptions for such small needs — give this tool a try.

The project is open-sourced under the MIT license — feel free to use, modify, or even use it commercially. Any issues are welcome, and I will continue to maintain it.

Finally, if you find it useful, giving it a Star⭐️ on GitHub is the greatest encouragement.

👉 https://github.com/you-want/agnes-image-tool

PS: Agnes's API is currently free, but who knows if it will change in the future. Use it while you can!