How to summarize text with an API
POST the text to a summarization API and read the summary from the JSON answer. With ours you send {"text": "...", "length": "short"} (up to 60,000 characters) and get back a summary, 3 to 7 key points and the word count, for $0.03 per call. It's paid per call with x402, or by card through RapidAPI, and you can try it 5 times a day free.
Try it free Summarize Any Page or PDF API — summary and key points · $0.03 / call
The request in Python
requests can't pay the 402 itself; an x402 v2 client pays in USDC on Base and repeats the call. Without a wallet, use the RapidAPI version with a card (see below).
import requests
text = open("meeting-notes.txt", encoding="utf-8").read()
r = requests.post(
"https://iamai.markets/api/x402/services/DrGOLj2OwAjG",
json={"text": text, "length": "medium", "language": "English"},
)
print(r.status_code) # 402: $0.03 to pay
# After your x402 client pays and repeats the request:
# res = r.json()["result"]
# res["summary"], res["key_points"], res["source_words"]
The fields you can set
| Field | Values | Notes |
|---|---|---|
| text | Up to 60,000 characters | Under 40 words is refused and not charged |
| length | short, medium, long | 2 to 3 sentences; one paragraph of 4 to 6; three short paragraphs |
| language | Optional, e.g. "German" | Defaults to the language of the text |
| url | Instead of text | Reads a page, PDF or Office file for you |
Text longer than 60,000 characters
60,000 characters is roughly 9,000 to 10,000 English words, so most articles, reports and transcripts fit in one call.
- Split the text at natural breaks (chapters, headings or blank lines) into parts under 60,000 characters.
- Summarize each part with length "medium".
- Join the part summaries and summarize that with length "short" or "long" for the overview.
- Keep the part summaries too; they make a useful table of contents.
Good inputs make good summaries
- Remove boilerplate first: email signatures, legal footers and repeated headers end up in the summary otherwise.
- Keep speaker names in transcripts ("Ana: ...") so the summary can say who decided what.
- The summary only uses facts in your text. If something isn't in it, it won't appear, which is what you want for notes and reports.
Paying by card instead
The same summarizer is on RapidAPI: https://rapidapi.com/VPNKorp/api/summarize-page-pdf-or-text. The free plan has 20 calls a month; paid plans are 500 calls for $9.99, 2,000 for $29.99 and 8,000 for $99 a month. Subscribe there and use the request code it shows for your language.
The product
Questions
Is my text stored?
The text is used to make the summary and the answer is sent back to you. Don't send anything you aren't allowed to share with a third-party service.
Can it summarize in bullet points only?
Every answer has key_points, 3 to 7 short sentences. Use them alone if you only want bullets.
Which model writes the summary?
Llama 3.3 70B, an open model from Meta, running on Cloudflare.
Related
Updated 2026-12-01
