I Built a Free AI API Gateway — Here's The Code
🔧 Building a Free AI API on Cloudflare Workers
The Architecture
- Cloudflare Workers — Edge computing, 100k req/day free
- DeepSeek V4 — Official API behind the scenes
- GitHub Pages — Static docs (free hosting)
- BTC — Payment rails for premium
Why This Works
- Cloudflare free tier is generous (100k req/day)
- DeepSeek's API is fast and affordable
- IP rate limiting eliminates user management
- BTC payments are permissionless
Live Demo
curl https://free-llm-api.jianchuan.workers.dev/v1/chat/completions -H "Authorization: Bearer free" -H "Content-Type: application/json" -d '{"model":"deepseek-v4-flash-free","messages":[{"role":"user","content":"Explain monads"}]}'
Full docs: https://jianchuan3.github.io/free-ai-api-deepseek/