HuggingFace

Ongoing verified 2026-07-30 · 0d ago no cardOpenAI-compatible

Router access to many open-weight providers under one key

What's free

Free CPU Basic + ZeroGPU for Spaces; Inference Providers has a monthly credit ($0.10/mo on Free plan, $2.00/mo on PRO/Team/Enterprise)

Rate limits

No RPM/TPM published, only credit amounts

The catch

Credits only apply with "Routed by Hugging Face" billing, not with a Custom Provider Key

TypeOngoing free tier
Free typerecurring-credit
Expiresno expiry
Modalitiestext, image, audio, embeddings
OpenAI base URLhttps://router.huggingface.co/v1

Quickstart — chat completions

from openai import OpenAI

client = OpenAI(base_url="https://router.huggingface.co/v1", api_key="<YOUR_FREE_API_KEY>")
resp = client.chat.completions.create(
    model="<a-free-model>",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(resp.choices[0].message.content)

…or with curl:

curl https://router.huggingface.co/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"<a-free-model>","messages":[{"role":"user","content":"Hello!"}]}'

Appears in

← All providers