---
title: "POST /predictions"
method: POST
path: "/predictions"
---

# POST /predictions

`POST /predictions`

## Headers

- `Content-Type` string, required

## Request body

- PostPredictions
  - `async` boolean
  - `autoRotate` boolean
  - `documentId` string, required
  - `imageQuality` 'LOW' | 'HIGH'
  - `maxPages` integer
  - `modelId` string, required
  - `postprocessConfig` union
    - object
      - `outputFormat` 'v1' | 'v2'
      - `strategy` 'BEST_FIRST', required
    - object
      - `outputFormat` 'v1' | 'v2'
      - `parameters` object, required
        - `collapse` boolean
        - `n` integer, required
      - `strategy` 'BEST_N_PAGES', required
  - `preprocessConfig` object
    - `autoRotate` boolean
    - `imageQuality` 'LOW' | 'HIGH'
    - `maxPages` integer
    - `pages` integer[]
    - `rotation` 0 | 90 | 180 | 270
    - `startPage` integer
  - `rotation` 0 | 90 | 180 | 270
  - `trainingId` string

## Response `200`

200 response

- Prediction
  - `createdBy` string, nullable
  - `createdTime` string, nullable
  - `documentId` string, required
  - `error` string, nullable
  - `inferenceTime` number, nullable
  - `modelId` string, required
  - `nextPage` integer, nullable
  - `postprocessConfig` union
    - object
      - `outputFormat` 'v1' | 'v2'
      - `strategy` 'BEST_FIRST', required
    - object
      - `outputFormat` 'v1' | 'v2'
      - `parameters` object, required
        - `collapse` boolean
        - `n` integer, required
      - `strategy` 'BEST_N_PAGES', required
  - `predictionId` string, required
  - `predictions` union, required
    - union[], nullable
      - union
        - object
          - `confidence` number, required
          - `label` string, required
          - `location` number[]
          - `page` integer
          - `rawValue` string, nullable
          - `source` 'llm' | 'model'
          - `value` string, nullable, required
        - object
          - `label` string, required
          - `page` integer
          - `value` array[], required
            - object[]
              - …
    - object, nullable
  - `preprocessConfig` object, nullable
    - `autoRotate` boolean
    - `imageQuality` 'LOW' | 'HIGH'
    - `maxPages` integer
    - `pages` integer[]
    - `rotation` 0 | 90 | 180 | 270
    - `startPage` integer
  - `status` 'pending' | 'succeeded' | 'failed'
  - `trainingId` string, nullable

## Other responses

- `400` — 400 response
- `403` — 403 response
- `404` — 404 response
- `415` — 415 response
- `500` — 500 response

## Changes

- **2026-07-13** `d5fe190026be` — 4 breaking, 1 warning, 9 info
  - the response property `inferenceTime` became nullable for the status `200`
  - the response property `inferenceTime` became optional for the status `200`
  - the `postprocessConfig/oneOf[subschema #2]/parameters/n` response property's max was increased from `3.00` to `100.00` for the response status `200`
  - the `preprocessConfig/maxPages` response property's max was increased from `3.00` to `100.00` for the response status `200`
  - …10 more
- **2024-02-05** `c371d93c085f` — 5 info
  - added the new optional request property `preprocessConfig/startPage`
  - added the optional property `nextPage` to the response with the `200` status
  - added the optional property `preprocessConfig/startPage` to the response with the `200` status
  - added `subschema #1, subschema #2` to the `predictions/anyOf[subschema #1]/items/` response property `anyOf` list for the response status `200`
  - …1 more
- **2023-12-05** `8290cb385771` — 3 breaking, 2 info
  - removed `subschema #1, subschema #2` from the `postprocessConfig` request property `oneOf` list
  - response property `predictions` list-of-types was widened by adding types `object` to media type `application/json` of response `200`
  - added `subschema #1, subschema #2` to the `postprocessConfig` response property `oneOf` list for the response status `200`
  - added `subschema #1, subschema #2` to the `postprocessConfig` request property `oneOf` list
  - …1 more
- …earlier changes not shown

[Full history](https://skmtc.dev/lucidtechai/apis/lucidtech-api/changes/predictions/post.md)

---

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