AIVAX

Summarization

Use Summarization to condense text, images, and PDFs into short summaries, optionally guided by instructions about format, focus, language, or length. It fits reports, articles, contracts, and scanned documents that need a quick overview before review, search, or a later workflow step.

A summary restates the document in new words without adding information or commentary. To get specific fields as JSON, use Extraction instead. To ask open questions about media or describe visual content, use Media Descriptions.

Before calling this endpoint, create an API key and make sure the account has a positive balance.

Endpoint #

POST /api/v1/generations/summarize

Request behavior #

PropertyTypeRequiredDescription
documentsContent part arrayYesOne or more documents as OpenAI-compatible content parts: text, image_url, or file.
instructionsStringNoGuidance that applies to every summary, such as format, language, focus, or length.

Images and files accept base64 data URLs or public HTTP(S) URLs. Supported formats are JPEG, PNG, TIFF, and PDF, including multi-page PDFs. The resource must be reachable without sign-in. Other content types, such as audio or video, return 400 Bad Request.

JSON
{
  "instructions": "Answer in three bullet points, in English.",
  "documents": [
    {
      "type": "file",
      "file": {
        "filename": "bitcoin.pdf",
        "file_data": "https://bitcoin.org/bitcoin.pdf"
      }
    }
  ]
}

Read the response #

data contains one summary string per document, in the same order as documents. Documents are summarized independently; to get a single summary of several documents, send them as one text document or summarize the individual summaries in a second request.

JSON
{
  "message": null,
  "data": [
    "- Proposes a peer-to-peer electronic cash system that works without a trusted third party.\n- Prevents double spending with a proof-of-work chain of timestamped transactions.\n- Stays secure while honest nodes control most of the computing power."
  ]
}

If any document fails, the request returns an error instead of partial results. Documents that finished before the failure are still billed and count toward your quota, so fix or remove the failing document before retrying. Summaries are model-generated; verify consequential information against the original document.

Async generation #

Add "async": true to queue the summary, which is useful for large files. The API answers with HTTP 202 and an ID, and you fetch the stored result later or receive a webhook when it is done. See Async generations.

JSON
{
  "instructions": "Answer in three bullet points, in English.",
  "documents": [
    {
      "type": "file",
      "file": {
        "filename": "report.pdf",
        "file_data": "https://example.com/report.pdf"
      }
    }
  ],
  "async": true
}

Pricing and limits #

Summarization is billed for the input tokens of each document. Output tokens are not billed.

DescriptionPricing
Summarization input$0.04/M tokens

Summarization and Extraction share the same document limits. Remote files are limited to 5 MB each. The number of processed documents per minute and per day depends on the plan; see Data processing limits.

The quota counts every item in the request’s documents array, not each HTTP request. A request that would exceed any active window returns 429 Too Many Requests.

The embedded API reference contains the server-maintained request, response, authentication, and error details:

Type to search the documentation.