AI & ML
Bearer Token
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.
Base URL
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 |
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"}'
Connect Hugging Face to AI
Deploy a Hugging Face MCP server on IOX Cloud and connect it to Claude, ChatGPT, Cursor, or any AI client. Your AI assistant gets direct access to Hugging Face through these tools:
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
Deploy in 60 seconds
Describe what you need, AI generates the code, and IOX deploys it globally.
Deploy Hugging Face MCP Server →