apyhub
Back
▣ ARTIFICIAL INTELLIGENCE · SMART GENERATION

Summarize Text API

What it does

Text Summarizer turns long text into a shorter summary. Send it content, optionally add context, choose the output language, set a maximum length in words, and adjust the voice tone. The service returns a job ID so you can track processing asynchronously.

Use Text Summarizer when you need to condense articles, reports, support transcripts, or internal notes into something easier to scan. The content field is required. You can also pass context to guide how the text should be summarized, language to set the output language, max_length to cap summary length, and voice_tone to shape the style of the result.

When the job completes, the status endpoint returns a structured result with the job status, the job type, and a summary string inside the response data. That makes it straightforward to build workflows that queue summaries, poll for completion, and store the final text in a CMS, knowledge base, or review queue.

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

QUICKSTART

GUIDE

Quickstart

Submit text for summarization as a JSON body.

curl -X POST "https://api.eu.apyhub.com/sharpapi/summarize-text" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"content":"Artificial intelligence is transforming how teams write, analyze, and automate work.","context":"Create a concise executive summary.","language":"English","max_length":100,"voice_tone":"clear"}'

What you'll get back

Returns a JSON object with a job_id string — the UUID of the submitted job. Poll the job status endpoint with this id to retrieve the result.

{
  "job_id": "d6e2ea09-bd68-463f-b4a1-b2fd2954fe57"
}
TRY ITLIVE · 50 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*
Provide the content to summarize.
Additional processing instructions for the content.
Specify the language of the output, defaults to English.
Specify the maximum length of the summary in words .(For example: 100).

About this endpoint

What it does

Starts an async text-summarization job. You submit the content and optional processing instructions, and the response returns identifiers you can use to check the job status later.

Request Body

ParameterTypeDescription
contentStringProvide the content to summarize.
contextStringAdditional processing instructions for the content.
languageStringSpecify the language of the output, defaults to English.
max_lengthNumberSpecify the maximum length of the summary in words. For example: 100.
voice_toneStringSpecify the voice tone of the output. It can be adjectives like funny or joyous, or even the name of a famous writer.

Response

Returns a JSON object with a job_id string — the UUID of the submitted job. Poll the job status endpoint with this id to retrieve the result.

ParameterTypeDescription
job_idStringJob identifier.

Notes

This endpoint kicks off an async job and returns immediately with a job identifier; the actual work runs in the background. Pair this call with the corresponding job_check endpoint — poll that until the status reaches a terminal state to retrieve the result. Extract the job id from job_id.

▣ ENDPOINT 02 / 02
GET
Get Summarize Text job status
https://api.eu.apyhub.com/sharpapi/summarize-text/job/status/:job_id

QUICKSTART

GUIDE

Quickstart

Check the status of a summarization job by replacing :job_id with your job ID.

curl -X GET "https://api.eu.apyhub.com/sharpapi/summarize-text/job/status/:job_id" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with a data object. data includes id and type strings, plus an attributes object containing the job status, type, and a result.summary string when available.

{
  "data": {
    "id": "5fa45f0e-6680-4f64-8528-3f085a87bd2f",
    "type": "api_job_result",
    "attributes": {
      "type": "content_summarize",
      "status": "success",
      "result": {
        "summary": "..."
      }
    }
  }
}
TRY ITLIVE · 1 ATOM
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Checks the status of an existing text-summarization job identified by job_id and returns the job record in a JSON object.

Path Parameter(s)

AttributeTypeDescription
job_idStringThe job identifier, in UUID format.

Response

Returns a JSON object with a data object field. The data object contains id and type string fields, plus an attributes object with type, status, and result fields. The success response is a job status payload.

ParameterTypeDescription
dataObjectThe job record object.
data.idStringThe job identifier, in UUID format.
data.typeStringThe top-level resource type.
data.attributesObjectThe job attributes object.
data.attributes.typeStringThe summarize-text job type.
data.attributes.statusENUMThe job status. Allowed values: success, failed, running, queued.
data.attributes.resultObjectThe job result object. Present when the job has completed successfully.
data.attributes.result.summaryStringThe generated summary text.
▣ 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.