Free models with 1M+ token context today
The table lists free models with a context window of at least 1,000,000 tokens, largest first. The data comes from the live catalog. Look at the "Free limits" column as well as the context size.
| Model | Free on | Context | Free limits (best offer) | Tools | Vision |
|---|---|---|---|---|---|
| OpenAI: GPT-6 Luna | ElectronHub | 1.1M | $0.25/week shared free credits | No | No |
| Gemini 3.8 Flash | APINex, Google AI Studio | 1M | 5 req/min 10M weighted tokens/day shared across APINex free routes; 3x token multiplier; 5 requests/minute/account | Yes | Yes |
| Gemini 3.7 Flash | Google AI Studio | 1M | 10 req/min 20 req/day 250,000 tokens/min ~3M | Yes | Yes |
| DeepSeek V4 Flash | AMD Radeon Cloud, BazaarLink, ElectronHub | 1M | 10 req/min 50 req/day Shared rate limit | Yes | No |
| DeepSeek V4 Flash 0731 | Router9 | 1M | 10,000 credits/month (~$1), shared; account-anniversary reset | No | No |
| Gemini 3.6 Flash | Google AI Studio | 1M | 10 req/min 20 req/day 250,000 tokens/min ~3M | Yes | Yes |
| GLM 5.2 | Router9 | 1M | 10,000 credits/month (~$1), shared; account-anniversary reset | No | No |
| Gemini 3.5 Flash | Google AI Studio | 1M | 10 req/min 20 req/day 250,000 tokens/min ~3M | Yes | Yes |
| DeepSeek V4 Pro | APINex, Router9 | 1M | 5 req/min 10M weighted tokens/day shared across APINex free routes; 3x token multiplier; 5 requests/minute/account | No | No |
| Nemotron 3 Ultra 550B | Gizmo, Kilo Gateway, LLMTR +3 more | 1M | 200 req/day 200 rpd | Yes | No |
| Gemini 3.5 Flash Lite | ElectronHub, Google AI Studio | 1M | 15 req/min 20 req/day 250,000 tokens/min ~3M | Yes | Yes |
| Gemini 3 Flash Preview | Google AI Studio | 1M | 10 req/min 20 req/day 250,000 tokens/min ~3M | Yes | Yes |
| Gemini 3.1 Flash-Lite | DreamPrompting, Google AI Studio | 1M | 100 req/min 5,000 req/day 500,000 tokens/day 500K tokens/day · 5,000 req/day | Yes | Yes |
| Gemini 2.5 Flash | DreamPrompting, ElectronHub, Google AI Studio | 1M | 100 req/min 5,000 req/day 500,000 tokens/day 500K tokens/day · 5,000 req/day | Yes | Yes |
| Nemotron 3.5 Lightning | ElectronHub, Gizmo, Kilo Gateway +2 more | 1M | 20 req/min 50 req/day 50 req/day account-wide (1,000 after a $10 purchase) | Yes | No |
Showing 15 of 33 matching free models. See all models.
Live data from the FreeLLMAPI catalog (version 2026.11.19, checked 19 November 2026). Free limits change often. The catalog is checked every day.
Gemini Flash models from Google AI Studio are the best known 1M-token free models. They also accept images and tool calls. Other rows come from free routers and from NVIDIA.
The real limit: tokens per minute
The context window is the largest prompt that the model can read. The free tier also has a tokens-per-minute (TPM) limit. On many free tiers, the TPM limit is smaller than the context window.
- Example: a free Gemini Flash key in the table allows 250,000 tokens per minute. A prompt of 800,000 tokens is inside the context window, but above the TPM limit. The provider sends error 429.
- Requests per day: some free Gemini models allow only about 20 requests each day. Use long prompts for tasks that need them.
- Output is separate: the answer has its own maximum length. A 1M-token context does not give a 1M-token answer.
So in practice, a free 1M-context model can read a few hundred thousand tokens in one request. Measure your prompt before you send it.
Step 1: Install FreeLLMAPI and add keys
FreeLLMAPI is open source. It runs on your computer in Docker. Your provider keys stay on your computer.
Install (macOS or Linux)
curl -fsSL https://freellmapi.co/install.sh | bashOpen the dashboard at http://localhost:3001. Add a Google AI Studio key on the Keys page. Add keys from other providers in the table too, so that the router has another long-context model when Google sends a 429 error. Copy your unified key from the same page.
Step 2: Count tokens, then send a long document
FreeLLMAPI serves the native Gemini countTokens method. Use it to measure the prompt before you send it.
curl: count tokens with the native Gemini endpoint
curl "http://localhost:3001/v1beta/models/gemini-2.5-flash:countTokens" \
-H "x-goog-api-key: <unified-key>" \
-H "Content-Type: application/json" \
-d '{"contents": [{"role": "user", "parts": [{"text": "Paste the long text here"}]}]}'Python: send a long file to a 1M-context model
from openai import OpenAI
client = OpenAI(base_url="http://localhost:3001/v1", api_key="<unified-key>", timeout=300)
doc = open("annual-report.txt", encoding="utf-8").read()
print("about", len(doc) // 4, "tokens") # rough rule for English text
resp = client.chat.completions.with_raw_response.create(
model="gemini-2.5-flash", # pin a 1M-context model; "auto" can pick a smaller one
messages=[
{"role": "system", "content": "Answer only from the document. Quote the section you use."},
{"role": "user", "content": doc + "\n\nQuestion: What are the three largest risks?"},
],
max_tokens=4000,
)
print("Routed via:", resp.headers.get("x-routed-via"))
print(resp.parse().choices[0].message.content)Pin a long-context model by its id. With model: "auto", the router can select a model with a smaller context window. Set a long client timeout, because large prompts take time to read.
Long context or RAG?
| Use long context when | Use RAG when |
|---|---|
| The document is read once, for example one contract or one report | You ask many questions about the same large data |
| The answer needs the full text, for example a summary or a comparison of sections | The answer is in a few short passages |
| The text is smaller than the TPM limit of your free key | The data is larger than any free context window or TPM limit |
| You need the model to see the order and structure of the text | You need to keep each request small and fast |
RAG sends only the relevant parts of the data with each question. It uses fewer tokens on free tiers. Read Free LLM API for RAG and Free embeddings API to set it up.
Pitfalls and troubleshooting
- Lost details: models can miss facts in the middle of a very long prompt. Put your question after the document, and ask the model to quote its source.
- Thinking tokens: Gemini Flash models can use hidden thinking tokens from the output budget. Do not set a very small
max_tokens. - PDF files: FreeLLMAPI does not convert PDF, DOCX or XLSX files. A binary document attachment returns error 400. Extract the text first, then send the text.
- Clean the text: remove page headers, footers and repeated tables of contents before you send a document. They use tokens and add no facts.
- Repeated prompts: each request sends the full document again. Ask several questions in one request when you can.
| Problem | Cause | Fix |
|---|---|---|
| Error 429 on the first long request | The prompt is larger than the TPM limit | Make the prompt smaller, or use RAG |
| Error 400 about context length | The request went to a model with a smaller window | Pin a model id from the table |
| Empty or cut answer | max_tokens is too small, or thinking used it | Set a larger max_tokens |
| Timeout | The model needs time to read the prompt | Set a client timeout of 300 seconds or more |
Frequently asked questions
Is there a free LLM API with 1 million token context?
Yes. Gemini Flash models on the Google AI Studio free tier have a context window of about 1 million tokens. The FreeLLMAPI catalog has 56 free model offers with 1M or more tokens.
Can I send 1 million tokens free in one request?
Usually not. The free Gemini tier in the catalog allows 250,000 tokens per minute, so a larger prompt gets error 429. Plan for a few hundred thousand tokens for each request.
How do I count tokens before I send a prompt?
Call the native Gemini countTokens method through FreeLLMAPI at /v1beta/models/{model}:countTokens. For English text, about 4 characters make one token.
Which free LLM has the largest context window?
The table on this page sorts free models by context size, largest first. Several free models reach about 1 million tokens. Also read the free limits column, because the TPM limit decides the real size of one request.
Is long context better than RAG?
Long context is better for one document that you read once. RAG is better for many questions over large data, because it sends fewer tokens each time.
Related guides
- Free LLM API for RAG
- Free embeddings API
- free gemini api
- Gemini API quota exceeded (429 RESOURCE_EXHAUSTED)
- Free LLM API rate limits
Sources
- FreeLLMAPI docs: Native Gemini API (checked 20 November 2026)
- FreeLLMAPI docs: Chat completions and routing (checked 20 November 2026)
- Google AI Studio docs: Thinking (checked 20 November 2026)
- Gemini Developer API pricing (checked 20 November 2026)