Start on the model page
Open a model repo, read the Model Card, and use the inference widget on the right. Widgets appear when at least one Inference Provider hosts the model.
Use the Inference Playground for chat models
Compare chat completion models with the same prompt, adjust temperature and max_tokens, and pick a model before wiring it into your app.
Authenticate API calls properly
Generate a fine-grained Hugging Face token with Inference Providers permission. Pass it as Bearer hf_**** in headers or via HF_TOKEN in SDKs.
Choose the right API surface
Chat tasks: OpenAI-compatible router.huggingface.co/v1 or InferenceClient.chat.completions. Other tasks (image, speech, embeddings): InferenceClient task methods.
Route providers intentionally
Append :fastest, :cheapest, :preferred, or a named provider (e.g. :groq) to the model id. Default routing picks the fastest available provider.
Separate Hub seats from inference spend
Free, PRO, Team, and Enterprise cover Hub features and collaboration. Inference Providers and Endpoints bill separately as pay-as-you-go or dedicated hosting.
Load datasets efficiently
Use the datasets library with load_dataset. Enable streaming for large files. Preview rows in Data Studio before downloading.
Document models you publish
Upload a Model Card with task, training summary, evaluation, limitations, and license. Gated models require user acceptance before access.
Explore Spaces for quick demos
Gradio and Streamlit Spaces run in the browser. ZeroGPU adds on-demand NVIDIA GPUs for eligible demos.
Use structured chat messages
Set a system message for output format and constraints. Keep user messages focused on the task and source material.
Enable streaming for long replies
Set stream=True in chat completion calls to receive incremental tokens—useful for responsive UIs and early cancellation.
Check licenses before production
Model and dataset licenses vary (open, research-only, commercial restrictions). Confirm terms in the card before shipping.
Copy snippets from the widget
View Code Snippets on the model page generates Python or JavaScript that matches the widget endpoint—reduces integration errors.
Request provider support when needed
If a model has no widget, click Ask for provider support on the model page. Providers choose which models to host.
Know when to use Endpoints
Inference Endpoints provide dedicated, always-on deployment with autoscaling. Inference Providers are serverless and pay-per-call.