
Tool Hugging Face
Hugging Face Inference Providers
One Hugging Face token to call open models served by partner providers, with automatic failover and no markup.
What it is
Inference Providers is Hugging Face's serverless API that routes requests for open models to partner providers such as Cerebras, Groq, Together AI, Replicate, fal and others. It covers chat, image and video generation, embeddings, speech recognition and classic NLP tasks, with an OpenAI-compatible endpoint for chat. Billing is pay-as-you-go at provider rates; PRO, Team and Enterprise accounts get monthly included credits.
What it's useful for
Calling many open models from one SDK and one token, or switching providers for the same model by price or speed without changing code.
Key features
- Routing across partner providers with automatic failover
- OpenAI-compatible chat endpoint at https://router.huggingface.co/v1
- Provider policy suffixes such as :fastest and :cheapest
- Python (huggingface_hub) and JavaScript (@huggingface/inference) clients
- Text, image, video, embeddings and speech tasks
- Provider rates passed through without markup
How to use it
Before you start
- Hugging Face account and fine-grained token with Inference Providers permission
pip install huggingface_hubnpm install @huggingface/inferenceCommands are copied from the official documentation. Check the docs for the latest version before running them.
Limitations to know
- Free accounts get no included credits and must purchase credits
- The OpenAI-compatible endpoint supports chat completion only; other tasks need the Hugging Face clients
Alternatives
Inference platform for open models with serverless per-token pricing, on-demand GPU deployments and fine-tuning.
One API endpoint and key for hundreds of models from many providers, with automatic provider fallback.
Cloud for running open models via serverless or dedicated endpoints, plus fine-tuning and GPU clusters.
Cerebras' cloud API for very fast inference on open-weight models, with an OpenAI-compatible endpoint and per-token pricing.
MCP servers for this
Hugging Face's hosted MCP server that lets agents search models, datasets, Spaces and papers and call Gradio Spaces.
CreateWithAI Hub's own MCP server: tell your AI what you're building and it finds the tools, MCP servers and skills for the job.
Browserbase's hosted MCP server that lets agents drive cloud browsers with natural-language Stagehand actions.
Skills for this
Anthropic skill for generative art in p5.js with seeded randomness and an interactive viewer for exploring parameters.
Hugging Face's Agent Skills for the Hub CLI, datasets, model training, evaluation, Spaces and SageMaker deployment.
Related resources
Alibaba Cloud's Qwen model family, with many open-weight models and an OpenAI-compatible API.
DeepSeek's MIT-licensed open-weight reasoning and chat models, also served through an OpenAI- and Anthropic-compatible API.
OpenAI's proprietary GPT model family, with frontier, efficient, image and speech variants served through the OpenAI API.
Google's multimodal model family covering reasoning, image generation, speech, video and embeddings.