Sébastien LOPEZ

Live demo: build a Chrome extension that summarizes any page for $0.01 per click

by

One of the use cases I built TextAI API for: a Chrome extension that summarizes any web page with one click, paying $0.01 per summary in USDC.

Here's the core logic in ~20 lines:

const API_KEY = "your-key"; // get free at textai-api.overtek.deno.net/keys/create

async function summarizePage() {

const text = document.body.innerText.slice(0, 3000);

const resp = await fetch("https://textai-api.overtek.deno....", {

method: "POST",

headers: { "Authorization": "Bearer " + API_KEY, "Content-Type": "application/json" },

body: JSON.stringify({ text })

});

const { summary } = await resp.json();

return summary;

}

Cost: 10 credits per call = $0.01. New keys get 100 free credits (10 free summaries).

What would you build on top of TextAI API? Drop your idea — best one gets a free 10 USDC credit top-up.

2 views

Add a comment

Replies

Be the first to comment