---
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

---

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