Summarize
Summarize
Summarize
Produce an abstractive summary of a block of text.
POST
Summarize
Overview
The/summarization/abstractive endpoint condenses text in the model’s own words without adding new information or commentary. Unlike extractive summarization, the output is a fluent rewrite - not a selection of lifted sentences.
Request
string
The input text to summarize. Can be an article, document, transcript, or any plain text string. Either
text or document must be provided. If both are given, the OCR text is appended after text.string
A base64-encoded file to summarize. Supported formats: JPEG, PNG, TIFF, single-page PDF, multi-page PDF. The file is processed via AWS Textract OCR and the extracted text is used as input. Either
text or document must be provided.string
MIME type of the document (e.g.
"image/jpeg", "application/pdf"). Required when document is provided.string
Optional additional rules for the summary. These are appended to the base instructions - they extend, not replace, the default behaviour (no new information, no commentary).Examples:
"Use bullet points.""Focus on financial figures only.""Write in Spanish.""Limit to 3 sentences."
number
default:2048
Maximum number of tokens in the generated summary.
Response
string
The generated summary text.
number
Character count of the input text.
number
Character count of the generated summary.
number
End-to-end request latency in milliseconds.
string | null
The raw text extracted from the document via OCR.
null if no document was provided.Error responses
Authentication
Include your API key in every request using thex-api-key header.
Examples
Basic summary
With instructions
Useinstructions to control format, language, focus area, or length.
Summarizing a document
Pass a base64-encoded image or PDF in thedocument field. The OCR text is extracted automatically and summarized. The raw OCR output is returned as ocr_text.
Notes
- The base instructions (no new information, no commentary) are always applied. The
instructionsfield adds on top of them - it does not replace them. - Temperature, top-p, and other sampling parameters are fixed and not configurable via the API.
Authorizations
Body
application/json