---
title: "Reprocess OCR (Gemini) over the original · 1 credit"
method: POST
path: "/api/v1/cases/{caseId}/documents/{docId}/reprocess-ocr"
tags: ["Cases"]
---

# Reprocess OCR (Gemini) over the original · 1 credit

`POST /api/v1/cases/{caseId}/documents/{docId}/reprocess-ocr`

## Request

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

PDF only, with the original persisted. Debit in the internal route (refund if OCR produces no text).

## Path parameters

- `caseId` string, uuid, required
- `docId` string, uuid, required

## Response `200`

{ ok, chunks_stored, ocr_confidence, credits_charged }

## Other responses

- `400`: VALIDATION_ERROR (not a PDF)
- `402`: INSUFFICIENT_CREDITS
- `410`: SOURCE_PURGED (no persisted original)
- `422`: NO_TEXT_EXTRACTED (empty OCR; credit refunded)

---

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