# supplier/.env.chandra.example — Chandra OCR-2 supplier (ocr capability) # # Copy to supplier/.env.chandra on the host, chmod 600, fill the blanks. # TESTNET FIRST: run the full lifecycle (advert → escrow → claim → submit → # accept) on testnet before any mainnet value enters this file. Mainnet ops # (funding, advert post, container start) are operator-executed. # # The upstream is any OpenAI-compatible VISION endpoint serving # datalab-to/chandra-ocr-2 (vLLM recommended; `chandra_vllm` docker or # `vllm serve datalab-to/chandra-ocr-2 --revision `). # LICENSING: the model weights and the hosted API each carry their own # terms. Confirm your own licensing position with the model provider before # serving commercially. # ── Identity / chain ────────────────────────────────────────────────────── SUPPLIER_PRIV_KEY_HEX= # gen-keypair output; NEW wallet, working float only NETWORK_ID= # 0 testnet | 1 mainnet — set explicitly, never default OGMIOS_URL= # wss://ogmios.vector.testnet... | mainnet equivalent ADVERT_REF= # # from tx:post-advert (below) LIVE_CHAIN= # 1 only when submitting for real VECTOR_ZERO_TIME_MS= # per deploy/README (mainnet 1756485600000) # ── Capability ──────────────────────────────────────────────────────────── CAPABILITY_KIND=ocr # ── Upstream selection ──────────────────────────────────────────────────── # "datalab" = Datalab hosted document API (v0 deployment, decided 2026-08-06) # "openai-vision" = self-hosted vLLM (the attestation upgrade path) OCR_UPSTREAM=datalab # ── Datalab upstream (OCR_UPSTREAM=datalab) ─────────────────────────────── # TERMS: the upstream provider's end-user terms govern how you may use and # redistribute output, and they vary by account and plan. Confirm your own # position with the provider before serving third parties. DATALAB_API_KEY= # provider account key; never commit DATALAB_BASE_URL=https://www.datalab.to DATALAB_MODE=accurate # fast | balanced | accurate DATALAB_TIMEOUT_MS=120000 # submit + poll budget; keep < advert max_processing_ms # ── OpenAI-compatible vision upstream (OCR_UPSTREAM=openai-vision) ──────── # No /v1 suffix — supplier/src/ocrVision.ts appends /v1/chat/completions. # OPENAI_BASE_URL= # e.g. http://chandra-vllm:8000 # OPENAI_API_KEY= # empty for a local vLLM; token for hosted endpoints OPENAI_TIMEOUT_MS=120000 # page inference is seconds; keep < advert max_processing_ms # OPENAI_MAX_TOKENS=8192 # optional output ceiling (advert cap applies regardless) # ── OCR extras ──────────────────────────────────────────────────────────── # Datalab upstream: the pre-Claim probe defaults to per_job liveness against # {DATALAB_BASE_URL}/api/v1/health - no further config needed. Set # REVISION_PROBE_MODE=off only if you want claims without the health gate. # # openai-vision upstream only (attestation upgrade path): # OCR_PROMPT_OVERRIDE= # exact serving prompt, pinned at integration # HF_MODEL_REVISION= # 40-hex checkpoint SHA; mismatch refuses Claim # REVISION_PROBE_URL= # e.g. http://chandra-vllm:8000/info # ── Service ─────────────────────────────────────────────────────────────── PORT=8080 # ── Advert posting (run once per network, testnet first) ────────────────── # Model string convention: datalab upstream = "datalab/convert-accurate" # (honest: hosted engine + mode); self-hosted = "datalab-to/chandra-ocr-2@". # Endpoint host: your deployed supplier's public HTTPS endpoint (deploy # target tracked outside this repo, not in this file). # # pnpm --filter @marketplace/supplier tx:post-advert -- \ # --ogmios-url $OGMIOS_URL \ # --priv-key $SUPPLIER_PRIV_KEY_HEX \ # --capability-id ocr.page.extract.chandra-ocr-2.v1 \ # --model "datalab/convert-accurate" \ # --max-output-tokens 8192 \ # --max-processing-ms 150000 \ # --price-lovelace 200000 \ # --endpoint-url https:// \ # --detail-uri https:///chandra-detail.json \ # --detail-hash # # max_processing_ms 150000 covers DATALAB_TIMEOUT_MS (120s) + chain legs. # Price 200000 (0.2 AP3X) is the fleet convention placeholder — a future # pricing decision supersedes it. Bonds default to 1 AP3X each. # The detail JSON template lives at supplier/chandra-detail.example.json. # Testnet: DNS is not required — a direct http://: endpoint # works for the testnet advert (retire it after the drills).