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

# POST /predictions

`POST /predictions`

## Headers

- `Content-Type` string, required

## Request body

- PostPredictions
  - `autoRotate` boolean
  - `documentId` string, required
  - `imageQuality` 'LOW' | 'HIGH'
  - `maxPages` integer
  - `modelId` string, required
  - `postprocessConfig` union
    - object
      - `strategy` 'BEST_FIRST', required
    - object
      - `parameters` object, required
        - `collapse` boolean
        - `n` integer, required
      - `strategy` 'BEST_N_PAGES', required
  - `trainingId` string

## Response `200`

200 response

- Prediction
  - `documentId` string, required
  - `inferenceTime` number, required
  - `modelId` string, required
  - `predictionId` string, required
  - `predictions` object[], required
    - `confidence` number, required
    - `label` string, required
    - `value` string, nullable, required
  - `timestamp` integer, required
  - `trainingId` string, nullable

## Other responses

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

## Changes

- **2022-03-31** `13bf8cf663ba` — 1 breaking, 1 info
  - the `predictions/items/value` response property's maxLength was increased from `64` to `512` for the response status `200`
  - added the optional property `trainingId` to the response with the `200` status
- **2022-03-16** `fc6ba1d5e844` — 1 info
  - the `predictions/items/label` response's property pattern was changed from `^[0-9A-Za-z_]+$` to `^[0-9A-Za-z-_]+$` for the status `200`
- **2022-03-09** `7bd50ad0f2b7` — 1 info
  - added the new optional request property `trainingId`
- **2021-11-05** `9788e6bfa925` — 2 breaking, 13 warning, 5 info
  - the `maxPages` request property's max was decreased to `3.00`
  - removed `subschema #1, subschema #2` from the `postprocessConfig` request property `oneOf` list
  - changed the pattern of the request property `modelId` from `^(|las:organization:[a-z0-9-_]+/)las:model:[a-z0-9-_]+$` to `^las:model:[a-f0-9]{32}$`
  - removed the request property `async`
  - …16 more

[Change 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/13bf8cf663ba/schema)
