Free Access to LLMs

(Appendix)


Intelligent Agents — Module 2

A.Y. 2026/2027

Giovanni Ciatto



Compiled on: 2026-10-22 — printable version

back to ToC

Before you start

  • This is a practical reference on how to use LLMs without paying, for study and research
    • for Master’s and PhD students, researchers, and teachers
  • All figures are a snapshot as of 30 September 2026
    • quotas, programs, and even models change every few months
    • always check the linked page before relying on an offer
  • “Free” here means no money from your pocket: someone else pays (a provider, a cloud, a grant, your lab), or you pay in hardware

What “free” can mean

  1. Standing free tier: a recurring zero-price quota (per minute / day / month), no application needed
  2. Trial: a one-off balance that expires (e.g. $5 for 30 days)
    • a trial is not a free tier: don’t build a course or a paper on top of it
  3. Student credits: cloud credits for enrolled students, renewable while eligible
  4. Research grants: credits awarded upon application, for a specific project
  5. Local open weights: the API bill is zero, but you pay in hardware and electricity

Rule of thumb: grant → student credits → local model → free tier → trials

Which route for me?

Need First choice
A few hundred calls, prototyping, exercises Free tiers: Gemini, Mistral, Groq, OpenRouter, Cohere
Thousands or millions of calls, for a paper Research grants or cloud credits
Sensitive or personal data Local open model, or a contracted API with suitable data terms
A course, repeated every semester Department gateway + local model + free tiers as fallback
Reproducible experiments Pinned open weights, run locally

Free APIs you can use today

No application: just sign up, get a key, and stay within the quota

Provider What you get for free Good for
Google Gemini API Zero-price quota on several current models (e.g. Flash, Flash-Lite), model-specific limits Best overall free frontier-ish API
Mistral (Free plan) $10/month of API credits Direct access to Mistral models
Groq e.g. gpt-oss-120b: 30 req/min, 1,000 req/day, 200k tokens/day Fast open models
OpenRouter :free models 20 req/min, 50 req/day One key, many open models
Cohere (trial key) 1,000 calls/month (despite the name: no expiry, non-commercial use only), also via an OpenAI-compatible endpoint Evaluation, embeddings, rerankers

One client, many free providers

  • All the providers above expose an OpenAI-compatible API: only base_url, key, and model name change
# provider -> (OpenAI-compatible base URL, env var holding the API key)
PROVIDERS = {
    "gemini": ("https://generativelanguage.googleapis.com/v1beta/openai/", "GEMINI_API_KEY"),
    "groq": ("https://api.groq.com/openai/v1", "GROQ_API_KEY"),
    "cohere": ("https://api.cohere.ai/compatibility/v1", "COHERE_API_KEY"),
    "openrouter": ("https://openrouter.ai/api/v1", "OPENROUTER_API_KEY"),
    "mistral": ("https://api.mistral.ai/v1", "MISTRAL_API_KEY"),
    "ollama": ("http://localhost:11434/v1", None),  # local, no key needed
    "vllm": ("http://localhost:8000/v1", None),  # local, no key needed
}
poetry run python -m snippets -l free-access -e 1 groq                               # list the models available now
poetry run python -m snippets -l free-access -e 1 groq openai/gpt-oss-20b "Hello!"   # one chat request
  • PROVIDERS: each provider’s endpoint, and the environment variable holding its key (e.g. GROQ_API_KEY, asked interactively if missing)
    • ollama, vllm: open models served locally (on your machine, see below), hence no key
  • Arguments: PROVIDER (required), then optionally MODEL and PROMPT (without them, the script just lists the models)
  • Full script here (cf. how to run snippets); model IDs are listed live, not hard-coded, since they go stale quickly
  • The same trick works with the LLM-as-a-Service scripts: just set OPENAI_BASE_URL, OPENAI_API_KEY, and OPENAI_MODEL (the default, nvidia/nemotron-3-super-120b-a12b:free, exists only on OpenRouter: pick an ID from the listing above), e.g.
    • Ollama: OPENAI_BASE_URL=http://localhost:11434/v1 OPENAI_API_KEY=unused OPENAI_MODEL=gpt-oss:20b
    • Groq: OPENAI_BASE_URL=https://api.groq.com/openai/v1 OPENAI_API_KEY=... OPENAI_MODEL=openai/gpt-oss-20b

Don’t count on these

