ZSZainSpireLibrary
Setup guide · updated 7 Nov 2026

Free AI tokens for your tools, set up step by step

Two free, open-source projects pool the free tiers of many AI providers behind one API: FreeLLMAPI (about 7.4 billion tokens a month across 34 providers) and OmniRoute (about 1.6 billion, plus prompt compression). This guide gets FreeLLMAPI running on Windows in about 15 minutes and connects it to Claude Code.

Read this first These are not Claude's own tokens. Claude Code is the tool; the answers come from free models like Gemini, Mistral or Groq. The token numbers are the total of every free tier added up, so you only get what the providers you connect allow. Each provider has its own terms: one account per provider, personal use, no reselling. Don't send client or private data through free tiers.

01What you need

02Install FreeLLMAPI

Windows (easiest): the desktop app

  1. Open the FreeLLMAPI releases page and download the Windows Setup .exe.
  2. Install it. It starts in the system tray and needs no password.
  3. Click the tray icon, then Open Dashboard.

Mac or Linux: one line (needs Docker)

curl -fsSL https://freellmapi.co/install.sh | bash

Then open http://localhost:3001. Prefer to read a script before running it? It is here. Docker Compose and source installs are in the install docs.

03Get free API keys

Start with these five. More keys means more free tokens and more fallbacks.

Groqconsole.groq.com/keysvery fast open models
Google AI Studioaistudio.google.com/apikeyGemini models
Mistralconsole.mistral.aiAPI keys page
Cerebrascloud.cerebras.aifast inference
OpenRouteropenrouter.ai/keysmany free models

Sign up with your own email, create a key, and copy it. The full, current list of supported providers is at freellmapi.co/models.

04Add the keys and copy your unified key

  1. In the dashboard, open the Keys page and paste each provider key. FreeLLMAPI encrypts them on your computer.
  2. Optional: on the Models page pick a routing strategy, like Balanced or Fastest.
  3. Copy the unified API key from the top of the Keys page. Your tools only ever see this one key.

Quick test in a terminal (replace the key):

curl http://localhost:3001/v1/chat/completions \
  -H "Authorization: Bearer YOUR_UNIFIED_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"auto","messages":[{"role":"user","content":"Say hello"}]}'

05Connect Claude Code

The cleanest way starts Claude Code against your free pool without writing the key into any config file:

npx freellmapi launch

Or write a permanent Claude Code setup. Preview first with --dry-run; the real run backs up your old settings:

npx freellmapi setup-claude --url http://localhost:3001 --api-key YOUR_UNIFIED_KEY --dry-run
npx freellmapi setup-claude --url http://localhost:3001 --api-key YOUR_UNIFIED_KEY

Using Cursor, Cline, Codex or an SDK instead? Point it at http://localhost:3001/v1 with the unified key and model auto. Other agents: supported agents list.

06Optional: OmniRoute

OmniRoute is a second router with prompt compression. It needs Node.js 22 or newer.

npm install -g omniroute
omniroute
  1. The dashboard opens at http://localhost:20128.
  2. In Dashboard → Providers, connect your own provider accounts or keys and test them.
  3. In API Keys, create a key and save it (it is shown once).
  4. Point your tool at http://localhost:20128/v1, with that key and model auto. For Claude Code: omniroute run claude.

OmniRoute marks some providers as a terms risk and keeps them out of auto by default. Leave that setting on. Full steps: OmniRoute quick start.

07If something goes wrong

Good use, honest limitsGreat for learning, side projects and testing prompts. For paid client work, use a paid API with clear terms and data rules.