Skip to main content

Summarization Endpoint

Endpoint Overview

Endpoint:
POST /api/companies/{companyCuid}/orchestrators/{orchestratorCuid}/summarization

This endpoint allows you to synchronously generate a summary of a provided text, based on the selected summary type. The process is completed in a single request, and the summary is returned in the response.


Request Body

The request body must include the text to summarize and the desired summary type.

FieldDescriptionTypeRequiredExample
textThe content to summarize.StringYes"Mandela served 27 years in prison, split between Robben Island, Pollsmoor Prison..."
typeThe type of summary requested.StringYes"factual_summary"
external_refOptional external reference ID to track the request.StringNo"1234-abcd-56ef-7891"

Supported type values

  • factual_summary – Focuses on objective facts and events.
  • detailed_summary – Provides a richer, more nuanced overview.
  • technical_summary – Emphasizes technical or domain-specific details.

Example Request

{
"text": "Mandela served 27 years in prison, split between Robben Island, Pollsmoor Prison, and Victor Verster Prison...",
"type": "detailed_summary",
"external_ref": "1234-abcd-56ef-7891"
}

Response

The response includes the summary of the provided input in both Markdown and HTML format.

FieldDescriptionTypeExample
markdownSummary in Markdown formatString"**Nelson Mandela** served 27 years..."
htmlSummary in HTML formatString"<p>Nelson Mandela served 27 years...</p>"

Example Response

{
"markdown": "**Nelson Mandela** served 27 years in prison before his release in 1990...",
"html": "<p>Nelson Mandela served 27 years in prison before his release in 1990...</p>"
}

Optional Fields

external_ref (Optional)

Use this field to tag your requests with a custom identifier. This value will be returned alongside the result and can be used for tracking and correlation.