apyhub
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 and a status URL 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
http://localhost:8080/sharpapi/summarize-text
QUICKSTARTGUIDE

Quickstart

Submit text for summarization as a JSON body.

curl -X POST "http://localhost:8080/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 job_id and status_url string fields. job_id is the submitted job identifier, and status_url is the URL used to check the job status.

{
  "status_url": "https://apyhub.com/services/provider/sharpapi/api/v1/content/summarize/job/status/d6e2ea09-bd68-463f-b4a1-b2fd2954fe57",
  "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`).
Specify the voice tone of the output. It can be adjectives like `funny` or `joyous`, or even the name of a `famous writer`.

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

ParameterTypeMandatoryDescription
contentStringYesProvide the content to summarize.
contextStringNoAdditional processing instructions for the content.
languageStringNoSpecify the language of the output, defaults to English.
max_lengthNumberNoSpecify the maximum length of the summary in words. For example: 100.
voice_toneStringNoSpecify 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 required job_id and status_url string fields. job_id is the job identifier, and status_url is the URL used to check the submitted job status.

ParameterTypeMandatoryDescription
job_idStringYesJob identifier.
status_urlStringYesURL used to check the submitted job status.

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.

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 02 / 02
GET
Get Summarize Text job status
http://localhost:8080/sharpapi/summarize-text/job/status/:job_id
QUICKSTARTGUIDE

Quickstart

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

curl -X GET "http://localhost:8080/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)

AttributeTypeMandatoryDescription
job_idStringYesThe 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.

ParameterTypeMandatoryDescription
dataObjectYesThe job record object.
data.idStringYesThe job identifier, in UUID format.
data.typeStringYesThe top-level resource type.
data.attributesObjectYesThe job attributes object.
data.attributes.typeStringYesThe summarize-text job type.
data.attributes.statusENUMYesThe job status. Allowed values: success, failed, running, queued.
data.attributes.resultObjectNoThe job result object. Present when the job has completed successfully.
data.attributes.result.summaryStringYesThe generated summary text.

Path parameters

Name
Type
Description
job_idREQUIRED
string
▣ 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.