---
title: "Summarization use case"
method: POST
path: "/ai/async-prediction/summarization/{MODEL_ID}"
tags: ["Create predictions"]
---

# Summarization use case

`POST /ai/async-prediction/summarization/{MODEL_ID}`

In the summarization use case, the LLM ingests text and returns a summary of the text as a response.

The context length is 2048 tokens. No options can be configured.

The POST request obtains and indexes prediction information related to the specified use case, and returns a unique `predictionId` and `status` of the request. The `predictionId` can be used later in the GET request to retrieve the results.

## Headers

- `Authorization` string, required
- `Content-Type` string

## Request body

- SummarizationRequest
  - `batch` object[] — The batch of key:value pairs used as inputs in the prediction. Up to 32 inputs per request are allowed.
    - `text` string — The content the model analyzes.
  - `useCaseConfig` UseCaseConfigSummarization
    - `maxWords` integer — This parameter specifies the maximum number of words returned in the summary when generated by the model.
  - `modelConfig` ModelConfig — Provides fields and values that specify ranges for tokens.
    - `vectorQuantizationMethod` string — Vector quantization compresses data size, as well as reducing memory usage. The methods are: * `min-max` - Creates tensors of the text and converts it to uint8 by normalizing it to the range [0, 255]. * `max-scale` - Finds the maximum absolute value for the encoded text, normalizes it by scaling the text to a range of -127 to 127, and then returns the quantized text as an 8-bit integer tensor.
    - `dimReductionSize` integer — Used to reduce vector size while maintaining good quality. This field allows any integer above 0, but less than or equal to the vector dimension of the model. If you send a vector dimension larger than the model, a 400 Bad Request error is returned. Not every model is designed to support this parameter. In this scenario, a warning message is generated that indicates quality can decrease.

## Response `200`

OK

- POSTresponse — This is the response to the POST chunking request submitted for a specific `chunker` and `modelId`.
  - `chunkingId` string, uuid — The universal unique identifier (UUID) returned in the POST request. This UUID is required in the GET request to retrieve results.
  - `status` string — The current status of the request. Allowed values are: * SUBMITTED - The POST request was successful and the response has returned the `chunkingId` and `status` that is used by the GET request. * ERROR - An error was generated when the GET request was sent. * READY - The results associated with the `chunkingId` are available and ready to be retrieved. * RETRIEVED - The results associated with the `chunkingId` are returned successfully when the GET request was sent.

## Other responses

- `4XX` — The error varies based on the issue encountered regarding the `chunkingId` or related information.

---

[API](https://skmtc.dev/lucidworks/apis/rules-rewrites-api.md) · [All operations](https://skmtc.dev/lucidworks/apis/rules-rewrites-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/lucidworks/rules-rewrites-api/revisions/f2d3747848e8/schema)
