Summary
Condense long reports and multi-page documents into focused summaries using 8 executive presets.
document.summarize accepts a PDF, DOCX, or PPTX file and synthesizes the core takeaways, risks, or action items into concise summary pages. Pricing is 30 credits per requested page.
Request Schema
uploadIdstringrequiredUpload ID from POST /v1/uploads. The file must be a PDF, DOCX or PPTX.
summaryLanguagestringrequiredLanguage to write the summary in, by name or code. Uses the same language list as Translation. targetLanguage is accepted as an alias.
requestedSummaryPagesintegeroptionaldefault: 1Length of the summary in pages, 1 to 20. Also accepted as summaryPages.
focusstringoptionalPreset that shapes the summary. One of the keys in Focus Presets below; hyphens are accepted (executive-summary). Leave out for a general summary.
webhookUrlstringoptionalTop-level field, next to operation and input. HTTPS URL that receives a signed POST when the job starts running, succeeds or fails. Private and internal hosts are rejected; up to 2048 characters.
Focus Presets
| Focus Preset | Key | Best For |
|---|---|---|
| Abridged | abridged | Condensing narrative flow while retaining core arguments |
| Executive Summary | executive_summary | Strategic briefing for C-suite and leadership |
| Key Takeaways | key_takeaways | High-signal bullet list of essential insights |
| Action Items | action_items | Deliverables, ownership, and milestones |
| Legal Risk Review | legal_risk_review | Liabilities, warranties, indemnities, and risks |
| Academic Synopsis | academic_synopsis | Methodology, findings, citations, and scholarly critique |
| Investor Brief | investor_brief | Commercial traction, financial metrics, and market signals |
| Compliance Obligations | compliance_obligations | Regulatory mandates, deadlines, and controls |
Code Example
curl -X POST https://api.transpera.io/v1/jobs \
-H "authorization: Bearer tp_test_..." \
-H "content-type: application/json" \
-H "idempotency-key: $(uuidgen)" \
-d '{
"operation": "document.summarize",
"input": {
"uploadId": "UPLOAD_ID",
"summaryLanguage": "English",
"requestedSummaryPages": 1,
"focus": "executive_summary"
}
}'Response
POST /v1/jobs answers 201 Created with the new job. status moves from queued to running to succeeded or failed; poll GET /v1/jobs/{id} or use webhookUrl. If the job could not be handed to the worker, it comes back already failed with errorCode enqueue_failed and nothing is charged.
{
"job": {
"id": "8f1c2d3e-4b5a-6789-abcd-ef0123456789",
"operation": "document.summarize",
"status": "queued",
"createdAt": "2026-11-20T09:30:00.000Z",
"errorCode": null,
"chargedCredits": null
}
}Result
When status is succeeded, result is the summary itself, not a file: text is the whole summary as plain text, and pages splits it into the requested pages, each with pageNumber, title (may be null), content and wordCount. Pricing is 30 credits per requested page, charged on success.
{
"job": {
"id": "8f1c2d3e-4b5a-6789-abcd-ef0123456789",
"operation": "document.summarize",
"status": "succeeded",
"createdAt": "2026-11-20T09:30:00.000Z",
"errorCode": null,
"chargedCredits": 30,
"result": {
"type": "summary",
"text": "Executive summary
Revenue grew 18% year on year...",
"pages": [
{
"pageNumber": 1,
"title": "Executive summary",
"content": "Revenue grew 18% year on year...",
"wordCount": 412
}
]
}
}
}Errors
| HTTP | Code | When |
|---|---|---|
| 400 | invalid_input | Missing uploadId or summaryLanguage, an unknown language, requestedSummaryPages outside 1 to 20, an unknown focus, an upload that isn't PDF, DOCX or PPTX, or a non-HTTPS webhookUrl. |
| 402 | insufficient_credits | The wallet can't cover the estimate, or a test key's estimate is above its spend cap. |
| 409 | conflict | The Idempotency-Key was already used with a different input. |