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

# Process Ocr

`POST /api/ocr/process`

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

## 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.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/revisions/718de1c0d866/schema)
