Siddhio.ai guide

Free LLM APIs: Where to Start

Use free tiers from Google, Groq and OpenRouter for prototypes, with one code pattern that works for all of them.

The short version

Several providers offer permanent free tiers for text models. For prototypes, the usual starting points are the Gemini API through Google AI Studio, Groq for very fast open models, and OpenRouter's models marked :free. Free tiers are rate-limited and change often, so check each provider's limits page before you rely on them.

ProviderWhat's freeOpenAI-compatible base URL
Google Gemini APISelected Flash and Flash-Lite models; limits shown in AI Studiohttps://generativelanguage.googleapis.com/v1beta/openai/
GroqOpen models with per-minute and per-day capshttps://api.groq.com/openai/v1
OpenRouterModels ending in :free, with request capshttps://openrouter.ai/api/v1
Cloudflare Workers AIA daily allowance of “neurons”See Cloudflare's docs

One pattern for all of them

Most of these providers accept the OpenAI SDK format, so you can switch by changing three values:

from openai import OpenAI
import os

client = OpenAI(
    base_url="https://api.groq.com/openai/v1",   # or another provider
    api_key=os.environ["GROQ_API_KEY"],
)
reply = client.chat.completions.create(
    model="<model-id from the provider's model list>",
    messages=[{"role": "user", "content": "Write a product title for a linen tote bag."}],
)
print(reply.choices[0].message.content)

Rules that save you trouble

Sources

33 free resources below