🌱 Welcome to Factnetize — honest, well-researched articles on tech, health and AI. Get the weekly →
AI

Free LLM API: four keys that work, and the catch with each

Four free LLM API keys cover most hobby and development work: Gemini, OpenRouter, NVIDIA and Cloudflare. Here is what each gives you, the catch with each, and how to put a key into OpenCode or Hermes.

A brass key on a dark desk in front of a laptop whose screen shows many small colored tiles

⚡ Key takeaways

  • Four free LLM API keys cover most hobby and development work: Google Gemini, OpenRouter, NVIDIA and Cloudflare Workers AI.
  • Every free tier has a catch: a daily cap, a per-minute limit, a development-only license, or prompts used to improve the provider’s products. Keep private code off them.
  • All four speak the OpenAI format, so one key drops into OpenCode, Hermes or your own script.

A free LLM API lets you run a coding agent, a chatbot or your own script without paying per token. You still need a key, and each free tier comes with its own limit and its own rules about your data. This guide covers four free keys that work today: Gemini, OpenRouter, NVIDIA and Cloudflare.

Provider Limit Uses prompts?
Gemini Shown in AI Studio Yes, on free tier
OpenRouter 50 requests a day Some providers; can block
NVIDIA Per model, often 40/min Yes
Cloudflare 10,000 neurons a day Check its terms
Table 1 · Four free LLM API keys: limit and data use

Google Gemini: the strongest free models

Gemini gives you the most capable free models of the four. Google’s pricing page lists free input and output for Gemini 3.5 Flash, 2.5 Pro, 2.5 Flash and the Flash-Lite models, among others. The newest Pro preview has no free tier.

  1. Open the API Keys page in Google AI Studio and sign in with your Google account.
  2. Accept the terms. AI Studio creates a project and a first key for you.
  3. Copy the key.

The catch is your data. On the free tier, Google uses your content to improve its products; on the paid tier it doesn’t. Google lists your request limits per model in AI Studio, not in its docs.

OpenRouter: many free models, one key

OpenRouter is a single key for models from many providers, and some of them are free: their IDs end in :free. Create an API key in your OpenRouter account. Its limits page sets free models at 20 requests a minute and 50 a day. Buy at least 10 credits once, and the daily cap rises to 1,000.

Some providers behind OpenRouter may train on your prompts. In your privacy settings you can block providers that train on your data, with a separate switch for free models. Turn it on before you send anything private.

NVIDIA: 160+ models for development

NVIDIA has the widest free catalog. Joining the free NVIDIA Developer Program gives you free API endpoints for 160+ models at build.nvidia.com, for research, development and testing.

  1. Sign in at build.nvidia.com with a free NVIDIA account.
  2. Open your profile menu and choose API Keys.
  3. Click Generate and copy the key. It starts with nvapi-.

There are no credits to run out. NVIDIA replaced them with rate limits that differ per model; users commonly report 40 requests a minute. The license is the real catch: production use is not allowed, and the trial terms let NVIDIA use your prompts and outputs to improve its products.

From my own use

I keep free keys from all four. When OpenCode’s own free usage runs out for the day, I switch to NVIDIA and carry on instead of waiting or paying.

Cloudflare Workers AI: a small daily allowance

Cloudflare suits small jobs, such as a script that runs a few prompts a day. Workers AI gives 10,000 neurons a day at no charge, on the free and the paid Workers plan. A neuron is Cloudflare’s unit for compute; how many prompts that buys depends on the model.

Cloudflare needs two values, your account ID and an API token:

  1. In the Cloudflare dashboard, open the Workers AI page and select Use REST API.
  2. Select Create a Workers AI API Token, then Create API Token, and copy it.
  3. Copy the value under Account ID on the same page.

The account ID goes into the OpenAI-compatible base URL, and the token is your API key:

https://api.cloudflare.com/client/v4/accounts/YOUR_ACCOUNT_ID/ai/v1

Put a free LLM API key into OpenCode or Hermes

In OpenCode Desktop, a key takes five clicks:

  1. Click the model name next to the prompt box.
  2. Click +.
  3. Choose Integrations.
  4. Pick the provider, for example Nvidia.
  5. Paste your key and pick a model from the new group.

Send one short prompt to check it works. Our OpenCode free models guide shows these screens.

In Hermes, tell it in chat: “Add OpenRouter as a model provider with this API key, then answer this message with a free model.” A reply from the new model means the key works. New to providers and endpoints? Our guide to tokens and API keys explains them.

Frequently asked questions

Which free LLM API is best for coding?

Gemini 2.5 Pro for quality, NVIDIA as the fallback. Keep two keys, so one takes over when the other hits its limit.

Is a free LLM API safe for private code?

Not by default, because most free tiers may use your prompts. Keep private code on a paid tier.

Can I use a free LLM API in a product I sell?

Not with NVIDIA’s trial key, which is for development and testing only. Check each provider’s terms before you ship anything.

John Lock
Written by

John Lock

The Tested Weekly

One email a week with the guides we tested, sources linked. No spam.

Leave a comment

Your email address will not be published. Required fields are marked *

Weekly · No spam

The Tested Weekly

One email a week with the guides we tested, sources linked.