
How I Built My Own Free AI API in One Hour
Oct 12, 2025 • By Ege Uysal
Yesterday I built my own AI API. The whole thing took an hour.
I wasn't trying to build a product or compete with anyone. I just wanted a free AI API I could use in my projects without worrying about costs or rate limits.
Why I Built This
I wanted something that was completely mine. No API keys, no usage limits, no monthly bills. Just a simple AI API I could throw into any project.
The idea came to me randomly and I just started building immediately instead of overthinking it.
How It Works
I used my template repo Foundry to skip all the setup. Then I wrote about 100 lines of code for the API endpoints.
For the AI models, I'm using Ollama with smaller models like tinyllama, gemma3, and qwen3. They're lightweight and fast enough for what I need.
I deployed everything with Docker and Docker Compose, set up Nginx with SSL certificates, and pushed it live. You can check it out at copilot.egeuysal.com:9443 or see the code on GitHub.
I kept it simple on purpose. No streaming support because I didn't want WebSocket complexity. Just basic API calls that work.
What I Learned
Having templates and systems makes building things so much faster. Foundry has everything ready so I just focus on the actual functionality.
You don't need to plan everything out. Sometimes you just build something because it feels good to ship.
What's Next
I'm going to use this API in everything I build from now on. Every project that needs AI functionality, this will be my go-to.
If you want to try it out, the API is live and completely free to use. And if this inspired you to build something, that's cool too.