# FreeLLMAPI: One Endpoint for 28 Free LLM Providers

If you work with LLMs often, you probably have API keys scattered across providers like Groq, Cerebras, Google AI Studio, and Mistral. Each service comes with its own dashboard, rate limits, and model names, which gets especially annoying when a coding agent hits a quota halfway through a task. **FreeLLMAPI simplifies that setup** by combining multiple free-tier providers behind a single OpenAI-compatible `/v1` endpoint with automatic failover.

The project is available at [github.com/tashfeenahmed/freellmapi](https://github.com/tashfeenahmed/freellmapi). It currently supports **28 providers and 339 free model endpoints**, with a combined theoretical allowance of roughly 4 billion tokens per month when all supported accounts are configured. API keys are encrypted at rest using AES-256-GCM, and the project is intended for **personal experimentation rather than production workloads**.

<iframe class="aspect-video h-auto" width="100%" height="315" src="https://www.youtube.com/embed/sHOwbyMbun0" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>



## The problem it solves

![A diagram illustrating how FreeLLMAPI consolidates multiple providers into a single, OpenAI-compatible endpoint, providing 4 billion tokens a month.](https://imagedelivery.net/xZXo0QFi-1_4Zimer-T0XQ/608c6979-9bbb-4b1f-df3d-5113bcb70400/md1x =1920x1080)


Managing multiple free-tier accounts creates friction in several specific ways. Each provider has different rate limits: one might offer 1 million tokens per day, another 30 requests per minute. Each has different model names for equivalent models. Each has a different dashboard for checking usage. When an agent hits a rate limit, you need to manually intervene, find the right config file, swap the key and model name, and restart the task.

FreeLLMAPI handles all of this: it tracks usage per key, routes requests to the best available provider based on your chosen strategy, and fails over automatically when one provider is rate-limited. Your scripts and tools only ever talk to one endpoint with one key.

## Installation

FreeLLMAPI requires Node.js 20+ and npm:

```command
git clone https://github.com/tashfeenahmed/freellmapi.git
```

```command
cd freellmapi
```

```command
npm install
```

```command
cp .env.example .env
```

Generate an encryption key and add it to the `.env` file:

```command
printf "ENCRYPTION_KEY=$(openssl rand -hex 32)\nPORT=3001" >> .env
```

Start the server:

```command
npm run dev
```

The Web UI is served at `http://localhost:3001`. For integrating with Claude Code, Codex, DeepSeek Harness, or other tools, the project includes setup generators: `npx freellmapi setup-claude`, `npx freellmapi setup-codex`, `npx freellmapi setup-dsh`, and others that fetch your live model catalog and configure the tool automatically.

## The dashboard

### Adding keys

Navigate to the **Keys** tab and use the **+ Add key** button to add your provider API keys. For each provider (Groq, Google AI Studio, Cerebras, etc.), paste the key from that provider's dashboard. FreeLLMAPI will verify each key and show a healthy status indicator. All credentials are encrypted at rest and decrypted in memory only when a request needs them.

### The Models tab

![A wide view of the "Models" dashboard, highlighting the monthly token budget bar and the extensive list of available models.](https://imagedelivery.net/xZXo0QFi-1_4Zimer-T0XQ/9de5c6be-29b0-4cd4-e681-cda8951dc300/lg2x =1920x1080)

The Models tab is your central view:

- A token budget bar at the top shows your aggregated monthly usage across all providers
- A full catalog of all available model endpoints from your configured providers
- Routing strategy selection: Manual, Balanced, Smartest, Fastest, Most Reliable, or Custom
- Live scores per model for Reliability, Speed, and Intelligence based on live traffic data

The Balanced strategy (recommended as a default) weights reliability at 50%, speed at 25%, and intelligence at 25%. Custom lets you define your own weighting across the three dimensions.

## Using it from a Python script

Because FreeLLMAPI exposes a standard OpenAI-compatible endpoint, any code using the OpenAI SDK works with a one-line change:

```python
[label task_manager.py]
from openai import OpenAI

client = OpenAI(
    base_url="http://localhost:3001/v1",  # your local proxy instead of api.openai.com
    api_key="your-freellmapi-unified-key"  # key generated in the FreeLLMAPI dashboard
)

response = client.chat.completions.create(
    model="auto",  # FreeLLMAPI's router picks the best available model
    messages=[
        {
            "role": "system",
            "content": "You are an expert senior software engineer. Write clean, production-quality code."
        },
        {
            "role": "user",
            "content": """Build a command-line task manager in pure Python (no external libraries except the standard library).
Requirements:
- Add, list, complete, delete, and search tasks
- Persist tasks to a JSON file
- Support priorities (high/medium/low) and due dates
- Colored terminal output using ANSI codes
- Full argparse CLI with help
- Include a small test suite using unittest"""
        }
    ],
    stream=True,
    temperature=0.3
)

for chunk in response:
    if chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)
```

The `model="auto"` value tells FreeLLMAPI's router to pick the best available model using your routing strategy. If Google AI Studio is rate-limited, it might route to Groq's Llama3 instead. Your script doesn't need to know that happened.

The API key here is the unified key created within FreeLLMAPI's dashboard (under Keys → Unified API key), not any of the upstream provider keys.

## How it compares to other tools

**OpenRouter** is a hosted, managed service. Your requests pass through their platform, which is convenient but means a third party handles your traffic.

**LiteLLM** is production-oriented: designed for building scalable, observable LLM infrastructure with caching, fallbacks, and budgets. It requires more configuration and is better suited for integrating paid models into a production application.

**FreeLLMAPI** has a narrower focus: free-tier maximization for personal development and experimentation. It prioritizes simplicity and privacy by running locally using your own provider keys directly.

## What this is and isn't

FreeLLMAPI does not generate extra quota. Instead, it **combines the free allowances you already have** across supported providers. The roughly 4 billion tokens per month figure assumes you have accounts configured with all 28 providers, so most users will have a smaller total.

It is also **not intended for production use**. The project positions itself as a tool for experimentation, learning, and prototyping rather than a reliable inference layer for applications with real users. If a project becomes production-critical, moving to a paid and supported API is the safer choice.

You should also stay within each provider's terms: use one account per provider, do not resell access, avoid sharing your proxy with others, and do not use free-tier quotas to power a production service.

The trade-off is consistency. Requests may be routed to providers with different speeds, and failover can sometimes switch you to a less capable model. For experimentation where **cost matters more than predictable latency and model quality**, that compromise can still make sense.
