Docs
Two ways to connect, eight clients covered
最后更新:
FreeModel is an AI model gateway. One API key reaches 200+ models across dozens of providers, routed by task, trying free capacity first and falling back to paid when that runs out. It speaks both the OpenAI and Anthropic API shapes, so an existing client points at it without a translation layer.
Which shape you use depends on your client: an MCP server for Claude Code, a base URL for everything that lets you set one. Both end up at the same router.
Pick your client
| Client | How it connects | Config goes in |
|---|---|---|
| Claude Code | MCP server | ~/.claude/mcp.json |
| Codex CLI | OpenAI base URL | Environment variables |
| Cursor | OpenAI base URL | .cursor/settings.json |
| Cline | OpenAI base URL | VS Code settings |
| Continue.dev | OpenAI base URL | config.json |
| Python SDK | OpenAI base URL | Client constructor |
| Node SDK | OpenAI base URL | Client constructor |
| Raw HTTP | Either | Whatever you write |
The two endpoints
| Endpoint | Speaks | Use it for |
|---|---|---|
https://freemodel.online/v1 | OpenAI Chat Completions | Codex CLI, Cursor, Cline, Continue, the OpenAI SDKs, anything with an openai provider mode |
https://freemodel.online/api/gateway | Anthropic Messages | Clients that take an ANTHROPIC_BASE_URL |
The two paths differ because the clients append different things. An OpenAI client appends
/chat/completions, which is why that base already carries /v1. An
Anthropic client appends /v1/messages, so its base stops at
/api/gateway. Pasting one into the other's setting gives you a
/v1/v1/... path and a 404 — the most common mistake setting this up.
Getting a key
Both routes need one. Sign in to the console, open
My → API Keys, and create one. Keys start with sk-.
You can read the model list without a key at all; /v1/models is public,
which is worth doing before you sign up if you want to check coverage first.
The ten-second version
# 1. is the gateway up? no key needed: this checks reachability, not auth
curl -s https://freemodel.online/v1/models | head -c 120
# 2. a real call, which does check your key
curl -X POST https://freemodel.online/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-your-key" \
-d '{"model":"fm/qwen-plus","messages":[{"role":"user","content":"Hello"}]}'
When something does not work
| Symptom | Most likely cause |
|---|---|
| 404 on every call | The base URL has a duplicated path segment; check for /v1/v1 |
| 401 | Key missing, mistyped, or revoked. The Bearer prefix is required on the OpenAI endpoint |
| 402 | Out of points. Pricing → |
| 429 | Rate limited by the client's own settings rather than the router; slow it down |
| Model not found | The id is not in /v1/models. Modality routes must match exactly, including the auto/ prefix |
When not to use FreeModel
Nothing below is a limitation you can configure around. If any of them applies, a different gateway is the right answer: see the alternatives.
| If you need | Then |
|---|---|
| A specific model we do not serve | Check /v1/models first; we cover 199, not every model that exists |
| Requests never leaving your network | Self-host instead. Requests through FreeModel pass through our gateway by definition; LiteLLM is the open-source option |
| Team budgets, audit logs, SSO | That governance layer does not exist here; Portkey or similar |
| Compliance certifications (SOC 2, HIPAA) | We publish none. Procurement will stop here |
| A paid path you can budget against with a published fee | Our routing is free-first; predictable volume billing is not what this is |
Beyond chat
Six capabilities, one alias each, all callable from the same key and the same base URL. They are grouped separately from the chat models because they share a rule: an alias only moves to a different model when the current one has been retired — never on a timeout, and never silently.
Next
Set up in three steps
Every client on this page follows the same three steps. What changes between them is only where the value goes.
- Step 1: Create a key in the console under My → API Keys. It starts with
sk-. Nothing else here works without one, though the model list is readable without a key. - Step 2: Point the client at the base URL that matches its API shape. OpenAI-shaped clients take
https://freemodel.online/v1; Anthropic-shaped clients takehttps://freemodel.online/api/gateway. The client appends its own path, so the base never contains/chat/completionsor/v1/messages. - Step 3: Name a model or a route wherever the client normally expects a model name. A concrete id from /v1/models always works; the
auto/*modality routes and the three tier aliases —fm-v1-lite,fm-v1-standard,fm-v1-pro— hand the choice to the router instead.
What you point at is a catalogue rather than one provider. The 199 listed models put chat,
image, video, speech synthesis, speech recognition, embeddings and rerank in one list; 77%
of them are chat models and 23% are everything else.[1] Six auto/* routes cover the
non-chat side: auto/image, auto/video, auto/tts, auto/asr,
auto/embed and auto/rerank. Each carries a candidates field, so you can
read how many models sit behind a route before you rely on it. Chat is reached by naming a
concrete id, or one of three subscription tier aliases: fm-v1-lite,
fm-v1-standard and fm-v1-pro. One key covers all of it, in both the OpenAI and
Anthropic API shapes.
If you only want to check coverage, do that before signing up: the list endpoint answers anonymously.
Docs FAQ
A few questions come up whatever client you picked. One key covers all of them: 199 listed models, 77% of them chat models and the rest spread across image, video, speech and embeddings[1], so the friction is almost always about endpoints rather than about credentials.
Do I have to pick one of the eight clients listed here?
Which base URL do I use?
OPENAI_BASE_URL take https://freemodel.online/v1; clients that read ANTHROPIC_BASE_URL take https://freemodel.online/api/gateway. Swapping the two produces a doubled path and a 404, which is the most common mistake in this section.Does the key belong to one client?
What happens when the model I asked for is busy?
Do I have to install anything for this?
npx package as an MCP server. Every other client here connects over HTTPS with a base URL and a key, and the SDK path needs nothing beyond the SDK you already use.Sources
Every third-party figure quoted on this site was read from the vendor documentation linked below, on the date stated. None of these links are affiliate links and none of these vendors paid to be listed. If a number here disagrees with the page it came from, the page is right — tell us and it gets corrected.
- OpenRouter — credit-purchase fees and free-model rate limits
- OpenRouter — rate-limit reference
- OpenRouter — public model list
- LiteLLM — licence, deployment options and supported models
- Cloudflare AI Gateway — features and pricing
- Vercel AI Gateway — features
- Portkey — plans
- Helicone — plans
- Model Context Protocol — specification
- OpenAI Python SDK — base_url and OPENAI_BASE_URL
- Anthropic Messages API — request format
Where the percentages come from
Every share quoted on this site is counted from the live model list, not estimated. Divide the two counts in the last column, round to the nearest whole percent, and you get the number in the first.
| Share | Of what | Count |
|---|---|---|
| 77% | are chat models | 153 of 199 listed entries |
| 9% | generate images | 18 of 199 listed entries |
| 23% | are not chat models | 46 of 199 listed entries |
| 3% | are modality routes | 6 of 199 listed entries |
| 17% | carry a context length | 34 of 199 listed entries |
[1] Counted on 29 September 2026 from GET https://freemodel.online/v1/models, which needs no key and no account. Every row uses all 199 listed entries as the denominator, because the only thing the endpoint states for every entry is its modality. It no longer publishes per-model capability flags such as tool calling or reasoning, so this site quotes no shares for them. Fetch the list and recount whenever you want to check the arithmetic.