Hugging Face Inference Providers free tier
The long tail: when you need THAT one specific model, it's probably hosted here.
| Free tier type | Free credits |
|---|---|
| What you get free | Free accounts get a small monthly included-credit allowance across providers; PRO raises it. |
| Credit card | No card required |
| Signup | Free account + token — huggingface.co |
| API endpoint | https://router.huggingface.co/v1 (OpenAI-compatible) |
| Top free models | Thousands of community modelsRouted to multiple inference backends |
Copy-paste setup
Two things: the base URL above, and a free key from the provider's site. Pick your tool:
export OPENAI_BASE_URL="https://router.huggingface.co/v1" export OPENAI_API_KEY="your-key-here" # then pick one of the provider's models in your tool
Settings → Models → paste your key under the matching provider, or use 'Override OpenAI Base URL' with: https://router.huggingface.co/v1
# ~/.codex/config.toml model_provider = "custom" [model_providers.custom] base_url = "https://router.huggingface.co/v1" env_key = "OPENAI_API_KEY"
Claude Code natively speaks the Anthropic API. To use the providers on this page, point it at a router/gateway (e.g. an OpenAI-to-Anthropic proxy) configured with: https://router.huggingface.co/v1
Choose 'OpenAI Compatible' as the provider, then paste: Base URL: https://router.huggingface.co/v1 API key: your key Model: one of the models listed on this page
More free AI APIs like this
Hugging Face Inference Providers — FAQ
Is Hugging Face Inference Providers really free?
Hugging Face Inference Providers is listed in our index as: Free credits. Free accounts get a small monthly included-credit allowance across providers; PRO raises it. We last probed its API endpoint on 2026-08-19. Always confirm current limits on the provider's own pricing page.
Does Hugging Face Inference Providers need a credit card?
No card required. Signup: Free account + token.
How do I use Hugging Face Inference Providers in my coding tool?
Hugging Face Inference Providers exposes an OpenAI-compatible endpoint (https://router.huggingface.co/v1). Paste that base URL plus your key into Cursor, Codex CLI, a Claude Code router, or any OpenAI-compatible tool — the snippets on this page are copy-paste ready.
Free APIs build the prototype.
Who's recommending your business?
AI assistants answer millions of “who should I hire” questions a day. Run the free scan and see what they say about you — in 60 seconds.
Get My Free AI Visibility Scan