Offer Reality
Cerebras Trial: $5 expiring after 30 days, then pay
Hugging Face Inference Providers $0.10/month: smoke tests only
Hugging Face ZeroGPU 5 GPU-minutes/day: fine for demos, not for experiments
Google Colab Free GPUs, but type and limits not guaranteed
Replicate No standing free tier: pay-as-you-go
GitHub Models Free, rate-limited access with any GitHub account… until it was retired: closed to new users on 16 Jun 2026, shut down on 30 Jul 2026

Students: cloud credits

Program What Who Notes
Azure for Students $100 / 12 months, no credit card Full-time university students Renewable yearly; includes Azure OpenAI
AWS Cloud Credit for Research Up to $5,000 (students) Graduate / PhD students at accredited institutions Application, 90–120 days review; credits last 1 year
Anthropic, Claude for scientists Free Claude seat for 1 year Lab members, added by a verified PI A subscription, not API credits
  • Cloud credits can pay for managed model APIs in that cloud (Azure OpenAI, Bedrock, Vertex AI)
  • Watch out for the moment credits run out: set a budget alert, or you will be billed

Researchers: grants

Program Amount Who How
OpenAI Researcher Access Up to $1,000, 12 months Academic / research / nonprofit affiliation Research question + intended use; reviewed quarterly (FAQ)
Anthropic AI for Science Up to $50,000 / project Any researcher may apply Project proposal; selective
Cohere Labs Catalyst Varies Non-commercial, open-science / public-benefit projects Rolling application
Google Cloud for Researchers $5,000 Academic researchers Application
AWS Cloud Credit for Research No fixed cap (faculty) Faculty and research staff Application, 90–120 days
  • Apply early: approval takes weeks to months

Startups (in brief)

Program Amount
Google for Startups, AI Up to $350,000 over 2 years (Google models only)
Microsoft for Startups Up to $150,000, scaling with progress
AWS Activate Up to $200,000
  • Since May 2026, AWS Activate credits can pay for third-party models on Bedrock (Anthropic, Mistral, Meta, …) (source)
  • “Up to” is the maximum, not what everybody gets

Local models: the only durable free API

  • Open-weight models + an inference server = an API that nobody can revoke or re-price
  • Serve them via Ollama (easy) or vLLM (fast, multi-user): both expose an OpenAI-compatible API
    • i.e. poetry run python -m snippets -l free-access -e 1 ollama works out of the box
  • Quantization (4-bit) cuts memory by ~3× w.r.t. 16-bit (Q4_K_M ≈ 4.9 bits per weight, cf. the table in LLM-as-a-Service), usually with small quality loss, but re-evaluate on your task
    • see the LLM-as-a-Service lecture for requirements, quantization, and model zoos
  • Pinned weights (exact revision + quantization + engine version) are also the best option for reproducibility

Labs and courses: a gateway, not a shared key

Users, one virtual key each

Lab gateway, e.g. LiteLLM

Per-user budgets + rate limits

Grant-funded APIs

Cloud credits

Free tiers

Local vLLM

  1. Create provider accounts under the institution, and keep the real keys only on the gateway
  2. Run LiteLLM and give each user (or project) a virtual key with a hard budget and rate limit
  3. Keep an allow-list of models; record provider + model ID of each run
  4. Clients just point OPENAI_BASE_URL to the gateway: same code as above

Don’ts

These look free, but they break Terms of Service, leak data, or ruin reproducibility:

  • Sharing or trading API keys: no attribution, one leak burns everybody’s budget
  • Multiple accounts / cycling trials to multiply quotas: leads to suspension
  • Wrapping consumer chat UIs (ChatGPT, Claude.ai) as an API: forbidden by OpenAI and Anthropic terms, and breaks at every UI change
  • VPNs to bypass regional or eligibility restrictions
  • Unknown free proxies: the operator sees your prompts, outputs, and keys
  • Distilling a free proprietary API into your own model: OpenAI’s terms forbid using outputs to build competing models
    • with open teachers (e.g. DeepSeek-R1), check both teacher and student-base licenses

Privacy and reproducibility

What happens to my data?

  • Free tiers may use your prompts for training and human review
    • Gemini: yes for free tiers in general, but not for users in EEA / Switzerland / UK, where paid-tier rules apply (terms)
    • OpenAI API: not used for training by default (source)
  • Never send personal, confidential, or human-subject data to a free tier without reading its terms

What to record, for each experiment

  • provider, endpoint, and service tier
  • exact model ID (not just the family)
  • date
  • prompts, decoding parameters, seed
  • number of calls, retry policy, aggregator (if any)
  • local: weights revision, quantization, engine + version

e.g. Cerebras removed gemma-4-31b from public endpoints on 3 Sep 2026

Lecture is Over


Compiled on: 2026-10-22 — printable version

back to ToC