Run Claude Code and the OpenAI SDK on free LLM tiers with FreeLLMAPI
Description and use
FreeLLMAPI aggregates free tiers of 34 LLM providers into a single OpenAI‑compatible endpoint, enabling Claude Code and SDK usage without cost.
Problem
How to aggregate multiple free LLM provider tiers into a single OpenAI-compatible endpoint to run Claude Code and other agents without cost.
Outcome
FreeLLMAPI enables users to run Claude Code and OpenAI SDK against a pooled free-tier LLM catalog, achieving higher token limits and continuous availability through intelligent routing and fallback.
Workflow
- Install FreeLLMAPI via Docker or desktop app
- Add provider keys and configure fallback chain in the web UI
- Obtain the unified API key from the Keys page
- Configure Claude Code to use the FreeLLMAPI endpoint with the unified key (or launch directly)
- Use any OpenAI client in Python by setting base_url to http://localhost:3001/v1 and api_key to the unified key
- Send requests; responses include X-Routed-Via header indicating the provider used
Evidence
tashfeenahmed/freellmapi is a self-hosted server that aggregates the free tiers of 34 LLM providers behind a single OpenAI-compatible /v1 API.
The README puts the stacked total at roughly 7.4 billion tokens a month across 635 free model endpoints.
Every response carries an X-Routed-Via: <platform>/<model> header, so you can log which provider actually answered.
- Record date: 2026-11-04T05:28:48.982Z