Hugging Face (Inference Providers)

● 24h Uptime 99.8% (Global Open Source Home)

Stops upon credit exhaustion · PRO tier $9/mo includes $2.00 monthly quota

💡 HIGHLIGHT

Official Inference Providers from the world's largest open-source AI community: free $0.10 monthly credits (~2M tokens) aggregating 14 inference clouds with zero card required.

⚡ Speed & Latency
350ms ~ 900ms
Intelligently routes across Groq, Cerebras, DeepInfra & 11 other inference clouds
🎁 Free Quota & Policy
Free $0.10 monthly credits for all users ($2.00 for PRO)
Zero credit card · Resets on 1st of month · ~2M tokens on Llama 8B
🛡️ Auth & Access Requirements
Create hf_ token in Settings -> Access Tokens
Native OpenAI SDK compatibility via router.huggingface.co
📊 Concurrency & Context
Shared provider concurrency · Free ZeroGPU compute hours
Exhaustion triggers HTTP 402/429 without auto-debit risk

🔌 OpenAI-Compatible Base URL

https://router.huggingface.co/v1

💡 Directly paste the address above as Base URL into any OpenAI-compatible client (NextChat, Cherry Studio, Immersive Translate, etc.).

📋 Featured Models:

Click Model ID to copy
70B旗舰 meta-llama/Llama-3.3-70B-Instruct
开源 70B 指令模型,支持 14 家推理商智能路由调度
超轻高性价比 meta-llama/Llama-3.1-8B-Instruct
$0.10 免费额度可跑约 200 万 Token
通义旗舰 Qwen/Qwen2.5-72B-Instruct
开源最强中文与多语言旗舰大模型
满血推理 deepseek-ai/DeepSeek-R1
满血 R1 深度推理,支持 Cerebras、Groq 等高速推理芯片

🎁 Free Tier Reality & Limits

免费账号每月自动发放 $0.10 额度(PRO 会员每月 $2.00);附带 Spaces ZeroGPU 每日免费算力
🔄 Reset Cycle 每月 1 日自动重置免费额度
🛡️ Overage Behavior 额度耗尽返回 HTTP 402 或 HTTP 429,纯预付机制,绝无自动扣费
📋 Access Requirements
✓ No Credit Card ✓ Email Only (No Card)

Hugging Face Inference Providers(推断提供商)是 Hugging Face 官方全新推出的统一模型推理网关。它摒弃了过去老版 Serverless 经常冷启动和排队的缺陷,深度聚合了 Groq、Cerebras、DeepInfra、Fireworks、Together、Novita、Sambanova 等全球 14 大高性能推理云服务商。

平台为所有注册用户每月免费提供 $0.10 美元的推理额度(每月 1 日自动重置),如果订阅 PRO 会员($9/月)则每月包含 $2.00 额度。由于聚合云中的 Llama 3.1 8B 等模型费率低至 $0.05/1M tokens,免费用户的 $0.10 额度足以跑完约 200 万 Tokens 的测试量!此外,HF Spaces 还为所有用户提供每日 ZeroGPU 免费算力(免费用户 5~60 分钟/天,PRO 用户 40~240 分钟/天),免绑卡零门槛享受。

⚠️ Worth Knowing & Gotchas

Unified Router Endpoint (router.huggingface.co)

Always use the recommended endpoint `https://router.huggingface.co/v1`, fully compatible with OpenAI SDK. The legacy `api-inference.huggingface.co` endpoint suffers from cold starts and lacks multi-provider dynamic routing.

Monthly $0.10 Free Credit Auto-Reset

Every registered user receives $0.10 in credits on the 1st of each month with no card required, supporting 200+ open-weight models (~2M tokens on Llama 8B), perfect for lightweight experiments.

Full CORS Wildcard (*) Support

OPTIONS preflight responses return `access-control-allow-origin: *`, enabling direct client-side web browser invocation without intermediate proxy servers.

Zero Card Gate & Overdraft Safety

Sign up with email only—no credit card or phone number required. Credit exhaustion responds with HTTP 402 or 429 without unexpected auto-billing.

Free ZeroGPU Daily Compute Bonus

Beyond API credits, HF Spaces grants 5 to 60 minutes/day of free ZeroGPU compute to test Gradio/Streamlit deep learning demos directly in browser.

🚀 30-Second Quick Setup Guide

01

Register Hugging Face Account

Visit huggingface.co and create a free account using only your email address.

Go to Console ↗
02

Generate Access Token

Navigate to Settings -> Access Tokens, click 'Create new token', and select 'Read' scope.

Go to Console ↗
03

Configure Client & Call Models

Set Base URL to https://router.huggingface.co/v1 with your hf_ token in any OpenAI-compatible client to access 200+ open-source models immediately!

💻 Quick Python OpenAI SDK Example

from openai import OpenAI

client = OpenAI(
    api_key="your_api_key_here",  # 填入申请的 Key
    base_url="https://router.huggingface.co/v1"
)

response = client.chat.completions.create(
    model="meta-llama/Llama-3.3-70B-Instruct",
    messages=[
        [object Object]
    ]
)

print(response.choices[0].message.content)

📖 Related In-Depth Tutorials & Strategies

Guides →
← Radar 🚀 Toolbox