{"openapi":"3.1.0","info":{"title":"ICME Preflight \u2014 Cryptographic Guardrails for AI Agents","version":"1.0.0","description":"ICME Preflight replaces model-based guardrails with formal verification and cryptographic proofs. Write policies in plain English \u2014 Preflight compiles them to formal logic (SMT-LIB) and checks every agent action with a mathematical solver. SAT = allowed, UNSAT = blocked. Every decision produces a zero-knowledge proof: tamper-proof, independently verifiable, and private. Docs: https://docs.icme.io","guidance":"Getting started: 1) POST /v1/createUserX402 with { username } to get a 402 with a USDC deposit address on Base. Send $5 USDC, then retry with { username, stripe_payment_intent_id } to complete signup. The response contains an api_key \u2014 save it. Use it as the X-API-Key header on all subsequent calls. You receive 325 starting credits. 2) POST /v1/makeRules with { policy } and your X-API-Key header \u2014 write your guardrail in plain English (up to 50 rules). Preflight compiles it to formal logic and returns a policy_id. Costs 300 credits. 3) Verify agent actions \u2014 two paths: (a) POST /v1/checkIt with X-API-Key header \u2014 costs 1 credit per call, use this if you already have credits from signup or topUp. (b) POST /v1/checkItPaid \u2014 x402 USDC payment per call, no API key or account needed, best for autonomous agents. Both accept { policy_id, action } and return SAT/UNSAT with extracted values and optional ZK proof. For a minimal ALLOWED/BLOCKED response, use POST /v1/verify (API key, 1 credit). Credit budget: signup gives 325 credits. makeRules costs 300, checkIt/verify cost 1 each. That leaves 25 checks after your first policy. When credits run out, POST /v1/topUpX402 to add more ($5 = 500 credits per x402 payment) ZK proofs: after calling checkIt/checkItPaid, wait a few minutes for proof generation, then POST /v1/verifyProof with the zk_proof_id to verify the cryptographic receipt. No extra cost \u2014 already covered by the original check. Single-use per proof. Tip: end every action string with an explicit claim and state all policy variables. Full docs: https://docs.icme.io/api-reference"},"servers":[{"url":"https://api.icme.io"}],"paths":{"/v1/checkItPaid":{"post":{"operationId":"checkItPaid","summary":"Verify an agent action against a guardrail policy (x402 payment)","description":"Submit an agent action (natural language) and a policy_id. Preflight extracts structured values from the action, checks them against the compiled formal logic, and returns SAT (allowed) or UNSAT (blocked) with extracted values and an optional ZK proof. No API key required \u2014 payment via x402 USDC on Base. Tip: end your action string with an explicit claim and state all policy variables.","x-payment-info":{"protocols":["x402"],"pricingMode":"fixed","price":"0.010000"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["policy_id","action"],"properties":{"policy_id":{"type":"string","format":"uuid","description":"UUID of the compiled policy (from makeRules response)"},"action":{"type":"string","description":"Natural language description of the agent action to verify. End with an explicit claim. Max 2000 chars.","maxLength":2000,"example":"Send 500 USDC to 0xABCD. Therefore this transfer is permitted."}}}}}},"responses":{"200":{"description":"Verification result with extracted values and optional ZK proof","content":{"application/json":{"schema":{"type":"object","properties":{"check_id":{"type":"string","format":"uuid"},"result":{"type":"string","enum":["SAT","UNSAT","ERROR"],"description":"SAT = action allowed, UNSAT = action blocked by policy"},"detail":{"type":"string"},"extracted":{"type":"object","description":"Key-value pairs extracted from the action text"},"verification_time_ms":{"type":"integer"},"zk_proof_id":{"type":"string","format":"uuid","description":"ZK proof ID if proof was generated"},"zk_proof_url":{"type":"string","format":"uri","description":"URL to download the ZK proof binary"}}}}}},"402":{"description":"Payment Required \u2014 send x402 USDC payment on Base and retry with X-PAYMENT header"}}}},"/v1/createUserX402":{"post":{"operationId":"createUserX402","summary":"Create an account via x402 USDC payment ($5.00)","description":"Pay $5.00 USDC on Base via x402 to create an account. The x402 middleware handles payment \u2014 just send { username } in the body. Returns an api_key (save it immediately, shown only once) and 325 starting credits. Use the api_key as X-API-Key header for authenticated endpoints like makeRules and checkIt.","x-payment-info":{"protocols":["x402"],"pricingMode":"fixed","price":"5.000000"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["username"],"properties":{"username":{"type":"string","description":"Unique username (1-32 chars, alphanumeric + hyphens/underscores)","pattern":"^[a-zA-Z0-9_-]{1,32}$","example":"my-agent"}}}}}},"responses":{"200":{"description":"User created \u2014 returns user_id, username, api_key (save it!), credits (325)"},"402":{"description":"Payment Required \u2014 pay $5.00 USDC on Base via x402"},"409":{"description":"Username already taken"}}}},"/v1/topUpX402":{"post":{"operationId":"topUpX402","summary":"Add 500 credits via x402 USDC payment ($5.00)","description":"Pay $5.00 USDC on Base via x402 to add 500 credits to your account. Requires X-API-Key header to identify which account to credit. No request body needed.","x-payment-info":{"protocols":["x402"],"pricingMode":"fixed","price":"5.000000"},"responses":{"200":{"description":"Credits added \u2014 returns credits_added (500), credits_balance"},"402":{"description":"Payment Required \u2014 pay $5.00 USDC on Base via x402"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","description":"No body required. Requires X-API-Key header to identify the account to credit.","properties":{}}}}}}}}}