Back to all APIs

Hugging Face

inference

“Get API key” opens Hugging Face’s console where you can sign in, claim free credits, and generate your key. “Documentation” shows how to set it up and call the API.

Access thousands of open-source models via a single OpenAI-compatible API. Free with a Hugging Face token.

Free with HF token, rate-limited

Models

meta-llama/Meta-Llama-3-8B-Instructmistralai/Mistral-7B-Instruct-v0.3Qwen/Qwen2.5-72B-Instruct

Details

Auth: api_key
Uptime: 100% uptime · 7d
Avg latency: 55ms
Checked: 2h ago
Pricing: Pay-as-you-go, varies by model
Rate limit: Free with HF token, rate-limited
Free credits: Free tier with monthly credits
SDKs: pythonjavascript
Regions: useu
Tags: multi-model, open-source

Code snippets

49ms avg
from huggingface_hub import InferenceClient

client = InferenceClient(api_key="YOUR_HF_TOKEN")
res = client.chat.completions.create(
    model="meta-llama/Meta-Llama-3-8B-Instruct",
    messages=[{"role": "user", "content": "Hello"}],
    max_tokens=500
)
print(res.choices[0].message.content)

Status history (7 days)

06-10
06-11
06-12
06-13
06-14
06-15
06-21