Free alternatives to the OpenAI API
7 services, checked weekly
The OpenAI API is mainly paid per token. These AI APIs have a lasting free plan or free tier for text generation and chat, usually with a free key and a rate limit, and several (such as Groq, OpenRouter and Pollinations.ai) accept the same request format as the OpenAI API, so existing code often works by changing the base address.
| Service | Category | API key | Formats | Free use |
|---|---|---|---|---|
| Google Gemini API | Artificial intelligence | Needed, free | JSON | Free tier for most text, speech and embedding models with a free API key and rate limits; content sent on the free tier may be used by Google to improve its products, so use the paid tier for private data. |
| Groq API | Artificial intelligence | Needed, free | JSON | Free plan with a free API key and rate limits per model; paid plans for higher limits. |
| OpenRouter | Artificial intelligence | – | JSON | Free models are limited to 20 requests per minute and 50 per day, or 1,000 per day once you have bought at least 10 credits; other models are paid per token. |
| Cloudflare Workers AI | Artificial intelligence | Needed | JSON | The Workers Free plan includes 10,000 'neurons' (Cloudflare's unit of AI compute) per day; requests above that fail until the daily reset, unless you move to the paid plan. |
| GitHub Models | Artificial intelligence | Needed | JSON | Free for every GitHub account, with daily and per-minute request limits per model that depend on your Copilot plan; paid usage is available for more. |
| Cohere API | Artificial intelligence | – | JSON | Free trial key without a time limit, limited to 1,000 calls per month and a per-minute rate limit; production use needs a paid key. |
| Pollinations.ai | Artificial intelligence | Not needed | – | Free, works without a key or sign-up; registering gives higher limits. |