{
  "id": 6726855,
  "title": "How I Built a PDF Chat API in One Day with FastAPI, Gemini, and Qdrant",
  "url": "https://urgent.news/2026/09/11/how-i-built-a-pdf-chat-api-in-one-day-with-fastapi-gemini-and-qdrant",
  "topic": "ai",
  "section": "AI",
  "published": "2026-09-11T08:07:01.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/elyass_43b15fee1a28f165db/how-i-built-a-pdf-chat-api-in-one-day-with-fastapi-gemini-and-qdrant-1j94"
  },
  "original_language": "en",
  "account": "In a single day, a developer managed to create a PDF Chat API using FastAPI, Google Gemini, and Qdrant. This innovative tool allows users to upload any PDF document and ask questions about its content in natural language, receiving accurate answers powered by Retrieval Augmented Generation (RAG). The web interface is clean and requires no frontend framework, while the REST API includes authentication for seamless integration.\n\nThe development process involved two main RAG phases. First, the PDF is uploaded and text is extracted, then split into chunks of 1000 characters with a 200-character overlap. Embeddings are generated using Google Gemini and stored in Qdrant. During the query phase, the user's question is embedded and searched against the 4 most relevant chunks stored in Qdrant. These chunks, along with the original question, are sent to Gemini to generate the final answer.\n\nThe core of the RAG chain is quite simple, chaining together the vector store retriever, a passthrough for the question, and the Gemini language model. A prompt is then applied to the model before parsing the response into a clean output.\n\nSome lessons learned from this project include the fact that Gemini embeddings produce 3072-dimensional vectors, grpcio on Windows may require careful version pinning, the Qdrant Cloud free tier can be beneficial for side projects, and building a clean UI in pure HTML/CSS can save time compared to setting up a React framework. The developer also shared that trying out the packaged version of the API is as simple as visiting a Gumroad link. Future plans for the project include adding multi-user support, a Docker deployment guide, and expanding support to other document types like Word and Excel.",
  "summary": "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…",
  "key_points": [],
  "editors_take": "This development showcases the potential for rapid creation of innovative, AI-powered tools that can transform user interaction with documents, and highlights the benefits of leveraging existing frameworks and services.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}