---
title: "Queue an AI extraction"
method: POST
path: "/parser/extractions"
tags: ["Parsing API"]
---

# Queue an AI extraction

`POST /parser/extractions`

## Request

- Base URL: `https://contracko.com/api/v1`
- URL: `https://contracko.com/api/v1/parser/extractions`
- Auth: one of:
  - API key in header `x-contracko-api-key`
  - HTTP bearer

Queue an AI extraction batch from files you already uploaded with `POST /parser/upload-url`. Supports output language, extraction template, output format, and output template options.

## Request body

- object: Request body for queueing a parser batch.
  - `aiInferenceMode` 'fast' | 'standard': AI inference mode. Defaults to fast; choose standard for background work.
  - `outputFormat` 'json' | 'csv' | 'xlsx': Requested export format for parser output. csv returns a ZIP bundle with one CSV per logical table; xlsx returns a multi-sheet workbook.
  - `runKind` 'extraction' | 'review': Request type. extraction performs structured extraction only; review adds AI analysis and costs extra credits.
  - `outputLanguage` 'source' | 'en' | 'nl' | 'de' | 'fr' | 'es' | 'it' | 'pt' | 'zh-Hans' | 'zh-Hant' | 'ja' | 'ko' | 'ar' | 'hi' | 'bn' | 'ta' | 'te' | 'mr' | 'ur' | 'id' | 'vi' | 'th' | 'pl' | 'sv' | 'da' | 'no' | 'fi' | 'tr' | 'ru' | 'uk' | 'ro' | 'cs' | 'hu' | 'el': Optional AI output language. Omit to use the workspace default; use source to preserve the document language.
  - `outputTemplateId` 'standard': Export layout template. standard keeps the default Contracko parser columns.
  - `categoryId` string, uuid: Optional extraction template / contract type UUID. When provided, custom fields from that template are extracted.
  - `deidentification` object: Optional document-scoped protection policy. The resolved version is applied before previews and exports are produced.
    - `policyVersionId` 'contract-safe-v1'
    - `consistencyScope` 'document'
    - `overrides` object[]
      - `match` object, required
        - `entityType` 'person' | 'organisation' | 'email' | 'phone' | 'address' | 'identifier' | 'secret'
        - `fieldPath` string
      - `action` union, required
        - object
          - `type` 'keep', required
        - object
          - `type` 'replace', required
          - `strategy` 'linked'
        - object
          - `type` 'generalize', required
          - `precision` 'city-country', required
        - object
          - `type` 'remove', required
  - `files` object[], required: Files to include in the parser batch
    - `fileName` string, required: Original file name including extension
    - `mimeType` string, required: RFC MIME type of the source file
    - `fileSize` integer, required: File size in bytes
    - `pageCountEstimate` integer: Optional page count estimate to improve credit estimation
    - `fileKey` string, required: Parser upload key returned by POST /parser/upload-url

## Response `200`

Extraction batch queued.

- object
  - `batchId` string, required: Batch ID to use with GET /parser/jobs/{batchId}
  - `creditsNeeded` integer, required: Credits reserved for this batch

## Other responses

- `400`: Request validation failed (payload, query, or path format is invalid).
- `401`: Authentication failed (missing, invalid, revoked, or expired API key).
- `403`: Access denied because this API key does not include parsing access or the Parsing API is not available for this workspace.
- `429`: Retry later because the request rate limit was reached or too many parser batches are already running for this workspace.
- `500`: The server could not complete the request.

---

[API](https://skmtc.dev/contracko/apis/contracko-parsing-api.md) · [All operations](https://skmtc.dev/contracko/apis/contracko-parsing-api/llms.txt) · [OpenAPI document](https://skmtc.dev/contracko/apis/contracko-parsing-api/revisions/2f90b1d3cafd?raw)
