Favicon of FreeLLMAPI

FreeLLMAPI

A self-hosted LLM router that combines cloud providers and local OpenAI-compatible backends, with automatic failover and encrypted provider keys.

Screenshot of FreeLLMAPI website

FreeLLMAPI gives developers one API for experimenting with cloud models and local backends. The router runs locally, but cloud inference still sends requests to the providers you enable.

  • Provider routing: Combine Google, Groq, Cerebras, OpenRouter, and other providers, with automatic retries when a model fails or reaches a rate limit.
  • Local backends: Connect OpenAI-compatible endpoints from Ollama, llama.cpp, LM Studio, or vLLM alongside cloud services.
  • Agent compatibility: Use Claude Code, Codex CLI, Gemini CLI, Cursor, and Aider through OpenAI, Anthropic, Gemini, or Ollama-compatible interfaces; an MCP server also exposes the router to agents.
  • Model capabilities: Route streaming chat, tool calls, structured output, embeddings, and media requests where the connected provider supports them.
  • Combined answers: Fusion sends a prompt to several models, then uses a judge model to assemble an answer from their drafts.

The router is open source under the MIT license and designed for a single user. Provider keys stay encrypted in a local SQLite database. Usage tracking helps the router account for provider rate limits, and routing considers model speed, capability, and reliability.

Cloud providers require internet access and their own credentials. Local inference uses the hardware behind your chosen endpoint. A separate online catalog service supplies model and compatibility updates. The project is intended for personal experimentation.

Similar to FreeLLMAPI