AI Summarize Documents API

2600 atoms
AI tier

About

This API can summarize complex documents including PDFs, DOCs, and ODFs. The API can translate the summary into multiple languages and allows customization of the summary length.
This API can summarize long text inside ebooks into short important text for different kinds of readers, streamline research paper reviews for researchers, and extract critical details from technical manuals for engineers.
Try out the API in the API playground and see how this free online summarizer API can help you summarize documents, and save time through the use of artificial intelligence and a simple API call.
Select API Endpoints
Input

API Playground

API Documentation

Summarize Documents File
POST
https://api.apyhub.com/ai/summarize-documents/file

Request example

1
curl --location --request POST 'https://api.apyhub.com/ai/summarize-documents/file' \
2
--header 'apy-token: {{token}}' \
3
--header 'Content-Type: application/json' \
4
--form 'file=@"sample.docx"'
Method: POST
Endpoint: https://api.apyhub.com/ai/summarize-documents/file
Content Type: multipart/form-data
Request Body
ParameterTypeMandatoryDescription
filefileyesThe file to summarize. The max content size is 16,385 tokens (~12,000 words). (can be either docx, doc, odf or pdf)
summary_lengthstringnoThe desired length of the summary. Can be short, medium, or long.
- short equals to max 20 words
- medium is max 60 words
- "long" is max 100 words. Defaults to short if not specified.
output_languagestringnoThe desired language for the output summary. Refer to the list below for possible ISO codes and their corresponding country names. Defaults to en if not specified.
Sample Response
This is a sample JSON response from the API:
1
{
2
"data": {
3
"summary": "Video thumbnails are an important tool for enhancing user experiences and optimizing content for SEO. They act as eye-catching previews of video content, improving visual appeal and user experience. Compelling thumbnails can increase video views and reinforce brand identity. In terms of SEO, well-optimized thumbnails can enhance click-through rates, reduce bounce rates, improve video engagement, and attract more traffic through rich snippets in search results. Video thumbnails are widely used in social media platforms, video sharing websites, e-learning platforms, video conferencing applications, video editing software, OTT streaming platforms, and digital advertising campaigns. There are several tools available to generate video thumbnails, such as Canva, Adobe Spark, FFmpeg, and YouTube Studio. ApyHub offers APIs to generate video thumbnails and watermarks programmatically. These tools can help optimize video thumbnails for better engagement and discoverability."
4
}
5
}
Language ISO Code and Country Name List Please refer to the following list to set the output_language parameter:
ISO CodeLanguage (Script)
sqAlbanian
arArabic (Arabic script)
hyArmenian (Armenian script)
awaAwadhi (Devanagari script)
azAzerbaijani (Latin script)
baBashkir (Cyrillic script)
euBasque
beBelarusian (Cyrillic script)
bnBengali (Bengali script)
bhoBhojpuri (Devanagari script)
bsBosnian (Latin script)
pt_BRBrazilian Portuguese
bgBulgarian (Cyrillic script)
yueCantonese (Yue) (Traditional Chinese script)
caCatalan
hneChhattisgarhi (Devanagari script)
zhChinese (Simplified Chinese script)
hrCroatian (Latin script)
csCzech
daDanish
doiDogri (Devanagari script)
nlDutch
enEnglish
etEstonian
foFaroese
fiFinnish
frFrench
glGalician
kaGeorgian (Georgian script)
deGerman
elGreek (Greek script)
guGujarati (Gujarati script)
bgcHaryanvi (Devanagari script)
hiHindi (Devanagari script)
huHungarian
idIndonesian
gaIrish
itItalian
jaJapanese (Kanji, Hiragana, Katakana scripts)
jvJavanese (Latin script)
knKannada (Kannada script)
ksKashmiri (Perso-Arabic script)
kkKazakh (Cyrillic script)
kokKonkani (Devanagari script)
koKorean (Hangul script)
kyKyrgyz (Cyrillic script)
lvLatvian
ltLithuanian
mkMacedonian (Cyrillic script)
maiMaithili (Devanagari script)
msMalay (Latin script)
mtMaltese
zh_CNMandarin (Simplified Chinese script)
mrMarathi (Devanagari script)
mwrMarwari (Devanagari script)
nanMin Nan (Traditional Chinese script)
roMoldovan (Latin script)
mnMongolian (Cyrillic script)
cnrMontenegrin (Latin script)
neNepali (Devanagari script)
noNorwegian
orOriya (Odia script)
psPashto (Perso-Arabic script)
faPersian (Farsi) (Perso-Arabic script)
plPolish
ptPortuguese
paPunjabi (Gurmukhi script)
rajRajasthani (Devanagari script)
ruRussian (Cyrillic script)
saSanskrit (Devanagari script)
satSantali (Ol Chiki script)
srSerbian (Cyrillic and Latin scripts)
esSpanish; Español
sdSindhi (Arabic script)
siSinhala (Sinhala script)
skSlovak
slSlovene
ukUkrainian (Cyrillic script)
urUrdu (Perso-Arabic script)
uzUzbek (Latin script)
viVietnamese
cyWelsh
wuuWu (Simplified Chinese script)
HTTP Response Codes
The method may return one of the following HTTP status codes:
Status CodeDescription
200The request was successful.
400The request was invalid or could not be understood by the server.
401Required authentication information is either missing or not valid for the resource.
500If any unexpected error occurs while processing the request.

Authentication

All API requests to ApyHub services need to be authenticated. Currently we support tokens or basic authentication mechanisms. You can generate and view your existing credentials from your workspace settings (on the left side of the navbar) and go to “API Keys".
Points to note:
  • Credential secrets are generated on the fly and are not stored in plain text, so on generating a credential please save the secrets somewhere safe.
  • Use the apy-token as the header parameter to pass the token.
  • Use the Authorization header to send the basic authentication credentials.

Error codes

1
{
2
"error": {
3
"code": 105,
4
"message": "Invalid URL"
5
}
6
}
To search for a specific error code, enter the code in the search box below. Alternatively, you can click on the button to view a complete list of all error codes.