Free modelsExplainedDaily archiveLive dashboard
Free AI models · OpenAI-compatible

Free OpenAI-compatible APIs: 4 that work today

Four free LLM APIs that work with the OpenAI SDK by changing one line: OpenRouter (13 free models), Gemini, Groq and Cloudflare, with base URLs and limits.

Checked 22 November 2026 from each provider's own docs. Free tiers change, so follow the source links before you build on one.

Swap one line, keep your code

Each API below works with the official OpenAI libraries. Change base_url and the API key, and pick a model the provider offers for free.

from openai import OpenAI
client = OpenAI(base_url="BASE_URL_FROM_THE_LIST", api_key="YOUR_KEY")

4 free OpenAI-compatible APIs

More free AI guides

Questions

Which free APIs are OpenAI-compatible?

OpenRouter, Google's Gemini API, Groq and Cloudflare Workers AI all offer OpenAI-compatible endpoints with a free tier. OpenRouter has 13 free models today.

What is the Gemini OpenAI-compatible base URL?

https://generativelanguage.googleapis.com/v1beta/openai/ — Google says this support is still in beta.

What is the Groq OpenAI-compatible base URL?

https://api.groq.com/openai/v1. Groq notes a few OpenAI fields such as logprobs and logit_bias are not supported.

Share: XBlueskyLinkedInWhatsAppReddit

Get this in your inbox at 7am

One free email each morning with the AI repos, models and stories that are picking up speed, including new free models. Your own time zone, no spam.

See today's email