About this endpoint
What it does
Generates a summary of the provided plain text and returns it in a JSON response. You send the source text in the request body, and the response contains a summary string.
Request Body
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| text | String | Yes | The text to summarize. |
| summary_length | ENUM | No | Target length of the summary. Allowed values: short (default, ~20 words), medium (~60 words), long (~100 words). |
| output_language | String | No | BCP-47 language code for the output text, for example en, fr, or de. Defaults to English. |
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 | No | The generated summary text. |