LLMfree APIOpenRouterGroqGeminiself-hostedAI agents

Free LLM APIs in 2026: One OpenAI-Compatible Endpoint Over 34 Free Providers

·8 min read

Searches for LLM routers are rising fast in India: OmniRoute, 9router, "agent router", "openrouter api key", "gemini api key". The reason is simple. Every AI lab now has a free tier, and each one alone is too small to run a real agent on. Put together behind one endpoint, they are enough for side projects, n8n workflows and personal agents, without a foreign-currency card bill.


This post covers what each free tier actually gives you, how I run FreeLLMAPI on my machine to stack them, and when to pick something else.


Last checked: 22 October 2026. Free tiers change often, so confirm limits on each provider's own page before you build on them.


Credit: FreeLLMAPI is tashfeenahmed/freellmapi, an MIT-licensed open-source project. I didn't write it; I run it.

The free tiers worth knowing


Provider What's free Catch
OpenRouter :free models 20 requests/min, 50/day; 1,000/day once you've bought at least $10 of credits (all time) The $10 top-up is about ₹900 plus forex markup on an Indian card
Groq Fast open models (Llama, gpt-oss, Qwen). For gpt-oss-120b: 30 req/min, 1K req/day, 8K tokens/min The token-per-minute cap, not the request count, is what you hit first
Google Gemini (AI Studio key) Flash and Flash-Lite models with a daily request quota, reset at midnight Pacific (12:30 pm IST) Limits vary by model and are shown only in AI Studio. Free-tier prompts may be used to improve Google's products
Cerebras, Mistral, Cloudflare Workers AI, NVIDIA NIM, GitHub Models, Hugging Face Small daily or per-minute allowances Some are scoped to "evaluation" or "prototyping" in their terms

Sources: OpenRouter's limits page, Groq's rate limits page, Google's Gemini rate limits. Groq's page lists the numbers as Developer-plan base limits; check your own console for what your account gets.


What this means in practice: a single free key runs out fast. My daily lead finder sleeps 35 seconds between Groq calls just to stay under 8K tokens a minute. A router that falls over to the next provider when one returns 429 removes that whole class of problem.


What FreeLLMAPI does


