Skip to content

A FastAPI-powered AI summarization service using Gemini 2.5 Flash. Accepts both text and URL input, fetches web content when provided, and generates concise, context-aware summaries.

Aashish2k1S/SummarizerAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧠 Gemini Summarizer API

An intelligent text summarization API built with FastAPI and Gemini 2.5 Flash, capable of summarizing both plain text and web content.
Perfect for generating quick summaries, previews, or insights from large articles or pages.

🚀 Features

🔹 Summarizes raw text or directly from a URL
🔹 Uses Gemini 2.5 Flash for ultra-fast and high-quality responses
🔹 Clean REST API built with FastAPI
🔹 Simple, lightweight, and deployable anywhere

⚙️ Tech Stack

Component Technology
LLM Gemini 2.5 Flash
Framework FastAPI
Language Python
Optional BeautifulSoup (for URL scraping)

🧰 API Endpoints

POST /summarize

Request (Text)

{
  "text": "Artificial Intelligence is transforming industries..."
}

Request (URL)

{
  "text": "https://example.com/article-about-ai"
}

Response

{
  "summary": "AI is revolutionizing industries by enhancing automation and decision-making."
}

🧩 Setup & Run

1️⃣ Install dependencies

pip install -r /requirement.txt

2️⃣ Add your Gemini API key

Create a .env file in your root directory and add:

API_KEY=your_api_key_here

3️⃣ Run the server

uvicorn main:app --reload

Then open 👉 http://127.0.0.1:8000/docs

💡 Future Enhancements

🔹 Add summarization length control (short/medium/detailed)
🔹 Add batch URL support
🔹 Deploy to Render / Railway / HuggingFace Spaces

👨‍💻 Author

Aashish Gupta
AI & Software Developer
LinkedIn | GitHub

🌱 “The fastest way to learn AI is to build something that scares you a little.”

About

A FastAPI-powered AI summarization service using Gemini 2.5 Flash. Accepts both text and URL input, fetches web content when provided, and generates concise, context-aware summaries.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages