About this endpoint
What it does
Uploads a document and returns a generated text summary for that file. The request body includes the file to summarize and optional settings for summary length and output language.
Request Body
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| file | String | Yes | The document to summarize. Accepted formats: .pdf, .docx, .doc, or .odt. |
| summary_length | ENUM | No | Target summary length. Allowed values: short (default, ~20 words), medium (~60 words), long (~100 words). |
| output_language | String | No | BCP-47 language code for the output. Defaults to English. |
Response
Returns a JSON object with a data object field. The data object contains a summary string with the generated document summary.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| data | Object | Yes | Wrapper object for the response payload. |
| data.summary | String | No | The generated summary text. |