Dev.to
7/15/2026

I Built an OpenAI-Compatible Gateway to Control LLM Costs
Short summary
An indie developer built CostLLM, an OpenAI-compatible API gateway that sits between your code and LLM providers to give per-project cost visibility, hard budget caps, and rate limiting via virtual API keys. It works as a drop-in replacement for any OpenAI SDK by changing only the base URL. The stack includes FastAPI, Redis, PostgreSQL, and supports DeepSeek models with a free tier offering $10 signup credit.
- •CostLLM is an OpenAI-compatible gateway for per-project LLM cost control
- •Virtual API keys enable usage tracking, budget caps, and rate limiting
- •Drop-in compatible with any OpenAI SDK; free tier includes $10 credit
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



