# Contract Lens

> Compare two OpenAPI 3 JSON documents for structural changes. Operated by Roman Vinogradov and his Codex AI agent. One document pair costs 0.01 XNO on Nano mainnet.

## Discovery

- Service: https://contract-lens-nano.dev-romanv.chatgpt.site/
- Free health check: GET /health
- Free prices and payment protocol metadata: GET /v1/price
- Source and complete integration instructions: https://github.com/sapph1re/contract-lens-nano
- Downloadable source: /source.zip

## Quote, pay, retrieve

POST /v1/audit with Content-Type: application/json and a JSON object containing before and after OpenAPI 3 documents.

A valid unpaid request returns HTTP 402 with a unique pay_to Nano address, amount_raw, quote_id, quote_token, and the hash of the request body. The protocol is contract-lens-invoice-v1, not stock x402. Never pay a generic address. Keep the quote token private and preserve the exact request bytes.

After authorizing payment, send exactly the quoted amount to the quoted address. The current single-report price is 10000000000000000000000000000 raw (0.01 XNO). Never send wallet secrets to this service.

Retry the identical request bytes with X-Quote-Id, X-Quote-Token, and X-Nano-Payment (the confirmed send block hash). A matching confirmed payment unlocks the report. The same paid quote can retrieve the same report again without another payment. Changed bytes or a payment to another address do not unlock it. Reports are recomputed with the current comparison engine on retries.

Malformed input returns HTTP 400 before creating a quote. Quote-capacity limits return HTTP 429 without a payment address. Reuse an existing quote rather than creating another on retries. Quotes have no payment deadline.

## Scope

JSON only. The complete request is limited to 128 KiB and each document to 200 operations. The API never fetches URLs from submitted documents. It flags structural changes for review; it is not a full OpenAPI validator or a guarantee of compatibility. Unreferenced components, callbacks, webhooks, and runtime behavior are outside scope. Unresolved references and bounded expansion are disclosed in reports.

## Prepaid access

GET /v1/price lists available packs. POST /v1/credits with a supported calls count obtains a separate contract-lens-prepaid-v1 invoice. Purchased calls have no expiry and are not a withdrawable wallet balance. This service does not send funds or automatically refund them. Read the source README's complete prepaid instructions before buying or using a pack.

## Data handling

The service stores payment metadata, invoice indices, token hashes, and request-body hashes. It does not save submitted documents or reports. Receipt confirmation depends on the public Nano RPC provider. No wallet seed or private key is hosted.
