Hugging Face logo

Free Hugging Face API Key, Base URL & Rate Limits

Model Provider

Hugging Face provides free access to a rotating selection of open-weight models including Qwen, Llama, Gemma, and SmolLM.

Free TierFunction Calling

How to get a free Hugging Face API key

  1. 1
    Sign up at huggingface.co Email or Google/GitHub. No credit card.
  2. 2
    Go to Settings → Access Tokens
  3. 3
    Create a token (read-only is fine)
  4. 4
    Pick a model Free models are rate-limited on shared infrastructure.
  5. 5
    Configure OpenAI client Base URL: https://router.huggingface.co/v1

Provider Snapshot

P Provider Type Model Provider
O OpenAI Compatible No
U Base URL https://router.huggingface.co/v1
F Free Tier 4 free models online
P Phone Required No
S Streaming Varies
T Function Calling Yes
V Vision Varies
L Last Updated 2026-08-06

Supported Models 7 models

View in directory →
Model ID Developer Context Availability Free Tier Use cases
qwen2-5-7b-instruct
Qwen2.5-7B-Instruct
Hugging Face 131K Online Yes chat
qwen2-5-coder-7b-instruct
Qwen2.5-Coder-7B-Instruct
Alibaba 131K Online Yes chatcoding
meta-llama-3-1-8b-instruct
Meta-Llama-3.1-8B-Instruct
Meta 128K Online Yes chat
gemma-3-4b-it
gemma-3-4b-it
Google 131K Online Yes chat
mixtral-8x7b-instruct-v0-1
Mixtral-8x7B-Instruct-v0.1
Hugging Face 32K Check provider Yes chat
phi-3-5-mini-instruct
Phi-3.5-mini-instruct
Hugging Face 128K Check provider Yes chat
mistral-7b-instruct-v0-3
Mistral-7B-Instruct-v0.3
Hugging Face 32K Check provider Yes chat

Developer Tools

K Save API Key Never lose your API keys — save keys from all providers in one place. T Test API Key Test your API key and check quota.

Hugging Face FreeLLM Score free API access score

How we score →
44 /100
🔹 Niche Provider — Consider for easy signup
Generosity Free limits and access terms
65
Access Signup and key availability
75
Model Breadth Free model coverage
40
Reliability Status and stability signals
55
Compatibility SDK and endpoint support
20
Quality Model capability signals
10

What is Hugging Face?

Hugging Face Inference API — Qwen, Llama, Gemma at ~1,000 RPD.

Hugging Face provides free access to a rotating selection of open-weight models including Qwen, Llama, Gemma, and SmolLM. The free tier is rate-limited (~1,000 requests/day) and uses shared infrastructure, so latency varies. The live-tested router endpoint supports OpenAI-compatible Chat Completions and Responses.

  • Rotating selection of open models
  • ~1,000 RPD free tier
  • No credit card required
  • OpenAI-compatible router endpoint

API Compatibility: Live-tested OpenAI-compatible Chat Completions and Responses

Hugging Face Free Tier Limits & Pricing

Credit Card Not required
Phone Verification Not required
Free Tier 4 free models online
Context Range 32K – 131K
Total Models 7 listed
Rate Limits Credit-metered
API Compatibility Live-tested OpenAI-compatible Chat Completions and Responses

Hugging Face API Setup Tutorials

Hugging Face is fully compatible with popular AI coding assistants like Cursor, Claude Code, and more. To see step-by-step API configuration instructions for your favorite tool, please visit our Global Configuration Guide →

Hugging Face Model Use Cases

What Hugging Face's free models are best for, based on aggregated model capabilities:

Chat 7 models Coding 1 model

Hugging Face Limitations & Caveats

  • Cold starts common — first request may take 30s+
  • Models larger than 10GB may fail to load on free tier
  • No SLA — shared infrastructure, availability not guaranteed

Hugging Face FAQ

Why is my first Hugging Face API request so slow?

Free tier uses serverless inference with cold starts. The first request to a model loads it from disk, taking 30-60 seconds. Subsequent requests within ~15 minutes are fast. Use a keepalive ping to avoid cold starts.

Can I use the Hugging Face Inference API with OpenAI SDK?

Yes. The live-tested router endpoint at https://router.huggingface.co/v1 supports OpenAI-compatible Chat Completions and Responses for supported models. Some older Hugging Face inference endpoints still use Hugging Face-specific request formats.

Which models are actually free on Hugging Face?

Any model with the "Inference API" tag is available for free on the serverless tier. However, rate limits apply (~1,000 RPD) and larger models (>10GB) may not load. Popular free models include Qwen, Llama, Gemma, and SmolLM.