{"components":{"securitySchemes":{"x402":{"description":"x402 v2 payment envelope. Verify/settle via https://x402-agent-pay.com/facilitator. Opens a session.","in":"header","name":"X-Payment","type":"apiKey"},"zkapi":{"description":"JSON Groth16 spend {proof, pubSignals} bound to receiver_field 311120069240614946781237594496498492453217966595. pubSignals = [nullifier, changeCommitment, root, spentAmount, receiverCommit, isFullSpend].","in":"header","name":"X-Zkapi-Proof","type":"apiKey"},"zkapiSession":{"description":"Session key from POST /zkapi/session (x402-funded).","in":"header","name":"X-Zkapi-Session","type":"apiKey"}}},"info":{"description":"Pay for FORGE/WALLY/CIPHER/CCN with a Groth16 spend proof (unlinkable note) or an x402-funded session key. Minimum 0.002 USDC per query.","title":"zkAPI \u2014 private usage credits","version":"1.0.0","x-payment-required":{"amount":"0.002","asset":"USDC","facilitator":"https://x402-agent-pay.com/facilitator","network":"base","payTo":"0x367F1b3D8Ca90D1e087481a9A40d585Bf3451a03"},"x-zkapi":{"circuit":"SpendCircuit","header":"X-Zkapi-Proof","receiver":"0x367F1b3D8Ca90D1e087481a9A40d585Bf3451a03","receiver_field":"311120069240614946781237594496498492453217966595"}},"openapi":"3.1.0","paths":{"/zkapi/deposit":{"post":{"requestBody":{"content":{"application/json":{"schema":{"properties":{"commitment":{"type":"string"}}}}}},"responses":{"200":{"description":"index + root"}},"security":[],"summary":"Ingest a public note commitment"}},"/zkapi/health":{"get":{"responses":{"200":{"description":"ok"}},"security":[],"summary":"Liveness + tree root + ledger length"}},"/zkapi/kit":{"get":{"responses":{"200":{"description":"kit"}},"security":[],"summary":"Prover kit URLs + JS snippet"}},"/zkapi/query":{"post":{"requestBody":{"content":{"application/json":{"schema":{"properties":{"query":{"type":"string"},"target":{"enum":["forge","wally","cipher","ccn"],"type":"string"}}}}}},"responses":{"200":{"description":"downstream + receipt"}},"security":[{"zkapiSession":[]}],"summary":"Debit a session and proxy one query"}},"/zkapi/session":{"post":{"responses":{"200":{"description":"session_key"},"402":{"description":"pay"}},"security":[{"x402":[]}],"summary":"Open a query-credit session by paying x402","x-payment-required":true}},"/zkapi/spend":{"post":{"requestBody":{"content":{"application/json":{"schema":{"properties":{"proof":{"type":"object"},"pubSignals":{"items":{"type":"string"},"type":"array"},"query":{"description":"downstream query payload"},"target":{"enum":["forge","wally","cipher","ccn"],"type":"string"}},"required":["proof","pubSignals","target"]}}}},"responses":{"200":{"description":"downstream response + receipt"},"400":{"description":"invalid proof / spent nullifier / unknown root"}},"security":[{"zkapi":[]}],"summary":"Verify a spend proof and proxy one paid query","x-price-usdc":"0.002"}},"/zkapi/tree":{"get":{"parameters":[{"in":"query","name":"index","required":true,"schema":{"type":"integer"}},{"in":"query","name":"root","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"path"}},"security":[],"summary":"Merkle path for a public leaf index"}}},"security":[{"zkapi":[]},{"x402":[]},{"zkapiSession":[]}],"servers":[{"url":"https://x402-agent-pay.com"}],"x-facilitator":"https://x402-agent-pay.com/facilitator"}
