Zum Hauptinhalt springen

Create Summary Job

POST 

/summaries/jobs

Start a document summarization job.

Creates a background job to generate a summary for a document. Returns a job ID that can be used to poll for the result.

Processing requirement: Both formats read the parsed text of the whole document and its attachments, so the job waits until the document is indexed and parsed (OCR). Upload documents in advance to minimize latency.

Formats:

  • text (default): a single paragraph. prompt steers the focus; max_words defaults to 200. When the parsed text cannot be used (parsing failed, did not finish within the wait, found no text, or the text is too long for one pass), the paragraph is based on images of the first pages instead.
  • markdown: prompt is the primary instruction and drives scope, perspective (e.g. indirect speech), audience, form and length; without a statement on form the summary is clearly structured. max_words is optional. The result contains a title and Markdown content limited to headings (#–###), paragraphs, - bullets and **bold**. language sets the output language regardless of the document language. A document too long to be summarized in a single pass fails the job with a specific error_message.

The job waits about 10 minutes for the document to be processed. If processing is still running after that, a markdown job fails with error_message "The document is still being processed. Try again later."; if processing failed, with "The document could not be read." A text job fails that way only when the document could not even be indexed.

The prompt is treated as untrusted input: it can steer focus, form and length but cannot override the base rules (only content from the document, nothing invented, no own assessment).

Use the GET /summaries/jobs/{job_id} endpoint to check status and retrieve results.

Request​

Responses​

Summary job created successfully