1. Page Eligibility Check

First, we verify that the current URL actually contains readable content worth summarizing.

This prevents wasted API calls on empty or non-article pages.

Screenshot 2025-04-24 025518.png

2. Build the Gemini Request

Second, define the endpoint URL to allow us can make a HTTP call, then create JSON payload in the format Gemini expects.

image.png

3. Call the Gemini API

Third, we send an HTTP POST with our payload and headers.

image.png