Summarize Text API
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
| Name | In | Description | |
|---|---|---|---|
text | body | required | The text to summarize, up to 16,000 characters |
style | body | paragraph (default), bullets, or tldr | |
max_words | body | summary length cap, 10-300 (default 120) | |
focus | body | Optional 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 automaticallyExample 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"
}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.