Summarize this article with:
- Eden AI offers 7 text generation models billed $0, including Gemma 4 31B, Gemma 4 26B A4B and Ternary Bonsai 27B with 262K context.
- They use the same OpenAI-compatible API as paid models: switching later means changing one parameter.
- For production at scale, open-weight models such as gpt-oss, Qwen3, Mistral Small 3.2 or DeepSeek V4 Flash cost a few cents per million tokens.
Text generation used to mean choosing between a closed API with a paid plan and an open-source model you had to host yourself. In 2027 there is a third option: capable open-weight models that you can call for free through an API. This guide lists the text generation models you can use at no cost on Eden AI, the best open-weight models to self-host or call cheaply, and how to start in a few lines of code.
What is a text generation API?
A text generation API sends a prompt to a large language model (LLM) and returns generated text: answers, summaries, drafts, rewrites, classifications or structured JSON. Most modern APIs, including Eden AI, follow the OpenAI chat completions format, so the same code works across providers and models.
Free text generation models on Eden AI
Eden AI exposes seven text generation models billed $0, through the same OpenAI-compatible API as its paid models. We tested all seven on 27 October 2026: every call was billed $0.
A few things to know before you start:
- Gemma 4 and Ternary Bonsai reason before answering: set max_tokens to 500 or more, or the answer can come back empty.
- The four Cloudflare-hosted models are small, older LoRA base models. They are fine for short rewrites or classification; in our tests, Llama 2 7B returned unusable text.
- The free models run in the global region. If you need EU data residency, EU-hosted Gemma 4 endpoints are available at a low paid rate.
- Availability and conditions can change: the Eden AI model catalog is the source of truth.
How to call a free model in a few lines
- Create an Eden AI account at app.edenai.run.
- Create an API key in Settings > API Keys.
- Call a free model with any OpenAI-compatible client:
To switch to another model later, free or paid, only the model parameter changes.
Best open-weight text generation models in 2027
Open-weight models can be downloaded and self-hosted, or called through hosted APIs. The list below covers current open-weight families available on Eden AI, with the lowest price we found per million input tokens on 27 October 2026. Always check each model's license on its model card before commercial use.
Gemma 4 (Google)
Gemma 4 31B and 26B A4B offer a 262K token context and are free on Eden AI. A good default for general text generation, summarization and long-document work.
Llama 4 Scout and Maverick (Meta)
Mixture-of-experts models with very long context: up to 327K tokens for Scout and up to 1M for Maverick, depending on the host. From $0.10 per million input tokens on Eden AI.
Qwen3 (Alibaba)
A large family, from small to very large models. Qwen3 30B A3B is a compact mixture-of-experts model for fast, cheap text generation, from $0.051 per million input tokens.
Mistral Small 3.2 (Mistral AI)
A 24B model with a 128K context. From $0.075 per million input tokens, with EU-hosted versions from $0.10.
DeepSeek V4 Flash (DeepSeek)
A model with a context window of about 1M tokens, from $0.06 per million input tokens.
gpt-oss 20B and 120B (OpenAI)
OpenAI's open-weight models, with a 131K context. The 20B version starts at $0.009 per million input tokens, the 120B at $0.037.
GLM-4.7 Flash (Z.ai)
A fast model with a context of up to about 200K tokens, from $0.06 per million input tokens.
Free API, cheap API or self-hosting?
- Free API models are best for prototypes, tests and low-volume features: no infrastructure and no cost, but conditions can change.
- Cheap hosted open-weight models are best for production at scale: a few cents per million tokens, with fallback to another provider when one fails.
- Self-hosting is best when data must never leave your infrastructure or when volume is very high, at the cost of GPUs and operations.
With Eden AI, the first two options use the same API key and code, so a prototype built on a free model can move to a paid or EU-hosted model by changing one parameter.

.jpg)

