Home / API docs / Summarize Text API
Web Content

Summarize Text API

POST /api/summarize-text $0.01 per call USDC on Base · x402

AI TEXT SUMMARIZATION — POST {text} up to 16,000 chars and get an abstractive summary that keeps every load-bearing fact, number, and decision. {style}: paragraph (default), bullets, or tldr (one sentence); {max_words}: 10-300 (default 120); optional {focus} to steer it ('action items', 'financial figures'). Built for messy transcripts, threads, logs, and notes. Summarizing a URL instead? GET /api/summarize ($0.002) is the extractive no-AI version.

Parameters

NameInDescription
textbodyrequiredThe text to summarize, up to 16,000 characters
stylebodyparagraph (default), bullets, or tldr
max_wordsbodysummary length cap, 10-300 (default 120)
focusbodyOptional steer: what the summary should emphasize

Example request

curl -X POST "https://api.webbersites.com/api/summarize-text" \
  -H "Content-Type: application/json" \
  -d '{"text":"\u2026a long meeting transcript\u2026","style":"bullets","focus":"action items"}'
# first call returns 402 + payment requirements; an x402 client pays and retries automatically

Example response

{
    "summary": "- Ship the pricing page Friday (owner: Dana)\n- Renew the TLS cert before 8/1\n- Postpone the mobile app to Q4",
    "style": "bullets",
    "input_chars": 9214,
    "model": "gemini-2.5-flash-lite"
}
MCP tool: post_summarize_text — via npx -y webbersites-x402-mcp (local, key stays on your machine) or the remote endpoint https://api.webbersites.com/mcp.

How payment works

There is no signup and no API key. Call the endpoint; it replies 402 Payment Required with machine-readable payment requirements. Your client signs a USDC transfer authorization (EIP-3009, gasless) and retries with the X-PAYMENT header — @x402/fetch does this automatically. See the overview for a working snippet.