---
title: "Process Document"
method: POST
path: "/api/process"
---

# Process Document

`POST /api/process`

## Request

- Base URL: `https://api.qomplement.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.qomplement.com/api/process`
- Auth: none declared

Process a document using ONLY Outlines capabilities that work with OpenAI

## Query parameters

- `templateId` string, nullable
- `templateFields` string, nullable
- `outputFormat` 'json' | 'text' | 'structured' | 'xml' | 'csv' | 'yaml' | 'markdown'
- `amet_session_id` string, nullable

## Request body `multipart/form-data`

- BodyProcessDocumentApiProcessPost
  - `file` string, binary, required

## Response `200`

Successful Response

- ProcessingResponse
  - `documentId` string, required
  - `extractedData` object, required
  - `rawText` string, required
  - `suggestedFields` FieldDefinition[], nullable
    - `name` string, required
    - `type` 'string' | 'number' | 'boolean' | 'array' | 'object' | 'date', required
    - `description` string, nullable
    - `required` boolean
    - `constraints` FieldConstraints
      - `minLength` integer, nullable
      - `maxLength` integer, nullable
      - `pattern` string, nullable
      - `enum` string[], nullable
      - `min` number, nullable
      - `max` number, nullable
  - `formats` object
  - `apiEndpoint` string, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/qomplement/apis/qomplement-api.md) - [All operations](https://skmtc.dev/qomplement/apis/qomplement-api/llms.txt) - [OpenAPI document](https://skmtc.dev/qomplement/apis/qomplement-api/revisions/6fe617c112ef?raw)
