---
title: "Large upload, step 2/2: process the staged object · 1 credit (+transcription)"
method: POST
path: "/api/v1/cases/{caseId}/documents/process"
tags: ["Cases"]
---

# Large upload, step 2/2: process the staged object · 1 credit (+transcription)

`POST /api/v1/cases/{caseId}/documents/process`

## Request

- Base URL: `https://legal.nexusquantum.legal`
- URL: `https://legal.nexusquantum.legal/api/v1/cases/{caseId}/documents/process`
- Auth: HTTP bearer

Processes the object uploaded via presign. `object_path` MUST belong to the case prefix (anti path-traversal, validated at both layers). It accepts the same caller metadata as the direct upload. Debit in the internal route (single). Supports Idempotency-Key (encrypted cache).

## Path parameters

- `caseId` string, uuid, required

## Request body

- object
  - `object_path` string, required: From the presign; mandatory {caseId}/ prefix.
  - `file_name` string, required
  - `file_type` string: MIME type.
  - `file_size_bytes` integer
  - `doc_type` string
  - `document_date` string, date
  - `privileged` boolean
  - `engine` 'standard' | 'premium'
  - `language` string

## Response `201`

{ document: CaseDocument, chunks_stored, credits_charged }

## Other responses

- `400`: VALIDATION_ERROR (object_path outside the case prefix, invalid metadata)
- `402`: INSUFFICIENT_CREDITS
- `422`: NO_TEXT_EXTRACTED

---

[API](https://skmtc.dev/nexusquantum/apis/nexus-legal-api.md) · [All operations](https://skmtc.dev/nexusquantum/apis/nexus-legal-api/llms.txt) · [OpenAPI document](https://skmtc.dev/nexusquantum/apis/nexus-legal-api/revisions/4084d8d4eb0b?raw)
