Free alternatives to the OpenAI API
11 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 | AI models and chat | 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 | AI models and chat | Needed, free | JSON | Free plan with a free API key and rate limits per model; paid plans for higher limits. |
| OpenRouter | AI models and chat | Needed, free | 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 | AI models and chat | Needed, free | 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 | AI models and chat | Needed, free | 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 | AI models and chat | Needed, free | 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. |
| Z.ai API (GLM Flash models) | AI models and chat | Needed, free | JSON | Free with a free API key for the Flash models: GLM-4.7-Flash, GLM-4.5-Flash and GLM-4.6V-Flash. |
| OVHcloud AI Endpoints | AI models and chat | Not needed | JSON | Free without a key at up to 2 requests per minute per IP address and per model; an API key from a paid Public Cloud project raises this to 400 requests per minute, billed per token. |
| Requesty | AI models and chat | Needed, free | JSON | Free with a free API key for models marked free, up to 200 requests per day, no credit card; other models are paid per token. |
| Kilo AI Gateway | AI models and chat | Not needed | JSON | Free without a key for models tagged :free, up to 200 requests per hour per IP address; other models need a Kilo API key and paid credits. |
| Pollinations.ai | Speech, image and audio | Not needed | – | Free, works without a key or sign-up; registering gives higher limits. |