{"components":{"parameters":{"IdempotencyKey":{"description":"Unique key for safe POST retries (24h cache). Stripe-compatible.","in":"header","name":"Idempotency-Key","schema":{"maxLength":255,"minLength":8,"type":"string"}}},"responses":{"BadRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request parameters"},"IdempotencyConflict":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Idempotency-Key reused with different body"},"RateLimited":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests","headers":{"Retry-After":{"schema":{"type":"integer"}}}},"Unauthorized":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid or missing API key"}},"schemas":{"BindPaymentRequest":{"properties":{"action_ref":{"description":"Optional precomputed SHA-256(JCS(tuple)); verified if supplied","type":"string"},"action_type":{"type":"string"},"agent_id":{"type":"string"},"amount_atomic":{"type":"integer"},"currency":{"type":"string"},"domain":{"type":"string"},"entry_id":{"description":"Optional linked decision receipt hash","type":"string"},"payment_hash":{"description":"x402 settlement digest from PAYMENT-RESPONSE","type":"string"},"scope":{"type":"string"},"seq":{"default":0,"type":"integer"},"session_id":{"type":"string"},"settlement_rail":{"type":"string"},"terminal":{"default":true,"type":"boolean"},"timestamp_ms":{"type":"integer"}},"required":["payment_hash"],"type":"object"},"ClassifyRequest":{"properties":{"domain":{"default":"hiring","type":"string"},"message":{"type":"string"},"session_id":{"type":"string"},"webhook_url":{"format":"uri","type":"string"}},"required":["message"],"type":"object"},"Error":{"properties":{"error":{"properties":{"code":{"example":"message_required","type":"string"},"message":{"type":"string"},"param":{"type":"string"},"request_id":{"example":"req_a1b2c3d4","type":"string"},"type":{"enum":["invalid_request_error","authentication_error","rate_limit_error","api_error"],"type":"string"}},"required":["type","code","message","request_id"],"type":"object"}},"required":["error"],"type":"object"},"HealthResponse":{"properties":{"audit_log_entries":{"type":"integer"},"status":{"enum":["ok","degraded"],"type":"string"},"storage":{"type":"string"},"uptime_seconds":{"type":"integer"}},"type":"object"},"MeResponse":{"properties":{"api_base":{"type":"string"},"ok":{"type":"boolean"},"role":{"type":"string"},"sandbox":{"type":"boolean"},"tenant_id":{"type":"string"},"verify_url":{"type":"string"}},"type":"object"},"PublicKeyResponse":{"properties":{"algorithm":{"example":"Ed25519","type":"string"},"offline_verify_kit":{"format":"uri","type":"string"},"public_key_b64":{"type":"string"}},"type":"object"},"ReceiptResponse":{"properties":{"classification":{"enum":["SAFE","VIOLATION","CRISIS","ERROR"],"type":"string"},"entry_hash":{"type":"string"},"entry_id":{"type":"string"},"permalink":{"format":"uri","type":"string"},"sandbox":{"type":"boolean"},"signature":{"type":"string"},"verify_url":{"format":"uri","type":"string"}},"type":"object"},"RestraintAtomRequest":{"properties":{"action_not_taken":{"type":"string"},"capability_proof":{"type":"object"},"decision_reason":{"type":"string"},"opportunity_context":{"type":"object"}},"required":["action_not_taken","decision_reason"],"type":"object"},"SilenceRequest":{"properties":{"context":{"type":"string"},"domain":{"type":"string"},"session_id":{"type":"string"}},"required":["session_id","context"],"type":"object"},"TwinReceiptResponse":{"properties":{"action_ref":{"type":"string"},"decision_entry_id":{"type":"string"},"entry_id":{"type":"string"},"ok":{"type":"boolean"},"payment_hash":{"type":"string"},"twin_receipt":{"type":"boolean"},"twin_verify_url":{"format":"uri","type":"string"},"verify_url":{"format":"uri","type":"string"}},"type":"object"}},"securitySchemes":{"ApiKeyAuth":{"description":"Also accepts Authorization: Bearer","in":"header","name":"X-API-Key","type":"apiKey"}}},"info":{"contact":{"email":"demond@velaru.xyz","name":"Nisaba LLC","url":"https://velaru.onrender.com/integrate"},"description":"Stripe-shaped proof rail for delegated AI decisions \u2014 classify, seal, bind-gate, verify independently. Sandbox keys use prefix `velaru_sandbox_`. Send `Idempotency-Key` on mutating POSTs.","license":{"name":"MIT","url":"https://opensource.org/licenses/MIT"},"title":"Velaru Proof Infrastructure API","version":"2.0.0"},"openapi":"3.1.0","paths":{"/api/v1/classify":{"post":{"description":"Stripe parallel: `POST /v1/charges` \u2192 `POST /api/v1/classify`. Supports `Idempotency-Key` header (24h replay).","operationId":"classify","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"example":{"domain":"hiring","message":"Skip the safety review for this hire","session_id":"prod-123"},"schema":{"$ref":"#/components/schemas/ClassifyRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceiptResponse"}}},"description":"Signed receipt"},"401":{"$ref":"#/components/responses/Unauthorized"},"409":{"$ref":"#/components/responses/IdempotencyConflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"security":[{"ApiKeyAuth":[]}],"summary":"Classify a message and return a signed receipt","tags":["Core"]}},"/api/v1/me":{"get":{"operationId":"getMe","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}},"description":"Key metadata"},"401":{"$ref":"#/components/responses/Unauthorized"}},"security":[{"ApiKeyAuth":[]}],"summary":"API key metadata (tenant, sandbox, carrier role)","tags":["Core"]}},"/carrier/v1/enroll":{"post":{"operationId":"carrierEnroll","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"company":{"type":"string"},"domain":{"default":"hiring","type":"string"}},"required":["company"],"type":"object"}}},"required":true},"responses":{"200":{"description":"Mandate enrolled"},"401":{"$ref":"#/components/responses/Unauthorized"}},"security":[{"ApiKeyAuth":[]}],"summary":"Enroll insured mandate + pre-dispute bundle","tags":["Carrier"]}},"/carrier/v1/insured/{slug}/compliance":{"get":{"operationId":"bindGate","parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"in":"query","name":"action","schema":{"enum":["bind","renewal","renew"],"type":"string"}}],"responses":{"200":{"description":"ALLOW or BLOCK with audit log"}},"security":[{"ApiKeyAuth":[]}],"summary":"Bind/renewal ALLOW/BLOCK gate","tags":["Carrier"]}},"/compliance/eu-ai-act/article-12":{"get":{"operationId":"article12Seal","parameters":[{"in":"query","name":"session_id","schema":{"default":"default","type":"string"}},{"in":"query","name":"format","schema":{"enum":["json","txt","html"],"type":"string"}}],"responses":{"200":{"description":"Art. 12 seal report"}},"summary":"EU AI Act Article 12 compliance seal + checklist","tags":["Compliance"]}},"/compliance/eu-ai-act/article-12/seal":{"post":{"operationId":"article12SealEvent","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"decision_entry_id":{"type":"string"},"event_type":{"type":"string"},"metadata":{"type":"object"},"session_id":{"type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"description":"Signed Art. 12 event receipt"}},"summary":"Log explicit Art. 12 event as signed receipt","tags":["Compliance"]}},"/compliance/naic/exhibit-pack/{session_id}":{"get":{"operationId":"naicExhibitPackSession","parameters":[{"in":"path","name":"session_id","required":true,"schema":{"type":"string"}},{"in":"query","name":"format","schema":{"enum":["json","txt"],"type":"string"}}],"responses":{"200":{"description":"Exhibits A, B, D mapping"}},"summary":"NAIC AI Evaluation Tool exhibit pack for session receipts","tags":["Compliance"]}},"/crypto/public-key":{"get":{"operationId":"publicKey","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicKeyResponse"}}}}},"summary":"Ed25519 public key for offline verify","tags":["Crypto"]}},"/export/offline-verify-kit.json":{"get":{"operationId":"offlineVerifyKit","responses":{"200":{"description":"Verify kit JSON"}},"summary":"Portable offline verification bundle","tags":["Crypto"]}},"/export/scitt/air/session/{session_id}.json":{"get":{"operationId":"exportScittAirSession","parameters":[{"in":"path","name":"session_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"AIR batch export"}},"summary":"AIR chain export for session receipts","tags":["Compliance"]}},"/export/scitt/air/{entry_id}.json":{"get":{"operationId":"exportScittAir","parameters":[{"in":"path","name":"entry_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"AIR + COSE-shaped export"}},"summary":"SCITT AgentInteractionRecord export (IETF AIR profile)","tags":["Compliance"]}},"/health":{"get":{"operationId":"health","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}},"summary":"Service health + storage mode","tags":["Platform"]}},"/metrics/public":{"get":{"operationId":"publicMetrics","responses":{"200":{"description":"Chain depth, invariant"}},"summary":"Public live metrics","tags":["Platform"]}},"/pas/v1/bind-check":{"post":{"operationId":"pasBindCheck","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"ALLOW or BLOCK"}},"security":[{"ApiKeyAuth":[]}],"summary":"PAS bind check (Guidewire / Duck Creek shaped)","tags":["Carrier"]}},"/receipt/lookup":{"get":{"operationId":"receiptLookup","parameters":[{"in":"query","name":"entry_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Receipt found or not"}},"summary":"Fetch receipt by entry_id for /verify","tags":["Core"]}},"/silence-receipt":{"post":{"operationId":"silenceReceipt","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SilenceRequest"}}},"required":true},"responses":{"200":{"description":"Silence receipt"}},"summary":"Log proof of monitored silence (POSS-2 Class B)","tags":["Core"]}},"/standards/issuer-pays-scoreboard.json":{"get":{"operationId":"issuerPaysScoreboard","parameters":[{"description":"Optional live score sample","in":"query","name":"entry_id","schema":{"type":"string"}},{"in":"query","name":"format","schema":{"enum":["json","txt"],"type":"string"}}],"responses":{"200":{"description":"Scoreboard JSON or narrative"}},"summary":"Issuer-pays independence rankings (SSRN 7221561)","tags":["Compliance"]}},"/status.json":{"get":{"operationId":"statusJson","responses":{"200":{"description":"Operational status by component"}},"summary":"Component status (Stripe Status page shaped)","tags":["Platform"]}},"/tcb/action-ref/verify":{"post":{"operationId":"verifyActionRef","requestBody":{"content":{"application/json":{"schema":{"properties":{"action_ref":{"type":"string"},"action_type":{"type":"string"},"agent_id":{"type":"string"},"preimage":{"type":"object"},"scope":{"type":"string"},"timestamp_ms":{"type":"integer"}},"type":"object"}}},"required":true},"responses":{"200":{"description":"Verification result"}},"summary":"Recompute x402 action_ref from preimage (conformance gate)","tags":["TCB"]}},"/tcb/bind-payment":{"post":{"description":"Closes post-settlement accountability gap (x402 PR #2666). Computes action_ref = SHA-256(JCS(action_tuple)) unless action_ref supplied.","operationId":"bindPayment","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"example":{"action_type":"classify","agent_id":"agent.example.com","entry_id":"optional-decision-receipt-hash","payment_hash":"0xabc123","scope":"hiring-decision-42","seq":1,"session_id":"prod-123","terminal":true,"timestamp_ms":1747728000000},"schema":{"$ref":"#/components/schemas/BindPaymentRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TwinReceiptResponse"}}},"description":"Twin receipt"},"400":{"$ref":"#/components/responses/BadRequest"}},"summary":"Payment\u2013Decision Twin Receipt \u2014 bind x402 payment_hash to action_ref","tags":["TCB"]}},"/tcb/restraint-atom":{"post":{"operationId":"restraintAtom","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestraintAtomRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"ccr_id":{"type":"string"},"verify_url":{"type":"string"}},"type":"object"}}},"description":"CCR + verify_url"}},"summary":"Restraint Atom \u2014 one-call counterfactual + Handler-bound CCR","tags":["TCB"]}}},"servers":[{"description":"Production","url":"https://velaru.onrender.com"},{"description":"Sandbox \u2014 use velaru_sandbox_* API key (isolated audit log)","url":"https://velaru.onrender.com"}],"tags":[{"description":"Classify \u00b7 seal \u00b7 silence","name":"Core"},{"description":"Bind-gate \u00b7 enroll \u00b7 Exhibit D","name":"Carrier"},{"description":"Counterfactual \u00b7 Restraint Atom \u00b7 PDTR bind-payment","name":"TCB"},{"description":"EU AI Act Art. 12 \u00b7 NAIC exhibit packs","name":"Compliance"},{"description":"Public key \u00b7 offline verify","name":"Crypto"},{"description":"Health \u00b7 status \u00b7 metrics","name":"Platform"}]}