You add your free keys from each provider once. It gives you back one OpenAI-compatible endpoint and one key.


  • Routing with fallover: when Groq is rate-limited, the request goes to Gemini, then Cerebras, and so on, in an order you set (the "Fallback Chain").
  • Quota tracking per key, so it stops sending to a provider before the provider blocks you.
  • Routing modes in the model field: auto (balanced), auto:fast, auto:smart, auto:reliable, or a specific model id.
  • An X-Routed-Via header on every response tells you which provider and model actually answered.
  • Keys encrypted at rest with your own ENCRYPTION_KEY.

  • The project claims about 7.4 billion free tokens a month across 34 providers and 635 model endpoints. Treat that as the theoretical ceiling. You only get what you add keys for.


    Setup with Docker (5 minutes)


    
    git clone https://github.com/tashfeenahmed/freellmapi && cd freellmapi
    printf "ENCRYPTION_KEY=%s\nPORT=3001\n" "$(openssl rand -hex 32)" > .env
    docker compose up -d        # or: podman-compose up -d
    

    Then:


    1. Open http://localhost:3001

    2. Keys page: paste your Groq, Gemini (AI Studio), OpenRouter and Cerebras keys. All four are free to create.

    3. Drag the Fallback Chain into the order you want. I put the fastest providers first (Groq, Cerebras), then Gemini, then OpenRouter.

    4. Copy the unified API key from the Keys page header.


    There's also a one-line installer on the project's site, plus desktop apps for macOS and Windows. Read the script before you pipe it into bash.


    Keep it on localhost. The compose file binds to 127.0.0.1 on purpose. It has no multi-user auth, so never expose port 3001 to the internet. If n8n runs on another machine, reach it over a private network or tunnel, not a public port.


    Using it from code


    Any OpenAI SDK works by changing the base URL:


    
    from openai import OpenAI
    
    client = OpenAI(base_url="http://localhost:3001/v1", api_key="freellmapi-your-unified-key")
    
    resp = client.chat.completions.create(
        model="auto:fast",
        messages=[{"role": "user", "content": "Summarise this WhatsApp message in Hindi: ..."}],
    )
    print(resp.choices[0].message.content)
    

    
    curl http://localhost:3001/v1/chat/completions \
      -H "Authorization: Bearer freellmapi-your-unified-key" \
      -H "Content-Type: application/json" \
      -d '{"model":"auto","messages":[{"role":"user","content":"hello"}]}' -i | grep -i routed-via
    

    Using it from n8n


    In n8n, create an OpenAI credential, set the API key to your unified key and the Base URL to:


  • http://localhost:3001/v1 if n8n runs directly on the same machine
  • http://host.docker.internal:3001/v1 if n8n runs in Docker on the same machine

  • Then use the normal OpenAI Chat Model node inside an AI Agent, with the model set to auto. That's all you need to run the AI replies in my WhatsApp + n8n workflows at ₹0 instead of paying per token.


    Using it from coding agents


    The project has setup commands for Claude Code, Codex, Aider, OpenCode, Cline and others (npx freellmapi setup-claude, setup-codex, ...). Agents like OpenClaw and Hermes accept any OpenAI-compatible base URL.


    A warning from experience: free models are fine for summarising, classifying and drafting, but weak for long agentic coding sessions. The project's own docs say the endpoint gets less capable late in the day, as the best models hit their daily caps and the router falls back to smaller ones. Caps reset at UTC midnight, which is 5:30 am IST, so Indian evenings are the worst time to rely on it.


    FreeLLMAPI vs OmniRoute vs 9router vs OpenRouter


    FreeLLMAPI OmniRoute 9router OpenRouter
    What it is Self-hosted router over free tiers Self-hosted AI gateway Local proxy for coding tools Hosted API, one key
    License MIT MIT MIT Commercial service
    Main idea Stack free API keys Many providers, tiers from subscription → paid → free Route coding agents across subscriptions, cheap and free models; token saving Pay-as-you-go access to hundreds of models
    Default port 3001 20128 20128 n/a
    Best for n8n, scripts, personal agents Teams wanting one gateway with fallbacks Claude Code / Cursor / Codex users When you need reliability and frontier models

    OmniRoute (diegosouzapw/OmniRoute) and 9router (decolua/9router) are newer, and the provider counts quoted about them vary a lot between sources, so check their READMEs. If you install OmniRoute, set its admin password; third-party guides warn that the default is a placeholder.


    Is this allowed?


    Running your own keys through a personal, single-user proxy is generally fine. Reselling access is not, and some providers (NVIDIA NIM, GitHub Models) limit free use to evaluation or prototyping. FreeLLMAPI's docs include a per-provider terms review. Read it before putting anything client-facing on free tiers.


    When to pay instead


  • A client's production workflow: use a paid key with a contract. Free tiers have no SLA.
  • Anything with personal or customer data you can't send to a provider that may train on free-tier prompts.
  • Long coding sessions where model quality matters more than cost.

  • For everything else (prototypes, internal automations, personal agents), stacking free tiers costs ₹0 and saves you an international card bill every month.


    Checklist


  • [ ] Create free keys: Groq, Google AI Studio, OpenRouter, Cerebras
  • [ ] Run FreeLLMAPI with Docker or podman, bound to localhost
  • [ ] Set your Fallback Chain, fastest first
  • [ ] Point n8n / scripts / agents at /v1 with model: "auto"
  • [ ] Check X-Routed-Via while testing
  • [ ] Keep a paid key for anything client-facing

  • Need an AI workflow that runs on free models where it can and paid ones only where it must? Get in touch.

    Built something similar or want to talk through the architecture? Get in touch.