LLM Providers Supported by FreeLLMAPI: Complete 2024 Integration Guide
FreeLLMAPI aggregates free-tier access from 17+ major LLM providers—including Google Gemini, Groq, Cerebras, Mistral, OpenRouter, and GitHub Models—behind a single OpenAI-compatible endpoint with automatic failover and rate-limit management.
FreeLLMAPI is an open-source aggregation layer developed by the tashfeenahmed/freellmapi repository that unifies access to free large language model tiers through a standardized REST API. The project implements provider-specific adapters and intelligent request routing to automatically distribute traffic across healthy, available models while respecting rate limits and quotas.
Complete List of Supported LLM Providers
FreeLLMAPI supports every major provider offering free-tier LLM access. The following table lists all integrated providers and their available free models as defined in the project’s README:
| Provider | Example Models (Free Tier) |
|---|---|
| Google Gemini | Gemini 2.5 Flash, 3.x previews |
| Groq | Llama 3.3, Llama 4, GPT-OSS, Qwen3 |
| Cerebras | Qwen3 235B |
| OpenCode Zen | DeepSeek V4 Flash, Nemotron (promo) |
| Mistral | Large 3, Medium 3.5, Codestral, Devstral |
| OpenRouter | 21 free-tier models |
| GitHub Models | GPT-4.1, GPT-4o |
| Cloudflare Workers AI | Kimi K2, GLM-4.7, GPT-OSS, Granite 4 |
| Cohere | Command R+, Command-A (trial) |
| Z.ai (Zhipu) | GLM-4.5, GLM-4.7 Flash |
| NVIDIA NIM | NIM, 40 RPM free (eval-only) |
| HuggingFace Inference | DeepSeek V4, Kimi K2.6, Qwen3 |
| Ollama Cloud | GLM-4.7, Kimi K2, gpt-oss, Qwen3 |
| Kilo Gateway | Free routes (anonymous) |
| Pollinations | GPT-OSS 20B (anonymous) |
| LLM7 | GPT-OSS, Llama 3.1, GLM (anonymous) |
| OVH AI Endpoints | Qwen3.5 397B, GPT-OSS, Llama 3.3 (anonymous) |
| Custom | Any OpenAI-compatible endpoint (e.g., llama.cpp, LM Studio, vLLM, local Ollama) |
How FreeLLMAPI Routes Requests Across Providers
The architecture dynamically selects healthy provider keys and translates OpenAI-compatible requests to each provider’s native API format. Four core components manage this process:
- Provider adapters – Each TypeScript module in
server/src/providers/implements the abstractProviderclass defined inserver/src/providers/base.ts. Adapters handle request translation between the OpenAI format and provider-specific APIs. - Router – The
server/src/services/router.tsfile contains the core selection logic that picks the best-available model/key based on health status, quota availability, and priority. - Rate-limit ledger – Implemented in
server/src/services/ratelimit.ts, this service tracks RPM (requests per minute), RPD (requests per day), TPM (tokens per minute), and TPD (tokens per day) counters per key, enforcing cooldowns on429or5xxresponses. - Health service – Located in
server/src/services/health.ts, this component periodically probes each provider key to maintain up-to-date availability status.
Integration Examples
Any OpenAI-compatible client can point at http://localhost:<PORT>/v1 to automatically benefit from the combined free quotas of all listed providers.
Python (OpenAI SDK)
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", # let the router pick the best free model
messages=[{"role": "user", "content": "Summarise the fall of Rome in one sentence."}],
)
print(resp.choices[0].message.content)
print("Routed via:", resp.headers.get("x-routed-via"))
Shell (curl)
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": "hi"}]
}'
Both examples route requests to any available provider from the supported list, automatically falling back when rate limits or errors occur.
Key Implementation Files
The following source files implement the multi-provider aggregation:
server/src/providers/base.ts– Defines the abstractProviderclass that all adapters implement.server/src/providers/google.ts– Adapter for Google Gemini.server/src/providers/cohere.ts– Adapter for Cohere.server/src/providers/openrouter.ts– Adapter for OpenRouter.server/src/providers/openai-compat.ts– Template for custom OpenAI-compatible providers.server/src/services/router.ts– Core routing logic that selects models and keys per request.server/src/services/ratelimit.ts– In-memory rate-limit ledger with SQLite persistence.server/src/services/health.ts– Periodic health-checking of provider keys.
Summary
- FreeLLMAPI supports 17+ major providers including Google Gemini, Groq, Cerebras, Mistral, OpenRouter, GitHub Models, and custom OpenAI-compatible endpoints.
- The router in
server/src/services/router.tsautomatically selects healthy provider keys based on real-time health checks and quota availability. - Rate limiting is enforced per-key through
server/src/services/ratelimit.ts, tracking RPM/RPD/TPM/TPD with automatic cooldowns. - All providers implement the abstract
Providerclass fromserver/src/providers/base.ts, ensuring consistent request translation. - Clients use standard OpenAI SDK syntax with
model: "auto"to leverage the unified free-tier aggregation.
Frequently Asked Questions
How does FreeLLMAPI handle rate limiting across multiple providers?
FreeLLMAPI maintains an in-memory rate-limit ledger in server/src/services/ratelimit.ts that tracks RPM, RPD, TPM, and TPD counters for each provider key. When a provider returns a 429 or 5xx error, the system immediately enforces a cooldown period and automatically reroutes the request to the next available provider.
Can I use FreeLLMAPI with custom OpenAI-compatible endpoints?
Yes. FreeLLMAPI supports any OpenAI-compatible endpoint through the template adapter in server/src/providers/openai-compat.ts. This includes local deployments like llama.cpp, LM Studio, vLLM, and Ollama instances, allowing you to combine private models with public free tiers.
What happens when a provider returns a 429 error?
When the router encounters a 429 (rate limit) or 5xx (server error) response, the health service in server/src/services/health.ts marks the key as temporarily unavailable. The router then immediately falls back to the next healthy provider in the priority queue, ensuring client requests succeed without manual intervention.
How do I configure FreeLLMAPI to use specific providers only?
While the model: "auto" parameter lets the router select from all available providers, you can configure provider-specific API keys in the environment configuration to control which adapters are active. The router only considers providers with valid, configured keys when making selection decisions in server/src/services/router.ts.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →