Illustration of what freellmapi does: One OpenAI-style API that routes across dozens of free LLM provider tiers

tashfeenahmed /

freellmapi

One OpenAI-style API that routes across dozens of free LLM provider tiers

Most AI labs offer a small free tier, a few million tokens a month or a few thousand requests a day. Each one alone is small, and juggling many SDKs and rate limits by hand is a chore. FreeLLMAPI puts them behind one OpenAI-compatible endpoint, so any client that speaks that API can point at your server.

You add your own keys for the providers you want, and they are stored encrypted. For each request, a router ranks the available models by speed, capability and reliability. If a provider returns a rate-limit or server error, it tries the next one. It also counts usage per key so it stays under each free-tier cap.

The README compares it with OpenRouter, LiteLLM and Portkey. Its focus is stacking free tiers, and it also speaks Anthropic, Gemini and Ollama formats so coding agents like Claude Code, Codex CLI and Aider can use it. The README says it is for personal experimentation only. A paid plan ($19/yr) gets new models in the catalog the same day, while free installs get them 30 days later.

What it does

  • Many API surfaces, one server

    Covers chat completions, responses, embeddings, images, video, speech and transcription. It also offers Anthropic Messages, Gemini and optional Ollama-style endpoints.

  • Routing and failover

    Ranks models by live speed, capability and reliability scores. On 429 or 5xx errors it retries the next model, with cooldowns and key rotation. Six routing strategies are offered.

  • Per-key rate tracking

    Counts requests and tokens per minute and per day for each provider, model and key, so routing stays under every cap.

  • One-command client setup

    Commands like npx freellmapi setup-claude, setup-codex and setup-aider configure coding agents, back up existing config and avoid overwriting it.

  • Fusion and custom endpoints

    A virtual fusion model sends a prompt to several free models and has a judge model combine the drafts. You can also add any OpenAI-compatible endpoint, such as Ollama, vLLM or LM Studio.

What you could build

  • Point Claude Code, Aider or Cline at a pool of free models to try them at no cost.
  • Build a prototype with the OpenAI SDK that falls back across providers when one is rate-limited.
  • Compare answers from several free models by calling the fusion model.
  • Combine a local Ollama or llama.cpp server with hosted free tiers behind one endpoint.
  • Set up named fallback chains, such as a coding chain and a vision chain, and pick one per request.

Get started

The excerpt of the README does not include the quick start commands. Check the install guide (docs/en/install/01-install.md) for Docker Compose or the desktop apps, add your provider keys on the Keys page, then point your client at the server's /v1 URL.

Commands are copied from the project's README. Read it on GitHub for the full setup.

More in Token & cost savings

    ↑↓ to move, Enter to open, Esc to close