Last verified: 2026-08-19 (web-search-verified against provider docs and independent trackers on this date). Free tiers change frequently — providers add credit-card requirements, cut rate limits, or deprecate models with little notice. Treat every row below as "true as of last verification," not a permanent guarantee. Re-check a provider's own pricing/docs page before depending on it in production.
This file is written to be portable: drop it into any project (any language, any framework) as a reference for (1) which AI/dev-infra providers currently offer a real free tier with no credit card required, and (2) how to build a multi-provider automatic-fallback chain so your app never depends on a single model or vendor.
Any system that calls an LLM (or other AI service) should never depend on a single provider or model. Free tiers get rate-limited, models get deprecated, providers have outages, and pricing changes without warning. If one model becomes unavailable, deprecated, rate-limited, overloaded, or fails unexpectedly, the system should silently move to the next suitable provider/model without interrupting the user.
- Zero manual switching — the app decides, not the user.
- Automatic fallback across providers and, within a provider, across models.
- Fastest available model for the task, without sacrificing output quality.
- Minimal latency, minimal cost (free tiers first, paid only as last resort).
- Graceful degradation over hard failure.
- Future-proof against provider deprecations — swap a row in a table, not application logic.
- LLM / chat providers (primary table)
- Groq deprecation watch
- Preferred coding-model priority (generic)
- Embeddings & RAG
- Speech APIs (TTS / STT)
- Image generation
- AI infrastructure (gateways, observability)
- Vector databases
- Free databases
- Hosting
- Automation
- Authentication
- Generic automatic fallback chain architecture
- Reference implementation in this repo
- How to adapt this to a new project
- Hardware-aware local model suggestions
- Coding behaviour & general principles
Rows marked 🔑 have key indicate this project (CodeBook) already has a working API key on file in docs/personal-dev-info.txt — useful if you're cloning this doc into a sibling project that shares that key file.
All providers below expose (or can be driven through) an OpenAI-compatible /chat/completions endpoint, which is what makes a single generic client viable (see Generic automatic fallback chain architecture).
| Provider | Free, no card? | Current free-tier models (verified 2026-08-01) | Notes |
|---|---|---|---|
| Google AI Studio (Gemini) 🔑 | Yes — genuinely indefinite, no card, no expiration | gemini-2.5-flash, gemini-2.5-flash-lite (Pro tier is now paid-only as of an April 2026 change) |
OpenAI-compatible endpoint confirmed working: https://generativelanguage.googleapis.com/v1beta/openai/. ~1,500 req/day, 1M TPM, 15 RPM on Flash. Free-tier prompts may be used to improve Google's products (paid tier / Vertex AI opts out of this). |
| GroqCloud 🔑 | Yes — no card | openai/gpt-oss-120b, openai/gpt-oss-20b, qwen/qwen3.6-27b |
Extremely fast inference (LPU hardware). See deprecation watch below — llama-3.3-70b-versatile shutdown 2026-08-16 (past). ~14,400 req/day, 30 RPM typical on free tier (varies per model). |
| OpenRouter 🔑 | Yes — no card for :free models |
28+ models with a :free ID suffix, e.g. openai/gpt-oss-20b:free, deepseek/deepseek-chat-v3-0324:free, meta-llama/llama-3.3-70b-instruct:free, qwen/qwen3-coder-480b:free |
Single API routes to many upstream providers. Free tier: 20 req/min, 50 req/day (raised to 1,000/day if you ever add $10 of credit — still optional). The exact free-model list changes often; check https://openrouter.ai/models?max_price=0 before depending on a specific ID. |
| GitHub Models 🔑 (read-only key on file) | Yes — no card, tied to a GitHub account | 45+ models incl. OpenAI GPT-4.1/o-series, Meta Llama 4, Mistral, DeepSeek, Cohere | Rate limits scale with your GitHub Copilot tier (Free/Pro/Pro+/Business) — roughly 10–15 RPM / 50–150 RPD on a free GitHub account. 8K input / 4K output token caps — prototyping tool, not production-scale. |
Cloudflare Workers AI 🔑 (key on file, not wired in this repo — needs an account ID not present in docs/personal-dev-info.txt; see REQ-1613 in .agile-v/DECISION_LOG.md) |
Yes — no card, starts immediately on any free Cloudflare account | 50+ models incl. Llama, Mistral, Gemma, DeepSeek, Qwen, Whisper (speech), SDXL (image) | 10,000 free "Neurons" (Cloudflare's normalized compute unit) per day, resets daily at 00:00 UTC — an ongoing daily allowance, not a one-time credit. Requires both an API token and your Cloudflare account ID in the request URL. |
| Cerebras Cloud 🔑 | Yes — no card, no waitlist | gpt-oss-120b, llama3.3-70b, qwen-3-32b/qwen-3-235b family (verify current names — Cerebras mirrors much of the Groq-style OSS lineup) |
One of the most generous free tiers found: ~1,000,000 tokens/day, 14,400 req/day, 30 RPM, 60K TPM. Context window capped at 8K on free tier. Extremely fast (wafer-scale hardware). |
| NVIDIA NIM (build.nvidia.com) 🔑 | Yes — no card, just an email | 100+ hosted models incl. Llama, Qwen, Mistral, DeepSeek, NVIDIA's own Nemotron | OpenAI-compatible endpoint. ~40 RPM; exact quota varies per model and current platform load ("trial" credits, not a hard token cap). Good breadth of models for a single free signup. |
| Hugging Face (Inference Providers / router) 🔑 | Yes — no card for the free tier | Access to 15+ upstream providers (Groq, Together, Fireworks, Cerebras, Nebius, SambaNova, Novita, Featherless, and more) through one router endpoint https://router.huggingface.co/v1 |
Free tier ≈ 100K monthly "Inference Provider credits" (very small in dollar terms — reports put actual free spend around $0.10/month equivalent). Useful as a long list of fallback models rather than a primary provider — many individual models return 404/410 as hosts rotate, so iterate a model list and expect some misses. |
| Mistral AI (La Plateforme) 🔑 | Yes — no card, "Experiment" tier | mistral-small-latest, open-mistral-nemo, Codestral, Pixtral (multimodal) |
Explicitly built for evaluation, not production — 1 req/sec-class limits (~2 RPM reported), ~1B tokens/month cap. Fine as a fallback rung, not a primary high-volume provider. |
| Cohere 🔑 | Yes — no card, trial key issued instantly | command-r7b-12-2024, command-r-08-2024, Command A, Aya Expanse, Embed v4 |
~1,000 API calls/month, 20 RPM chat / 5 RPM embed. Explicitly for testing/prototyping, not commercial production traffic. |
| Zhipu AI (BigModel / GLM) | Yes in most regions — reports vary; some flows require phone verification, not necessarily a card | GLM-4.5-Flash / GLM-4.7-Flash class, up to a 20M-token starter grant on signup | Chinese-market originated; docs and dashboard are partly Chinese-language. Confirm current signup flow before relying on it — one source in our search reported a card + phone-verification requirement, contradicting others. (unverified — check provider docs before relying on this). |
These are useful extra fallback rungs but are not a permanent no-cost tier — they hand out a one-time credit on signup and then require a card or stop working:
| Provider | Free, no card? | Notes |
|---|---|---|
| DeepInfra | Limited — ~$1 signup credit, no card | 50+ open models at low per-token pricing after credit runs out. Some sources report no ongoing free tier at all — confirm before relying on it. |
| Fireworks AI | Limited — $1 signup credit, no card | Card required to lift the default 10 req/min cap. Good for a one-time evaluation, not a standing free fallback. |
| Together AI | Limited — signup trial credit, no card | Fast open-model inference; exact current credit amount changes often. |
| Novita AI | Limited — small one-time voucher (~$0.50), no card | Unusual among this group: also publishes a handful of genuinely $0/token open-source models that remain free after the voucher is spent — worth checking their current model list. |
Fetched directly from https://console.groq.com/docs/deprecations on the verification date above:
| Deprecated model | Shutdown date | Recommended replacement |
|---|---|---|
llama-3.1-8b-instant |
2026-08-16 | openai/gpt-oss-20b |
llama-3.3-70b-versatile |
2026-08-16 | openai/gpt-oss-120b or qwen/qwen3.6-27b |
qwen/qwen3-32b |
2026-07-17 (already past) | openai/gpt-oss-120b |
meta-llama/llama-4-scout-17b-16e-instruct |
2026-07-17 (already past) | openai/gpt-oss-120b or qwen/qwen3.6-27b |
moonshotai/kimi-k2-instruct-0905 |
2026-04-15 (already past) | openai/gpt-oss-120b |
meta-llama/llama-4-maverick-17b-128e-instruct |
2026-03-09 (already past) | openai/gpt-oss-120b |
meta-llama/llama-guard-4-12b |
2026-03-05 (already past) | openai/gpt-oss-safeguard-20b |
This repo (portfolio-chatbot-widget): Implemented at lib/ai/providers.ts with Groq chain openai/gpt-oss-120b → qwen/qwen3.6-27b → openai/gpt-oss-20b (llama models removed after 2026-08-16 shutdown).
Never hardcode a Groq model without checking console.groq.com/docs/deprecations (or GET https://api.groq.com/openai/v1/models) periodically — Groq deprecates models more aggressively than most providers on this list.
For agentic coding workflows specifically (not just chat), in order of preference across the free-tier models above:
openai/gpt-oss-120b(Groq / Cerebras / NVIDIA NIM / OpenRouter:free) — difficult debugging, architecture, large repositories, refactoring, planning, agent workflows, complex reasoning.qwen/qwen3.6-27b(Groq) — everyday coding: repository edits, frontend, backend, TypeScript, React, Next.js, Node, Python. Treat as the default fast coding model.openai/gpt-oss-20b(Groq / OpenRouter:free) — simple coding, autocomplete, quick fixes, documentation, tool calling, JSON generation. Replaces the deprecatedllama-3.1-8b-instant.
Provider preference order for coding tasks specifically (fastest/most reliable free tiers first): Groq → OpenRouter → Cerebras → NVIDIA NIM → local (Ollama/LM Studio). Choose whichever provider currently offers the highest-ranked model from the list above and is configured (has a key).
| Provider | Free, no card? | Notes |
|---|---|---|
| Voyage AI | Yes, reported no-card signup | 200M free tokens on the voyage-4 generation (~400K documents) — one of the largest embedding free tiers found. |
| Jina AI 🔑 | Yes | Embeddings v4: ~1M tokens/month free via API; also has a non-commercial free license track. Includes reranking endpoints. |
| Cohere 🔑 | Yes (same trial key as chat) | embed-v4 included in the ~1,000 calls/month trial tier, 5 RPM on the embed endpoint specifically. |
| Hugging Face Inference 🔑 | Yes | Sentence-transformer and other embedding models available through the same router/credit pool as chat — good for a self-hosted-adjacent fallback, not a primary high-throughput source. |
| Also viable | — | Google's Gemini embedding endpoint (~1,500 req/day, no card) is a solid no-card fallback if you already hold a Gemini key. |
| Provider | Free, no card? | Notes |
|---|---|---|
| Deepgram | Yes — $200 signup credit, no card | Most generous evaluation budget of this group; pay-as-you-go afterward at ~$0.03/1,000 characters equivalent. STT-focused (also offers TTS). |
| ElevenLabs 🔑 | Yes | ~10,000 credits/month free ≈ 10 min Multilingual TTS or ~20 min "Flash" model. Good voice quality, tightest free quota on this list. |
| Cartesia | Partial — free tier exists but effectively gated by a $5 minimum to unlock full evaluation in some flows | 10,000 credits on the nominal free tier; check current signup flow before assuming zero friction. (unverified — confirm current no-card status before relying on this). |
| AssemblyAI | Not independently confirmed in this pass | Commonly cited elsewhere as offering a no-card free async-transcription tier; verify directly on assemblyai.com before relying on the claim. (unverified — check provider docs). |
| Also on file | — | REPLICATE_API_KEY 🔑 also hosts speech models (XTTS, Bark) — see Image generation table below for Replicate's general free-tier caveats, which apply here too. |
| Provider | Free, no card? | Notes |
|---|---|---|
| Hugging Face Spaces 🔑 | Yes | Community Spaces running Stable Diffusion/Flux on "ZeroGPU" (dynamic H200 access, ~3.5 min/day quota on the free HF account) — genuinely free but low-throughput and queue times vary. |
| Fal AI 🔑 | Limited — one-time signup credit, no card to start | No standing free tier for ongoing use after the trial credit is spent; converts to pay-per-output (~$0.02+/image) afterward. Good OpenAI-compatible-style API. |
| Replicate 🔑 | Limited — no permanent free tier | New accounts can run a capped number of free models from a "Try for Free" collection; no disclosed ongoing free quota. Referral credits ($10) exist but are promotional, not a standing tier. |
| Stability AI | Limited — starting credit balance, terms vary | Similar shape to Fal/Replicate: evaluate with a signup credit, pay afterward. (unverified — confirm current credit amount before relying on this). |
| Also viable, no card | — | Gemini 2.5 Flash Image via Google AI Studio (~500 req/day reported) rides on the same no-card Gemini key already in this project's key file — often the easiest no-card image option if you already integrated Gemini for chat. |
| Provider | Free, no card? | Notes |
|---|---|---|
| Cloudflare AI Gateway | Yes | Core routing/caching/rate-limiting/logging features are free on any Cloudflare account; free tier caps at 100,000 logged AI Gateway requests/month. No per-call gateway fee — you still pay the underlying model provider for actual inference. |
| Cloudflare Vectorize | Yes (prototyping tier) | Free to prototype/experiment on the Workers Free plan; billed per read/write/storage beyond that. See vector databases below. |
| Vercel AI SDK 🔑 | Yes — it's an open-source SDK, not a paid service | No "free tier" concept applies — it's a client library (ai package) that talks to whatever provider you configure (including every free-tier provider in this doc via its OpenAI-compatible provider). The VERCEL_AI_SDK_API_KEY on file is for Vercel's AI Gateway product specifically, if used. |
| LangSmith 🔑 | Yes | Free "Developer" plan: tracing, evals, Prompt Hub, annotation queues, ~5,000 traces/month before paid tiers kick in ($2.50/1K traces on Plus). |
| Langfuse 🔑 | Yes | Fully open-source (MIT) — self-host for zero cost, or use Langfuse Cloud's free tier (~50,000 observability "units"/month). Project already has secret + public + base URL keys on file. |
| Helicone | Not yet provisioned (per key file: "tell me to generate one for this project") | Free tier reported at ~10,000 requests/month; paid plans start around $79/month beyond that. |
| Provider | Free, no card? | Notes |
|---|---|---|
| Pinecone 🔑 | Yes — permanent free tier | ~2GB storage free "forever" on the serverless tier; production-scale needs the $50/month Standard plan. |
| Qdrant Cloud 🔑 | Yes — permanent free tier | ~1GB free forever; also fully open-source and self-hostable at zero cost if you have infrastructure. |
| Weaviate Cloud 🔑 | Limited — free trial only | Reports indicate payment is required after roughly a two-week trial, unlike Pinecone/Qdrant's standing free tiers. Also open-source/self-hostable for a permanent no-cost option. |
| Cloudflare Vectorize | Yes (prototyping tier) | Same Workers Free plan as AI Gateway above — free to prototype, billed beyond that. Needs a Cloudflare account ID, same caveat as Workers AI. |
| Provider | Free, no card? | Notes |
|---|---|---|
| Neon (Postgres) | Yes — no card required | ~0.5GB storage, ~100 compute hours/month, scales to zero. Reported as the cleanest "real free tier, no card" Postgres option. |
| Supabase | Yes — no card for the free project tier | ~500MB Postgres + built-in auth + storage + realtime; free projects pause after 7 days of inactivity (auto-resumes on next request in most cases). |
| Turso (libSQL/SQLite edge) | Yes | ~9GB storage across up to 500 databases; strong option for edge-deployed SQLite. |
| Upstash Redis 🔑 | Yes | ~500K commands/month, 256MB data, true pay-per-request beyond that — no idle cost. Project already has both a personal and a university-library Upstash instance on file. |
| MongoDB Atlas | Yes (Flex tier) | Usage-based free/cheap tier capped around $30/month equivalent before you'd need to upgrade; the older fixed "M0 free forever" tier has been largely superseded by Flex — confirm current tier naming on signup. |
| Provider | Free, no card? | Notes |
|---|---|---|
| Cloudflare Pages | Yes — most generous for static/Jamstack | Unlimited bandwidth, ~500 builds/month, ~100 sites free. No egress fees. |
| Render | Yes — no card required | Free web services (512MB RAM), free static sites, free Postgres, custom domains. Free web services spin down on idle and cold-start on next request. |
| Vercel | Yes for hobby/static; usage-based beyond that | Generous free tier for frontend/Jamstack + serverless functions; scales to credit-based billing for heavier full-stack usage. |
| Netlify | Yes, but moved to credit-based free tier | ~300 "credits"/month on the free plan as of recent pricing changes — no longer unlimited-build-minutes framing. |
| Railway | Limited | Reports now describe a small one-time trial credit (~$5) rather than an ongoing free tier — confirm current terms before depending on it for anything long-running. |
| Provider | Free, no card? | Notes |
|---|---|---|
| n8n | Yes (self-hosted) / trial (cloud) | Self-hosted Community Edition is free forever, unlimited workflows/executions (you run the infrastructure). n8n Cloud offers a 14-day free trial, no card. Project's own n8n Cloud account is noted as expired in the key file. |
| Pipedream | Yes | Free tier: ~300 credits/month, 3 workflows, 3 connected accounts, plus a small AI-token allowance. |
| Make | Yes | Free plan: ~1,000 operations/month, 1MB data store, scheduling and error handling included. |
| Zapier | Yes, but thin | Free plan: 5 single-step Zaps, 100 tasks/month — the most limited of this group for real automation volume. |
| Provider | Free, no card? | Notes |
|---|---|---|
| Supabase Auth | Yes — most generous MAU allowance found | ~50,000 MAU free, then ~$0.00325/MAU. Bundled with Supabase's Postgres + storage if you're already using it. |
| Clerk 🔑 | Yes | Reports vary by metric definition — roughly 10,000 MAU (billed) free, with a separate "50K monthly retained users" figure also cited; confirm current definition on Clerk's pricing page before budgeting around a specific number. |
| Better Auth | Yes — it's self-hosted, open-source, framework-agnostic (not a hosted metered service) | No MAU limit because there's no hosted backend to meter — you own the database and infrastructure. Zero cost beyond whatever you already pay for hosting/DB. |
This pattern is deliberately framework-agnostic — the same shape works in TypeScript/Express, Python/FastAPI, Next.js API routes, a Cloudflare Worker, or a CLI tool. It has three layers:
A flat, ordered list of provider configs: { id, label, envKey, baseUrl, models[], extraHeaders? }. Order encodes fallback priority. Because most free-tier LLM providers (see the table above) speak the same OpenAI-compatible /chat/completions JSON shape, this registry is pure data — no per-provider client code needed.
Priority ordering strategy (a reasonable default, adjust to your own latency/quality/quota needs):
- Your fastest, most reliable free-tier provider with the best-quality free model (e.g. Groq or Gemini).
- A broad-coverage aggregator as a second opinion (e.g. OpenRouter's
:freemodels). - Remaining configured providers, roughly ordered by observed reliability and free-tier generosity.
- A large-catalog, lower-reliability fallback last (e.g. Hugging Face's router — most model breadth, least consistent uptime per model).
A single function that takes (providerConfig, apiKey, model, messages, options), POSTs to ${baseUrl}/chat/completions, and returns a discriminated result type rather than throwing:
type ChatResult =
| { ok: true; text: string; provider: string; model: string }
| { ok: false; kind: "not_configured" | "billing" | "rate_limit" | "upstream"; provider?: string; status?: number; message?: string }
Never throwing on a provider failure is what makes silent fallback possible — the caller just checks ok and moves on.
Two nested loops:
- Inner loop (within one provider): try each model in that provider's chain in order; only advance to the next model on a retriable failure.
- Outer loop (across providers): try each configured provider in priority order; skip unconfigured ones (no API key present) without counting them as a failure; only advance to the next provider on a retriable failure from every model in the current provider's chain.
Retriable failure classification (advance to next model/provider):
- HTTP 408 (timeout), 429 (rate limited), 500/502/503/504 (server/upstream error)
- Request timeout / network error / connection reset
- Empty or malformed response body
- Model marked unavailable or deprecated by the provider
- Context-length overflow (then optionally retry the same provider with a shorter/chunked context before moving on)
Non-retriable (stop immediately, surface the error): malformed request on your side (4xx other than 408/429), and — importantly — 402 Payment Required / billing errors should be classified separately (kind: "billing") so you can alert on "this free tier ran out" distinctly from a transient failure, rather than silently retrying forever against an exhausted quota.
Never stop after the first failure. If every provider fails, return the last failure (for logging/alerting) rather than throwing — let the caller decide whether to show a user-facing error, degrade to a canned response, or queue a retry.
When a provider returns 429, don't waste time trying its remaining models in the same request — a rate limit on one model from a given key usually means the whole provider is throttled for that window. Skip straight to the next provider.
This repository (portfolio-chatbot-widget) implements this pattern at lib/ai/:
providers.ts— provider registry (Layer 1): Gemini, OpenRouter:free, Groq OSS, Hugging Face router, OpenAI paid last.normalize-messages.ts— message content normalization for multi-format chat history.retriable.ts— retriable/rate-limit error classification (Layer 3 helper).gemini-stream.ts— Gemini native streaming (primary free-tier provider).openai-stream.ts— OpenAI-compatible streaming via Vercel AI SDK.index.ts— orchestrator (Layer 3): outer provider loop, inner model loop, 429 fast-skip.lib/ai.ts— re-export preserving the existing@/lib/aiimport path.
Embeddings fallback chain lives in lib/embeddings.ts (Gemini → HF router → OpenRouter free → OpenAI).
- Inventory your free keys. List every provider you already have a working, no-card API key for. Start there — don't sign up for new providers until the ones you already have are wired in and insufficient.
- Check which providers share the OpenAI-compatible
/chat/completionsshape. Most do (see the primary LLM table above). If so, build one generic client, not N provider-specific files — this is the single highest-leverage simplification in this whole pattern. - Order providers by priority, not just alphabetically: fastest + most reliable + best free-tier quota first, thin/limited-credit providers last.
- Classify failures as retriable vs. not before writing the orchestration loop (see the list above) — this is the part that's easy to get wrong (e.g. accidentally retrying a 401 forever, or not retrying a 429 at all).
- Never hardcode a single model ID as the only option. Every provider entry should be a chain of models, tried in order, so a single deprecation (see the Groq watch above) doesn't take down the whole provider.
- Return a result type, don't throw from the low-level request function — this is what makes "silently skip to the next provider" simple instead of a tangle of try/catch.
- Re-verify this doc's tables periodically. Free tiers are the least stable part of any AI stack — set a calendar reminder or re-run the verification searches every few months, especially before a launch.
If local inference is available (Ollama, LM Studio, etc.), choose models based on detected VRAM as a final, always-available fallback rung below every cloud provider:
8 GB VRAM — Preferred: Qwen 3.6 3B, Gemma 3 4B, Llama 3.2 3B, Phi-4 Mini. Fallback: Qwen 2.5 3B, Gemma 2 2B.
16 GB VRAM — Preferred: GPT-OSS-20B (quantized if supported), Qwen3.6-27B Q4, Gemma 3 12B, Mistral Small. Fallback: Qwen2.5-14B, DeepSeek-R1 Distill 14B.
24 GB VRAM — Preferred: Qwen3.6-27B Q6/Q8, GPT-OSS-20B, DeepSeek-R1 Distill 32B (quantized). Fallback: Gemma 3 27B, Mistral Large (quantized).
32 GB VRAM+ — Preferred: GPT-OSS-120B (remote is usually still faster/cheaper than local at this size), Qwen3.6-27B full precision, best available local coding model. Prefer highest-quality model before fastest model at this tier — you have headroom.
Context handling: prefer a repository map, changed files, current file, and direct imports/dependencies over sending an entire repository. Chunk large contexts rather than truncating silently.
When an AI agent edits code: always preserve formatting, comments, types, tests, lint rules, accessibility, and translations. Never rewrite unrelated files. Prefer search/grep/repository-indexing/AST-based edits over blind regex replacement.
Prefer deterministic outputs, structured edits, complete implementations, and compile-ready/production-ready code. Avoid placeholders, TODO comments, fake implementations, and pseudocode in shipped output.
This document intentionally avoids hardcoding a single "best" model or provider. Whenever a better model becomes available, update only the relevant table row or model-chain array — the fallback architecture should never need to change alongside it.