Hugging Face REST API
Open-source AI models and ML infrastructure platform
Hugging Face provides a comprehensive platform for machine learning with access to thousands of pre-trained models, datasets, and inference APIs. Developers use it to deploy state-of-the-art NLP, computer vision, and audio models through a unified REST API. The platform supports model hosting, versioning, and serverless inference for production AI applications.
https://api-inference.huggingface.co
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /models/{model_id} | Run inference on any model from the Hugging Face Hub |
| GET | /models/{model_id} | Get model metadata, architecture, and configuration details |
| POST | /models/{model_id}/pipeline | Execute a specific pipeline task (text-generation, summarization, etc.) |
| GET | /api/models | List and search available models with filters |
| GET | /api/datasets | Browse and search available datasets |
| GET | /api/datasets/{dataset_id} | Get dataset information, splits, and download links |
| POST | /models/{model_id}/embeddings | Generate text embeddings using sentence transformers |
| POST | /models/{model_id}/feature-extraction | Extract features from text, images, or audio inputs |
| POST | /models/{model_id}/text-classification | Classify text into predefined categories |
| POST | /models/{model_id}/token-classification | Perform named entity recognition or part-of-speech tagging |
| POST | /models/{model_id}/question-answering | Answer questions based on provided context |
| POST | /models/{model_id}/image-classification | Classify images using computer vision models |
| POST | /models/{model_id}/automatic-speech-recognition | Transcribe audio to text using speech recognition models |
| GET | /api/repos/{repo_id} | Get repository information including files and commits |
| POST | /models/{model_id}/conversational | Run multi-turn conversational AI with context retention |
Sponsor this page
AvailableReach developers actively building with Hugging Face. See live pageview data and self-serve checkout — your slot goes live in minutes.
View inventory & pricing →Code Examples
curl https://api-inference.huggingface.co/models/gpt2 \
-X POST \
-H "Authorization: Bearer hf_xxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"inputs": "The future of AI is"}'
Use Hugging Face from Claude / Cursor / ChatGPT
Get a hosted MCP endpoint for Hugging Face. Paste your Hugging Face API key, copy back one URL, drop it into Claude Desktop, Cursor, or any AI client that supports remote MCP. Your AI calls Hugging Face directly with your credentials — no local install, works on mobile.
search_models
Search and filter Hugging Face models by task, language, framework, or tags to find the right model for specific use cases
run_inference
Execute inference on any Hugging Face model with automatic task detection and parameter optimization
generate_embeddings
Generate vector embeddings for text using sentence transformers for semantic search and similarity tasks
compare_models
Compare multiple models side-by-side based on performance metrics, parameters, and use case suitability
dataset_explorer
Browse and analyze Hugging Face datasets with automatic schema detection and sample previews
Connect in 60 seconds
Paste your Hugging Face key → get an MCP URL → paste into Claude/Cursor. Hosted by IOX, encrypted at rest.
Connect Hugging Face to your AI →