---
title: "Process Ocr"
method: POST
path: "/api/ocr/process"
tags: ["OCR Processing"]
---

# Process Ocr

`POST /api/ocr/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/ocr/process`
- Auth: HTTP bearer

Process document with OCR using DeepSeek-OCR service

Flow:
1. Authenticate user (JWT token)
2. Check user's token balance
3. Upload file to S3 storage
4. Forward request to DeepSeek with company API key
5. Store structured data (tables, JSON, etc.)
6. Track token usage
7. Return OCR results with structured data

## Request body `multipart/form-data`

- BodyProcessOcrApiOcrProcessPost
  - `file` string, binary, required

## Response `200`

Successful Response

- OCRResponse: Response model for OCR processing
  - `document_id` string, required
  - `text` string, required
  - `pages` unknown[], nullable
    - unknown
  - `bounding_boxes` object[], nullable
  - `api_dimensions` object, nullable
  - `structured_data` object, nullable
  - `tokens_used` integer, required
  - `tokens_remaining` integer, required
  - `processing_time_ms` integer, required

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