apyhub
ARTIFICIAL INTELLIGENCE · SMART GENERATION

Batch Text Summarization API

What it does

Text Summarization batches up to 10 input texts and returns a summary for each one in a single GPU pass. Send plain text strings in texts, choose model as bart or pegasus, and optionally set max_length and min_length to control summary size.

The response includes the total count, the model used, and a summaries array. Each item contains the generated summary plus input_length and summary_length, so you can compare source length with the output you received.

Use Text Summarization when you need to condense articles, support tickets, research notes, or user feedback into shorter versions for review, search, or downstream AI workflows. Because it accepts multiple texts at once, it fits batch processing jobs where latency and throughput both matter.

If you are building a content pipeline, you can summarize many records in one request and keep the output structured enough to store, rank, or pass into another model.

POST
Batch-summarize up to 10 texts in one GPU pass
http://localhost:8080/dosvak/batch-summarize-text
QUICKSTARTGUIDE

Quickstart

Summarize one or more texts with the default model.

curl -X POST "http://localhost:8080/dosvak/batch-summarize-text" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "texts": [
      "ApyHub provides simple APIs for common developer tasks. This endpoint turns longer text into shorter summaries."
    ]
  }'

What you'll get back

Returns a JSON object with count integer, model string, and summaries array. Each item in summaries is an object with summary string, input_length integer, and summary_length integer.

{
  "count": 1,
  "model": "bart",
  "summaries": [
    {
      "summary": "ApyHub provides simple APIs for common developer tasks.",
      "input_length": 110,
      "summary_length": 55
    }
  ]
}
TRY ITLIVE · 100 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*
texts*

About this endpoint

What it does

Summarizes up to 10 input texts in a single request and returns one summary per text. You can choose the summarization model and control the generated summary lengths.

Request Body

ParameterTypeMandatoryDescription
textsString ArrayYesThe texts to summarize. Minimum 1 item, maximum 10 items.
modelENUMNoSummarization model to use. Allowed values: bart, pegasus. Default: bart.
max_lengthIntegerNoMaximum length of each generated summary. Default: 200. Minimum: 30, maximum: 512.
min_lengthIntegerNoMinimum length of each generated summary. Default: 40. Minimum: 10, maximum: 200.

Response

Returns a JSON object with count as an integer, model as a string, and summaries as an array of objects. Each object in summaries contains a summary string, input_length integer, and summary_length integer.

ParameterTypeMandatoryDescription
countIntegerNoThe number of summaries returned.
modelStringNoThe model used to generate the summaries.
summariesObject ArrayNoAn array of summary result objects.
summaries[].summaryStringNoThe generated summary text.
summaries[].input_lengthIntegerNoThe length of the corresponding input text.
summaries[].summary_lengthIntegerNoThe length of the generated summary.

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.