This service provides an OpenAI-compatible API that load-balances across multiple free / low-cost AI providers with automatic fallback. Model lists are discovered dynamically from each provider's /models endpoint (24h cache) with static lists as fallback.
Each provider is a module under src/providers/. Add or remove a provider by editing src/providers/index.ts.
| Provider | Base URL | Notes |
|---|---|---|
empero | https://free.empero.org/v1 | Free community endpoint (Germany). Any API key accepted. Prompts logged (hashed IP) for training. 503s common when busy — retry. |
tokenharbor | https://tokenharbor.ai/v1 | Aggregator with free tier models (:free suffix). deepseek-v4-flash:free and mimo-v2.5:free confirmed working. Register at tokenharbor.ai for TOKENHARBOR_API_KEY. |
tokenrouter | https://api.tokenrouter.io/v1 | OpenAI-compatible gateway (BYOK). Free plan needs explicit model ids (no auto-routing). Key format tr_... from tokenrouter.io console. |
hilinkup | https://api.hilinkup.com/v1 | OpenAI-compatible gateway. GLM-5.3-Flash had a限时免费 promo (8/27–9/2 GMT+8). Get HILINKUP_API_KEY from the HiLinkup console. |
bai | https://api.b.ai/v1 | OpenAI-compatible. GLM-5.3-Flash currently 0 credits (限时活动). Register at b.ai for BAI_API_KEY. Good for Cursor / Claude Code. |
openrouter | https://openrouter.ai/api/v1 | Primary aggregator. Free models are also discovered dynamically from /models and injected at runtime. |
vercel | https://ai-gateway.vercel.sh/v1 | Vercel AI Gateway. Bring-your-own-key aggregator over many providers. |
cloudflare | https://api.cloudflare.com/client/v4/accounts/{account_id}/ai/v1 | Cloudflare Workers AI. Requires CLOUDFLARE_API_TOKEN + CLOUDFLARE_ACCOUNT_ID. Dynamic discovery via /accounts/{id}/ai/models/search (needs Workers AI Read permission; falls back to static list otherwise). |
nvidia | https://integrate.api.nvidia.com/v1 | NVIDIA NIM free developer tier. ~40 RPM account-wide. Get an nvapi- key at build.nvidia.com (free, no card). Many catalog models 404 on free accounts; fallbackModels are confirmed working. |
Fetch free models from OpenRouter plus each provider's dynamically-discovered model list.
List all configured providers, their base URLs, env vars, dynamically-discovered models, and availability.
Health check: probes every provider's /models endpoint and sends a minimal chat request. /status returns JSON, /status.html renders a visual status page (auto-refresh 60s).
Create a chat completion with automatic fallback across all available providers. Providers that explicitly support the requested model are tried first, then the rest in priority order. Model matching uses dynamically-discovered lists.
{
"model": "glm-5.3-flash",
"messages": [
{ "role": "user", "content": "What is the meaning of life?" }
]
}
Add "stream": true for SSE streaming.
CORS is enabled for all origins.