apyhub
ARTIFICIAL INTELLIGENCE · DATA EXTRACTION

Document Summarizer

What it does

Document Summarizer turns a PDF, DOCX, DOC, or ODT file into a plain-text summary. Send either an uploaded file or a direct document URL, and get back a summary string in the length you asked for.

Use summary_length to control the output size: short for about 20 words, medium for about 60 words, or long for about 100 words. If you need the result in another language, set output_language with a BCP-47 language code such as en.

This is a good fit when you need to skim reports, contract drafts, meeting notes, or long reference documents before routing them to a person or another workflow. The response stays simple: the summarized text is returned under data.summary, so you can store it, display it, or pass it to another step without extra parsing.

Use Document Summarizer when your app needs a compact readout of document content without building your own extraction and summarization pipeline.

▣ ENDPOINT 01 / 02
POST
Summarize an uploaded document
https://api.eu.apyverse.com/apyhub/summarize-documents/file

QUICKSTART

GUIDE

Quickstart

Upload a document to get back a short summary.

curl -X POST "https://api.eu.apyverse.com/apyhub/summarize-documents/file" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/document.pdf"

What you'll get back

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

{
  "data": {
    "summary": "..."
  }
}
TRY ITLIVE · 2600 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.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
body*
The document to summarize (.pdf, .docx, .doc, or .odt).
Target length — short (~20 words), medium (~60 words), long (~100 words).
BCP-47 language code for the output. Defaults to English.

About this endpoint

What it does

Uploads a document and returns a summary of its contents. The request body must include the file to summarize, and can optionally include the target summary length and output language.

Request Body

ParameterTypeMandatoryDescription
fileStringYesThe document to summarize. Accepted formats: .pdf, .docx, .doc, .odt.
summary_lengthENUMNoTarget length of the summary. Allowed values: short, medium, long. Default: short.<br>short ≈ 20 words<br>medium ≈ 60 words<br>long ≈ 100 words
output_languageStringNoBCP-47 language code for the output. Defaults to English.

Response

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

ParameterTypeMandatoryDescription
dataObjectYesWrapper object containing the response payload.
data.summaryStringNoThe generated summary text.

Body

Name
Type
Description
bodyREQUIRED
object

Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.

▣ ENDPOINT 02 / 02
POST
Summarize a document from a URL
https://api.eu.apyverse.com/apyhub/summarize-documents/url

QUICKSTART

GUIDE

Quickstart

Summarize a document from a direct file URL by sending the required url field.

curl -X POST "https://api.eu.apyverse.com/apyhub/summarize-documents/url" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/report.pdf"
  }'

What you'll get back

Returns a JSON object with a data object field, and data.summary is a string containing the generated summary.

{
  "data": {
    "summary": "..."
  }
}
TRY ITLIVE · 2600 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*
Direct URL to a PDF, DOCX, DOC, or ODT file.
Target length — short (~20 words), medium (~60 words), long (~100 words).
BCP-47 language code for the output. Defaults to English.

About this endpoint

What it does

Summarizes a document fetched from a URL and returns the generated summary in a JSON response. The request body must include the document URL, and can also include summary length and output language options.

Request Body

ParameterTypeMandatoryDescription
urlStringYesDirect URL to a PDF, DOCX, DOC, or ODT file.
summary_lengthENUMNoTarget length of the summary. Allowed values: short (~20 words), medium (~60 words), long (~100 words). Default: short.
output_languageStringNoBCP-47 language code for the output. Defaults to English.

Response

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

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

Body

Name
Type
Description
bodyREQUIRED
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.