---
name: document-ocr
description: Extract normalized text from one immutable document through Ausca's fixed-price document OCR service.
---

# Ausca Document OCR

Use this service when an agent or application needs normalized text from one
document and a receipt-bound result. The service is synchronous and has a fixed
Ausca price declared by the active catalog revision.

## Authority

Resolve the active `document.ocr` revision from `https://ausca.com/catalog.json`.
Use the linked input and output schemas and keep the revision, schema digests,
canonicalizer, and idempotency key in the invocation envelope exactly as
declared. This file explains the workflow; the catalog and schemas define the
machine contract.

## Invoke

1. Supply the immutable artifact commitment required by the input schema. Do
   not place document bytes in the invocation JSON.
2. Send the exact envelope to `POST https://ausca.com/v1/invocations` without
   payment material to discover the live x402 v2 requirement.
3. After explicit payment authorization, retry the same request bytes and
   idempotency key with the required `PAYMENT-SIGNATURE` header.
4. Read `GET /v1/invocations/{invocation_id}` if the admission response is
   uncertain or durable completion must be confirmed.

The unsigned request is discovery only. It does not settle payment or admit
work. A successful paid retry returns the admitted or replayed invocation and
may include `PAYMENT-RESPONSE` settlement evidence.

## Retry and evidence

Reuse the same idempotency key only for retransmission of the same intended
purchase. Never mint a second purchase because a connection ended. Completion
requires the invocation to reach its terminal state with the expected receipt
class and output commitment. Validate the returned output against the published
schema before using it.

Ausca owns provider access, credentials, execution, and receipt production.
Callers supply service input and bounded payment authority; they do not need a
provider SDK, cloud credential, wallet implementation, or database connection.
