apyhub
Back
ARTIFICIAL INTELLIGENCE · SMART GENERATION

AI Summarizer API: Summarize Text and Web Pages

Hosted on ApyHub

What it does

The AI Summarizer API turns long content into a short summary. Send raw text or the URL of a web page, choose a short, medium, or long summary, and get it back in the language you need.

When you send a URL, the API fetches the page and removes navigation, ads, and other clutter before summarizing, so the summary covers the actual content. Both endpoints return the summary directly in the response.

Use it to create article previews and newsletter digests, give support and research teams the gist of long pages, or summarize content in a different language from the original. To summarize PDF or Word files, use the AI Summarize Documents API.

You can start on ApyHub's free tier with no card required.

▣ ENDPOINT 01 / 02
POST
Summarize Text
https://api.eu.apyhub.com/apyhub/ai-summarize-api/text

QUICKSTART

GUIDE

Quickstart

Summarize the provided text in the requested language and length.

curl -X POST "https://api.eu.apyhub.com/apyhub/ai-summarize-api/text" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"text":"ApyHub provides simple APIs for common developer tasks.","summary_length":"short","output_language":"en"}'

What you'll get back

Returns a JSON object with a data object. The data object contains a summary string with the generated summary.

{
  "data": {
    "summary": "Artificial intelligence is changing how industries operate."
  }
}
TRY ITLIVE · 1000 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body

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

ParameterTypeMandatoryDescription
textStringYesThe text to summarize.
summary_lengthStringYesThe desired summary length. (short/medium/long)
output_languageStringYesISO 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.

ParameterTypeMandatoryDescription
dataObjectYesWrapper object for the response payload.
data.summaryStringYesThe generated summary text.

Body

Name
Type
Description
bodyOPTIONAL
object
▣ ENDPOINT 02 / 02
POST
Summarize URL
https://api.eu.apyhub.com/apyhub/ai-summarize-api/url

QUICKSTART

GUIDE

Quickstart

Summarize a webpage by sending its URL, desired summary length, and output language.

curl -X POST "https://api.eu.apyhub.com/apyhub/ai-summarize-api/url" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/article",
    "summary_length": "short",
    "output_language": "en"
  }'

What you'll get back

Returns a JSON object with a data object. The data object contains a summary string with the generated summary.

{
  "data": {
    "summary": "Artificial intelligence is changing how industries operate."
  }
}
TRY ITLIVE · 1000 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body

About this endpoint

What it does

Fetches and summarizes content directly from a public web page URL. The API extracts article content, strips page clutter, and synchronously returns the generated summary text in the response payload.

Request Body

ParameterTypeMandatoryDescription
urlStringYesThe URL to summarize.
summary_lengthStringYesThe requested summary length. (short/medium/long)
output_languageStringYesISO 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.

ParameterTypeMandatoryDescription
dataObjectYesWrapper object for the response payload.
data.summaryStringYesThe generated summary text.

Body

Name
Type
Description
bodyOPTIONAL
object
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.