How I Built a PDF Chat API in One Day with FastAPI, Gemini, and Qdrant A developer built a PDF Chat API in a single day using FastAPI, Google Gemini, Qdrant, and LangChain, enabling users to upload PDFs and ask natural-language questions answered through a retrieval-augmented generation pipeline. The system extracts and chunks PDF text, generates embeddings with Gemini's gemini-embedding-001 model, stores them in Qdrant for semantic search, and returns answers via gemini-2.5-flash. The developer noted that Gemini embeddings produce 3072-dimensional vectors and shared the project as a side build with plans for multi-user support and Docker deployment. Have you ever wanted to just talk to a PDF instead of reading through 50 pages? I built a full PDF Chat API in one day — upload any PDF, ask questions in natural language, and get AI-powered answers. Here's how I did it. What it does - Upload any PDF document - Ask questions about its content in natural language - Get accurate answers powered by RAG Retrieval Augmented Generation - Clean web UI included — no frontend framework needed - REST API with authentication for easy integration Tech Stack - FastAPI — REST API backend - Google Gemini — embeddings gemini-embedding-001 + chat gemini-2.5-flash - Qdrant — vector database for semantic search - LangChain — RAG pipeline orchestration - Pure HTML/CSS — no React, no framework How it works The architecture is classic RAG in two phases: Ingestion upload : 1. Extract text from PDF 2. Split into chunks 1000 chars, 200 overlap 3. Generate embeddings with Gemini 4. Store in Qdrant Query chat : 1. Embed the user's question 2. Search Qdrant for the 4 most relevant chunks 3. Send chunks + question to Gemini 4. Return the answer The code The core is surprisingly simple: That's the entire RAG chain — retrieve relevant context, inject into prompt, generate answer. What I learned - Gemini embeddings produce 3072-dimensional vectors not 768 like older models - grpcio on Windows can be a pain — pin to version 1.62.2 - Qdrant Cloud free tier is genuinely useful for side projects - Building a clean UI in pure HTML/CSS takes less time than setting up React Try it yourself 👉 https://elyassdigital.gumroad.com/l/zcgjmmz https://elyassdigital.gumroad.com/l/zcgjmmz What's next - Multi-user support with separate collections per user - Docker deployment guide - Support for other document types Word, Excel Built this as a side project — happy to answer questions in the comments