<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/building-an-ai-powered-chrome-extension-with-fastapi-and-google-s-gemini-api-u707qqrcc" -->

---
title: Building an AI-Powered Chrome Extension with FastAPI and...
description: A walkthrough of building a Chrome extension that extracts LeetCode problems from the DOM and sends them to a FastAPI backend, which uses Google&#x27;s Gemini API...
canonical: https://daily.dev/posts/building-an-ai-powered-chrome-extension-with-fastapi-and-google-s-gemini-api-u707qqrcc
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Building an AI-Powered Chrome Extension with FastAPI and Google’s Gemini API | daily.dev
og:description: A walkthrough of building a Chrome extension that extracts LeetCode problems from the DOM and sends them to a FastAPI backend, which uses Google&#x27;s Gemini API...
og:url: https://daily.dev/posts/building-an-ai-powered-chrome-extension-with-fastapi-and-google-s-gemini-api-u707qqrcc
og:image: https://api.daily.dev/og/posts/U707qQrcc.png
og:image:alt: Building an AI-Powered Chrome Extension with FastAPI and Google’s Gemini API
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Building an AI-Powered Chrome Extension with FastAPI and Google’s Gemini API

**[Medium](https://daily.dev/sources/medium_js)** · 10 min read · 0 upvotes · 0 comments

## Summary

A walkthrough of building a Chrome extension that extracts LeetCode problems from the DOM and sends them to a FastAPI backend, which uses Google's Gemini API to generate solutions with complexity analysis. Key architectural highlights include a provider-agnostic BaseSolver abstraction (making it easy to swap in OpenAI, Claude, or Ollama), a MockSolver for offline development, defensive JSON parsing to handle LLM output inconsistencies, and a layered DOM fallback strategy for reliable content extraction. The post also touches on how the project inadvertently demonstrates the weakness of unproctored coding assessments.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://medium.com/@abhirambency2004/building-an-ai-powered-chrome-extension-with-fastapi-and-googles-gemini-api-466dbb5a31bb>

## Similar posts on daily.dev

- [Building an AI-Powered Chrome Extension That Solves LeetCode with Gemini \(Manifest V3\)](https://daily.dev/posts/building-an-ai-powered-chrome-extension-that-solves-leetcode-with-gemini-manifest-v3--u6odbkeze) · Medium · 0 upvotes · 0 comments
- [Winners of the Built-in AI Challenge 2025](https://daily.dev/posts/winners-of-the-built-in-ai-challenge-2025-y3zlunvoh) · Chrome Developers · 0 upvotes · 0 comments

---

Tags: [#python](https://daily.dev/tags/python), [#devtools](https://daily.dev/tags/devtools), [#google-gemini](https://daily.dev/tags/google-gemini), [#fastapi](https://daily.dev/tags/fastapi)

[View this post on daily.dev](https://daily.dev/posts/building-an-ai-powered-chrome-extension-with-fastapi-and-google-s-gemini-api-u707qqrcc)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Building an AI-Powered Chrome Extension with FastAPI and Google’s Gemini API","url":"https://daily.dev/posts/building-an-ai-powered-chrome-extension-with-fastapi-and-google-s-gemini-api-u707qqrcc","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/building-an-ai-powered-chrome-extension-with-fastapi-and-google-s-gemini-api-u707qqrcc"},"datePublished":"2026-07-17T16:04:03.935Z","dateModified":"2026-07-17T16:05:12.553Z","description":"A walkthrough of building a Chrome extension that extracts LeetCode problems from the DOM and sends them to a FastAPI backend, which uses Google's Gemini API...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/c35f170f43b5cf939c177259fcc0e874?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/c35f170f43b5cf939c177259fcc0e874?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Medium","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Medium","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/medium","url":"https://daily.dev/sources/medium_js"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/building-an-ai-powered-chrome-extension-with-fastapi-and-google-s-gemini-api-u707qqrcc","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"python,devtools,google-gemini,fastapi","timeRequired":"PT10M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Medium","item":"https://daily.dev/sources/medium_js"},{"@type":"ListItem","position":3,"name":"Building an AI-Powered Chrome Extension with FastAPI and Google’s Gemini API"}]}
```

