Which LLM Providers Are Built Into FreeLLMAPI? Complete 2025 Provider List

FreeLLMAPI aggregates free-tier access to 17 major LLM providers—including Google Gemini, Groq, Cerebras, Mistral, and OpenRouter—behind a single OpenAI-compatible endpoint that automatically routes requests and handles failover.

FreeLLMAPI (tashfeenahmed/freellmapi) eliminates API key fragmentation by exposing a unified OpenAI-compatible interface that distributes requests across free-tier LLM providers. Instead of implementing separate client libraries for each service, developers point their OpenAI SDK to a local FreeLLMAPI instance and automatically benefit from combined free quotas across all supported providers. The system uses TypeScript-based provider adapters to translate requests, while a dynamic router selects optimal endpoints based on real-time health and rate-limit status.

FreeLLMAPI Provider Architecture

The system implements a modular adapter pattern where each LLM provider operates through a standardized interface.

Provider Adapters

Each supported service implements the abstract Provider class defined in server/src/providers/base.ts. These adapters handle the bidirectional translation between OpenAI's request/response format and each provider's native API. For example, server/src/providers/google.ts manages Gemini-specific authentication and payload formatting, while server/src/providers/cohere.ts handles Command R+ and Command-A trial access. This abstraction allows the router to treat disparate services as interchangeable endpoints.

Routing and Health Services

The server/src/services/router.ts file contains the core selection logic that determines which provider handles each request. It evaluates key health status from server/src/services/health.ts—which periodically probes endpoints—and quota availability from server/src/services/ratelimit.ts. When a provider returns HTTP 429 or 5xx errors, the rate-limit ledger automatically enforces cooldown periods and routes subsequent requests to healthy alternatives.

Complete List of Built-In LLM Providers

FreeLLMAPI ships with dedicated adapters for the following providers, exposing their free-tier models through the unified /v1 endpoint:

Provider Free-Tier Models Available
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)

The Custom provider adapter in server/src/providers/openai-compat.ts enables integration with private or experimental endpoints that follow the OpenAI API specification, extending coverage beyond the pre-built integrations.

Implementation Details and Key Files

Understanding the source code structure clarifies how FreeLLMAPI maintains compatibility across diverse services:

  • server/src/providers/base.ts – Defines the abstract Provider class and interface contract that all adapters must implement.

  • server/src/providers/openrouter.ts – Handles OpenRouter's aggregation layer, exposing 21 distinct free-tier models through a single adapter.

  • server/src/services/router.ts – Implements provider selection logic, checking health status and rate limits before invoking the appropriate adapter.

  • server/src/services/ratelimit.ts – Maintains an in-memory ledger with SQLite persistence to track RPM (requests per minute), RPD (requests per day), TPM (tokens per minute), and TPD (tokens per day) counters per API key.

  • server/src/services/health.ts – Executes periodic health probes to mark providers as available or unavailable, preventing requests to rate-limited or downed endpoints.

Usage Examples

Access the aggregated providers using standard OpenAI SDK patterns by pointing base_url to your FreeLLMAPI instance:

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",
    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"))

The model="auto" parameter instructs the router to select the best available free model based on current health and quota data.

For command-line testing:

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 methods automatically distribute traffic across the built-in LLM providers, implementing transparent failover when individual services encounter rate limits or errors.

Summary

  • FreeLLMAPI integrates 17 built-in LLM providers including Google Gemini, Groq, Cerebras, Mistral, and OpenRouter behind one OpenAI-compatible endpoint.
  • Provider-specific adapters in server/src/providers/ translate API formats while maintaining interface consistency.
  • The router (server/src/services/router.ts) dynamically selects endpoints using health data from server/src/services/health.ts and quota tracking from server/src/services/ratelimit.ts.
  • Custom OpenAI-compatible endpoints can be added via the generic adapter in server/src/providers/openai-compat.ts.
  • All providers expose free-tier models, with automatic failover preventing request failures due to individual rate limits.

Frequently Asked Questions

Which LLM providers are supported by FreeLLMAPI out of the box?

FreeLLMAPI supports 17 providers natively: Google Gemini, Groq, Cerebras, OpenCode Zen, Mistral, OpenRouter, GitHub Models, Cloudflare Workers AI, Cohere, Z.ai (Zhipu), NVIDIA NIM, HuggingFace Inference, Ollama Cloud, Kilo Gateway, Pollinations, LLM7, and OVH AI Endpoints. Each has a dedicated TypeScript adapter in the server/src/providers/ directory that handles authentication and payload translation specific to that service.

How does FreeLLMAPI handle rate limiting across multiple providers?

The system maintains an in-memory rate-limit ledger in server/src/services/ratelimit.ts that tracks RPM, RPD, TPM, and TPD counters per API key. When a provider returns HTTP 429 or 5xx responses, the service enforces automatic cooldown periods and routes subsequent requests to healthy providers. This SQLite-backed ledger persists across restarts to prevent quota violations.

Can I use FreeLLMAPI with local or custom LLM endpoints?

Yes. The server/src/providers/openai-compat.ts adapter accepts any OpenAI-compatible endpoint, including local instances like llama.cpp, LM Studio, vLLM, or Ollama. Configure these as custom providers in your FreeLLMAPI configuration to include them in the routing pool alongside commercial services.

What happens when a built-in provider becomes unavailable?

The health service (server/src/services/health.ts) periodically probes each configured provider key to update availability status. If a provider fails health checks or returns errors, the router (server/src/services/router.ts) automatically excludes it from the selection pool until it recovers, ensuring requests route only to operational endpoints.

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:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →