{"openapi":"3.1.0","info":{"title":"witnessd","version":"0.1.0","description":"Neutral, machine-payable witness: independent fetch, hash, timestamp, archive; hourly Merkle anchoring on Base. Pay per call via x402 (USDC) or X-Api-Key credits.","contact":{"email":"jolisomiLLC@gmail.com"}},"servers":[{"url":"https://witnessd.vip"}],"paths":{"/api/witness":{"post":{"summary":"Witness a URL or API response now","x-payment-info":{"mode":"fixed","currency":"USD","amount":"0.02"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri"}}}}}},"responses":{"201":{"description":"Snapshot created; signed certificate returned"},"402":{"description":"x402 payment required"},"422":{"description":"Capture refused"}}}},"/api/certificate/{id}":{"get":{"summary":"Signed certificate + Merkle proof + anchor tx (free)","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"witnessd-certificate-v1"},"404":{"description":"Unknown id"}}}},"/api/retrieve/{id}":{"get":{"summary":"Archived body + certificate","x-payment-info":{"mode":"fixed","currency":"USD","amount":"0.05"},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Archived snapshot with certificate","content":{"application/json":{"schema":{"type":"object","required":["certificate","body_base64"],"properties":{"certificate":{"type":"object","description":"witnessd-certificate-v1: manifest, leaf_hash, ed25519 signature, Merkle proof + Base anchor tx"},"body_base64":{"type":"string","description":"The archived response body, base64-encoded (append ?raw=1 to get raw bytes with original content-type instead)"}}}}}},"402":{"description":"Payment required"},"404":{"description":"Unknown id"}}}},"/api/credits":{"post":{"summary":"Buy prepaid credit pack → API key","x-payment-info":{"mode":"fixed","currency":"USD","amount":"1.00"},"responses":{"201":{"description":"{api_key, credits_cents}"}}}}}}