Skip to content

Repository files navigation

Free LLM APIs

Markdown lint License: MIT Docs only PRs welcome

A practical, source-linked directory of large language model APIs that offer a free tier, free credits, or free evaluation access — plus copy-pasteable Python, JavaScript, and cURL examples for each one.

This repository is documentation only. There is no SDK to install, no telemetry, and no API keys anywhere in the tree.

Important

Quotas, model names, endpoints, and rate limits change constantly. This repository deliberately does not publish specific quota numbers. For every provider: Check the provider's official documentation for current limits.

Provider table

Provider Free access OpenAI-compatible Best for
Gemini Yes (see page) Yes Long context and multimodal work
Groq Yes (see page) Yes Raw inference speed
OpenRouter Yes (see page) Yes Trying many models behind one key
Workers AI Yes (see page) Yes Edge and Workers deployments
Mistral Yes (see page) Mostly EU-hosted general-purpose models
Cohere Yes (see page) Via compatibility API RAG, embeddings, and reranking
Hugging Face Yes (see page) Yes Breadth of open models
NVIDIA NIM Yes (see page) Yes Cloud-to-self-host migration paths
Cerebras Yes (see page) Yes Lowest latency open models
SambaNova Yes (see page) Yes Fast large open-weight models
GitHub Models Retired n/a Nothing new — retired
Z.ai Yes (see page) Yes Coding-focused GLM models

"Free access" means the provider documents some form of no-cost tier, trial key, or included credits — not that it is free forever or free at any volume.

Recommended providers by use case

If you need... Start with Why
The fastest possible responses Groq, Cerebras Purpose-built inference hardware, OpenAI-compatible
To try many models with one key OpenRouter, Hugging Face Router APIs across many upstream providers
Long context or multimodal input Google Gemini Large context windows and image/audio/video support
RAG, embeddings, and reranking Cohere Dedicated embed and rerank endpoints
Inference inside an edge app Cloudflare Workers AI Runs on Cloudflare's network next to your Worker
EU-hosted models Mistral European provider with a documented free tier
A path to self-hosting later NVIDIA NIM Same containers run in the cloud and on your GPUs
Large open-weight models, fast SambaNova Open models on custom accelerators
Coding-focused assistants Z.ai GLM models tuned for coding and agents

Providers

  • Google Gemini API — Google's hosted Gemini models, offered through the Gemini API in Google AI Studio with both a native REST/SDK interface and an OpenAI-compatible surface.
  • Groq — Groq serves open-weight models on its own LPU inference hardware and is known for very high token throughput on chat completions.
  • OpenRouter — A single OpenAI-compatible gateway that routes requests to many upstream model providers, including a rotating set of free-to-use model variants.
  • Cloudflare Workers AI — Inference on Cloudflare's global network, callable from Workers bindings or over REST, with a catalogue of open models identified by `@cf/.
  • Mistral AI (La Plateforme) — Mistral's hosted API for its own open-weight and commercial models, with chat, embeddings, vision, and function calling.
  • Cohere — Enterprise-oriented models for retrieval-augmented generation, embeddings, and reranking, plus a Command family of chat models.
  • Hugging Face Inference Providers — A router in front of many third-party inference providers, letting you call models hosted on the Hub through one OpenAI-compatible endpoint and one token.
  • NVIDIA NIM (build.nvidia.com) — NVIDIA-hosted NIM microservices expose OpenAI-compatible endpoints for a wide catalogue of open models, with the same containers available for self-hosting.
  • Cerebras Inference — Inference on Cerebras wafer-scale hardware, focused on very low latency for open-weight chat models.
  • SambaNova Cloud — SambaCloud serves open-weight models on SambaNova's RDU hardware through an OpenAI-compatible API.
  • GitHub Models — A GitHub-hosted model playground and inference API that let developers call models with a GitHub personal access token.
  • Z.ai (GLM) — Z.

Guides

Repository structure

free-llm-apis/
├── README.md
├── CONTRIBUTING.md
├── LICENSE
├── .gitignore
├── providers/            # one page per provider
├── guides/               # language and concept guides
├── templates/
│   └── provider-template.md
└── .github/
    └── workflows/
        └── markdown-check.yml

Security guidance

  • Never commit keys. Use environment variables or a secret manager; .env is git-ignored here.
  • Never put a key in front-end code. Browser and mobile clients cannot keep secrets — proxy through a backend.
  • Treat free tiers as non-private by default. Some providers may use free-tier traffic to improve their models. Read the terms before sending personal, customer, or proprietary data.
  • Scope and rotate keys. Prefer least-privilege tokens, rotate on any suspected exposure, and delete unused keys.
  • Set spending limits where the provider supports them, so a mistake stays cheap.
  • Validate model output before executing it, rendering it as HTML, or passing it to a shell or database.

Contributing

Corrections and new providers are welcome. Start with CONTRIBUTING.md and copy templates/provider-template.md for a new provider page. Please link an official source for every factual claim, and avoid pasting quota numbers that will be stale within weeks.

Disclaimer

This project is community-maintained and not affiliated with, endorsed by, or sponsored by any provider listed. Free tiers, quotas, model names, endpoints, and rate limits change often and vary by account, region, and plan. Nothing in this repository is a guarantee of availability. Always confirm details in the provider's official documentation before relying on them. Pages are marked with a "last verified" date; treat anything older than that date as unconfirmed.

License

MIT — documentation and examples.

About

No description, website, or topics provided.

Resources

Contributing

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors