The Summarizer API allows you to automatically generate summaries of text content with customizable options for length and format.
POST https://www.summarizer.org/api/user/summarize
Authentication requires a valid API key. Include your API key in the request headers.
Authorization: Bearer YOUR_API_KEY
| Parameter | Type | Required | Description |
|---|---|---|---|
text |
string | Yes | The text content to be summarized. Must be at least 10 words long. Maximum word limit is 5000 words. |
mode |
integer | Yes | Summarization mode: 1 for standard (uses mini model), 2 for advanced (uses full model). |
percentage |
integer | No | Controls summary length on a scale of 1 to 6. Default is 4. See details below. |
type |
string | No | Optional parameter to specify the summary format. Options: summary_2, bullets, or best_line. If not provided, a default summary will be generated. |
The percentage parameter (1-6) controls how much of the original text will be retained in the summary. The higher the number, the longer the summary will be.
{
"mode": 1,
"text": "Your long text here...",
"percentage": 3,
"type": "summary_2"
}
The type parameter allows you to control the format of the summary output:
summary_2: Returns an alternative summary format in headings and pointsbullets: Returns the summary as bullet pointsbest_line: Returns the single most important line from the text
{
"result": "Summarized text content..."
}
{
"error": "Error message"
}
Or for authentication/subscription errors:
{
"type": "invalid_request",
"message": "you are not premium for this request"
}
Invalid API key in the request headers:
{
"type": "invalid_request",
"message": "incorrect API key provided"
}
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://www.summarizer.org/api/user/summarize',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array(
'mode' => '1',
'text' => 'Your given text',
'type' => 'summary_2',
'percentage' => '5'),
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer YOUR_API_KEY'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
| Status | Error | Description |
|---|---|---|
| 401 | incorrect API key provided | The provided API key is invalid or missing. |
| 401 | you are not premium for this request | Your subscription plan doesn't allow this request or has expired. |
| 422 | Validation Error | Invalid parameters were provided. |
| 422 | Text exceeds word limit | The input text is too long. |
| 422 | Text must be greater then 10 words | The input text is too short. |
| 429 | Too Many Requests | The rate limit of requests per minute depends on your plan. |
| 500 | An unexpected error occurred | Internal server error. |
For technical support or questions about the API, please contact [email protected].