Skip to main content
The summarization endpoint allows you to condense long texts into concise summaries. It also includes an anonymization feature to protect sensitive information.

Supported Languages

  • English (eng)
  • Luganda (lug)

How it Works

The /tasks/summarise endpoint takes a text input and returns a summary. It automatically attempts to identify and anonymize personal identifiable information (PII) in the process.

Example Request

import requests

url = "https://api.sunbird.ai/tasks/summarise"
payload = {
    "text": "John Doe, who lives in Kampala, reported that the water supply was cut off yesterday at 2 PM. He called the utility company but got no response."
}
headers = {
    "Authorization": "Bearer <YOUR_TOKEN>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)
print(response.json())

Response

{
  "output": {
    "summary": "A resident of Kampala reported a water supply interruption yesterday afternoon and was unable to reach the utility company."
  }
}