Skip to main content
POST
/
summarization
/
abstractive
Summarize
curl --request POST \
  --url https://api.example.com/summarization/abstractive \
  --header 'Content-Type: application/json' \
  --data '
{
  "text": "<string>",
  "instructions": "<string>",
  "max_tokens": 123
}
'
{
  "summary": "<string>",
  "input_chars": 123,
  "output_chars": 123,
  "latency_ms": 123
}

Overview

The /summarization/abstractive endpoint condenses text in the model’s own words without adding new information or commentary. Unlike extractive summarization, the output is a fluent rewrite — not a selection of lifted sentences.

Request

text
string
required
The input text to summarize. Can be an article, document, transcript, or any plain text string.
instructions
string
Optional additional rules for the summary. These are appended to the base instructions — they extend, not replace, the default behaviour (no new information, no commentary).Examples:
  • "Use bullet points."
  • "Focus on financial figures only."
  • "Write in Spanish."
  • "Limit to 3 sentences."
max_tokens
number
default:20048
Maximum number of tokens in the generated summary.

Response

summary
string
The generated summary text.
input_chars
number
Character count of the input text.
output_chars
number
Character count of the generated summary.
latency_ms
number
End-to-end request latency in milliseconds.

Error responses

StatusMeaning
400 Bad RequestMalformed request body or missing required fields.
401 UnauthorizedMissing or invalid x-api-key.
429 Too Many RequestsRate limit exceeded. Back off and retry.
500 Internal Server ErrorInference service unavailable.

Authentication

Include your API key in every request using the x-api-key header.
-H "x-api-key: <your-api-key>"

Examples

Basic summary

curl -X POST https://api.scaledown.xyz/summarization/abstractive \
  -H "Content-Type: application/json" \
  -H "x-api-key: <your-api-key>" \
  -d '{
    "text": "Your long text here..."
  }'
Response:
{
  "summary": "The company reported strong Q3 results, approved a share buyback program, and announced plans for Southeast Asian expansion.",
  "input_chars": 8340,
  "output_chars": 142,
  "latency_ms": 3241
}

With instructions

Use instructions to control format, language, focus area, or length.
curl -X POST https://api.scaledown.xyz/summarization/abstractive \
  -H "Content-Type: application/json" \
  -H "x-api-key: <your-api-key>" \
  -d '{
    "text": "Your long text here...",
    "instructions": "Use bullet points. Focus on dates and key decisions only.",
    "max_tokens": 500
  }'
Response:
{
  "summary": "- The company reported Q3 revenue of $4.2B, up 12% year-over-year.\n- The board approved a $500M share buyback program on October 14.\n- CEO announced plans to expand into Southeast Asia by mid-2027.",
  "input_chars": 8340,
  "output_chars": 198,
  "latency_ms": 3241
}

Notes

  • The base instructions (no new information, no commentary) are always applied. The instructions field adds on top of them — it does not replace them.
  • Temperature, top-p, and other sampling parameters are fixed and not configurable via the API.