Summarize text in a chosen style. $0.02 per request.
Send text of any length (up to 50,000 characters), get back a summary in your choice of style: brief, detailed, or bullet points, optionally capped at a word count.
| Method | POST |
|---|---|
| Path | /summarize |
| Content-Type | application/json |
| field | required | description |
|---|---|---|
text | yes | The text to summarize, max 50,000 characters |
style | no | "brief" (default), "detailed", or "bullets" |
max_words | no | Optional soft word limit, 5-2000 |
curl -X POST https://text-summarizer.pdfextractapi.workers.dev/summarize \
-H "Content-Type: application/json" \
-d '{"text": "...", "style": "bullets"}'
{ "summary": "- Point one\n- Point two", "style": "bullets", "word_count": 6 }
Errors return a non-200 status with { "error": { "code": "...", "message": "..." } }. Common codes: missing_text, text_too_large, invalid_style, invalid_max_words.
This endpoint is paid per-request via the x402 protocol (HTTP 402 + USDC). Unpaid requests receive a 402 response with payment instructions.