# 🧠 Unified Embedding API > 🧩 Unified API for all your Embedding & Sparse needs β€” plug and play with any model from Hugging Face or your own fine-tuned versions. This official repository from huggingface space --- ## πŸš€ Overview **Unified Embedding API** is a modular and open-source **RAG-ready API** built for developers who want a simple, unified way to access **dense**, and **sparse** models. It’s designed for **vector search**, **semantic retrieval**, and **AI-powered pipelines** β€” all controlled from a single `config.yaml` file. ⚠️ **Note:** This is a development API. For production deployment, host it on cloud platforms such as **Hugging Face TGI**, **AWS**, or **GCP**. --- ## 🧩 Features - 🧠 **Unified Interface** β€” One API to handle dense, sparse, and reranking models. - βš™οΈ **Configurable** β€” Switch models instantly via `config.yaml`. - πŸ” **Vector DB Ready** β€” Easily integrates with FAISS, Chroma, Qdrant, Milvus, etc. - πŸ“ˆ **RAG Support** β€” Perfect base for Retrieval-Augmented Generation systems. - ⚑ **Fast & Lightweight** β€” Powered by FastAPI and optimized with async processing. - 🧰 **Extendable** β€” Add your own models or pipelines effortlessly. --- ## πŸ“ Project Structure ``` unified-embedding-api/ β”‚ β”œβ”€β”€ core/ β”‚ β”œβ”€β”€ embedding.py β”‚ └── model_manager.py β”œβ”€β”€ models/ | └──model.py β”œβ”€β”€ app.py # Entry point (FastAPI server) |── config.yaml # Model + system configuration β”œβ”€β”€ Dockerfile β”œβ”€β”€ requirements.txt └── README.md ``` --- ## ☁️ How to Deploy (Free πŸš€) Deploy your **custom Embedding API** on **Hugging Face Spaces** β€” free, fast, and serverless. ### πŸ”§ Steps: 1. **Clone this Space Template:** πŸ‘‰ [Hugging Face Space β€” fahmiaziz/api-embedding](https://huggingface.co/spaces/fahmiaziz/api-embedding) 2. **Edit `config.yaml`** to set your own model names and backend preferences. 3. **Push your code** β€” Spaces will automatically rebuild and host your API. That’s it! You now have a live embedding API endpoint powered by your models. πŸ“˜ **Tutorial Reference:** [Deploy Applications on Hugging Face Spaces (Official Guide)](https://huggingface.co/blog/HemanthSai7/deploy-applications-on-huggingface-spaces) --- ## πŸ§‘β€πŸ’» Contributing Contributions are welcome! Please open an issue or submit a pull request to discuss changes. --- ## ⚠️ License MIT License Β© 2025 Developed with ❀️ by the Open-Source Community. --- > ✨ β€œUnify your embeddings. Simplify your AI stack.”