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.promptsteers the focus;max_wordsdefaults 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:promptis 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_wordsis optional. The result contains atitleand Markdowncontentlimited to headings (#–###), paragraphs,-bullets and**bold**.languagesets the output language regardless of the document language. A document too long to be summarized in a single pass fails the job with a specificerror_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
- 201
- 401
- 403
- 404
- 500
- 503
Summary job created successfully
Unauthorized
Forbidden
Not Found
Internal Server Error
Service Unavailable