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

# Process Document

`POST /api/process`

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

## 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.net/qomplement/apis/fastapi.md) · [All operations](https://skmtc.net/qomplement/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/qomplement/fastapi/versions/b6c76b02a94a/schema)
