About this endpoint
What it does
Summarizes raw text provided in the JSON request body. Accepts input text, target summary length (short, medium, or long), and preferred output language, returning the generated text summary synchronously in the response.
Request Body
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| text | String | Yes | The text to summarize. |
| summary_length | String | Yes | The desired summary length. (short/medium/long) |
| output_language | String | Yes | ISO 639-1 two-letter language code for the summary output (e.g. en for English, es for Spanish, fr for French, de for German). Default: en. |
Response
Returns a JSON object with a data object field. The data object contains a summary string with the generated summary.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| data | Object | Yes | Wrapper object for the response payload. |
| data.summary | String | Yes | The generated summary text. |