{"openapi":"3.1.0","info":{"title":"XGuard Paid Intelligence","version":"1.0.0"},"servers":[{"url":"https://api.xguardgate.com/api/intelligence/v1"}],"paths":{"/facts":{"post":{"operationId":"intel_facts","summary":"Live Facts 2.0","description":"Read one recorded primary-source fact, its verification time, age, confidence and recent observations.","parameters":[{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":8,"maxLength":128}},{"in":"header","name":"Payment-Signature","schema":{"type":"string"}},{"in":"header","name":"X-XGuard-Quote","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"fact":{"type":"string","minLength":1,"maxLength":300}},"required":["fact"]}}}},"responses":{"200":{"description":"Settled result with signed receipt and Payment-Response header"},"402":{"description":"Payment required or rejected","headers":{"Payment-Required":{"schema":{"type":"string"}}}},"503":{"description":"Unavailable or settlement pending. Use the original recovery credentials."}},"x-x402":{"currency":"USD","unit_price":"0.001","settlement_asset":"USDC","network":"eip155:8453","unit_amount_atomic":"1000","additional_xguard_fees":"0","batch_limit":100}}},"/dependencies":{"post":{"operationId":"intel_dependencies","summary":"Dependency Intelligence","description":"Check an exact release against OSV. For npm and PyPI, include publisher evidence, withdrawal or deprecation, and the linked GitHub repository’s archive state when available.","parameters":[{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":8,"maxLength":128}},{"in":"header","name":"Payment-Signature","schema":{"type":"string"}},{"in":"header","name":"X-XGuard-Quote","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"ecosystem":{"type":"string","enum":["npm","PyPI","Go","crates.io","Maven","NuGet"]},"name":{"type":"string","minLength":1,"maxLength":180},"version":{"type":"string","minLength":1,"maxLength":100}},"required":["ecosystem","name","version"]}}}},"responses":{"200":{"description":"Settled result with signed receipt and Payment-Response header"},"402":{"description":"Payment required or rejected","headers":{"Payment-Required":{"schema":{"type":"string"}}}},"503":{"description":"Unavailable or settlement pending. Use the original recovery credentials."}},"x-x402":{"currency":"USD","unit_price":"0.001","settlement_asset":"USDC","network":"eip155:8453","unit_amount_atomic":"1000","additional_xguard_fees":"0","batch_limit":100}}},"/breaking-changes":{"post":{"operationId":"intel_breaking_changes","summary":"API Breaking Changes","description":"Compare two supplied OpenAPI 3 documents for route, parameter, authentication and JSON contract changes. Unsupported constructs are reported explicitly.","parameters":[{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":8,"maxLength":128}},{"in":"header","name":"Payment-Signature","schema":{"type":"string"}},{"in":"header","name":"X-XGuard-Quote","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"before":{"type":"object"},"after":{"type":"object"}},"required":["before","after"]}}}},"responses":{"200":{"description":"Settled result with signed receipt and Payment-Response header"},"402":{"description":"Payment required or rejected","headers":{"Payment-Required":{"schema":{"type":"string"}}}},"503":{"description":"Unavailable or settlement pending. Use the original recovery credentials."}},"x-x402":{"currency":"USD","unit_price":"0.001","settlement_asset":"USDC","network":"eip155:8453","unit_amount_atomic":"1000","additional_xguard_fees":"0","batch_limit":100}}},"/models":{"post":{"operationId":"intel_models","summary":"AI Model Intelligence","description":"Read a published OpenAI model card, one observed price field, or compare the documented text-token costs of two models for a bounded workload.","parameters":[{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":8,"maxLength":128}},{"in":"header","name":"Payment-Signature","schema":{"type":"string"}},{"in":"header","name":"X-XGuard-Quote","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","additionalProperties":false,"properties":{"fact":{"type":"string","minLength":1,"maxLength":300}},"required":["fact"]},{"type":"object","additionalProperties":false,"properties":{"model":{"type":"string","minLength":1,"maxLength":80}},"required":["model"]},{"type":"object","additionalProperties":false,"properties":{"models":{"type":"array","minItems":2,"maxItems":2,"items":{"type":"string","minLength":1,"maxLength":80}},"input_tokens":{"type":"integer","minimum":0,"maximum":10000000},"output_tokens":{"type":"integer","minimum":0,"maximum":1000000}},"required":["models","input_tokens","output_tokens"]}]}}}},"responses":{"200":{"description":"Settled result with signed receipt and Payment-Response header"},"402":{"description":"Payment required or rejected","headers":{"Payment-Required":{"schema":{"type":"string"}}}},"503":{"description":"Unavailable or settlement pending. Use the original recovery credentials."}},"x-x402":{"currency":"USD","unit_price":"0.001","settlement_asset":"USDC","network":"eip155:8453","unit_amount_atomic":"1000","additional_xguard_fees":"0","batch_limit":100}}},"/compatibility":{"post":{"operationId":"intel_compatibility","summary":"Code Compatibility","description":"Check an exact runtime or peer version against an exact npm release’s published Node.js engine or peer dependency range.","parameters":[{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":8,"maxLength":128}},{"in":"header","name":"Payment-Signature","schema":{"type":"string"}},{"in":"header","name":"X-XGuard-Quote","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":180},"version":{"type":"string","minLength":1,"maxLength":100},"target":{"type":"string","minLength":1,"maxLength":180},"target_version":{"type":"string","minLength":1,"maxLength":100}},"required":["name","version","target","target_version"]}}}},"responses":{"200":{"description":"Settled result with signed receipt and Payment-Response header"},"402":{"description":"Payment required or rejected","headers":{"Payment-Required":{"schema":{"type":"string"}}}},"503":{"description":"Unavailable or settlement pending. Use the original recovery credentials."}},"x-x402":{"currency":"USD","unit_price":"0.001","settlement_asset":"USDC","network":"eip155:8453","unit_amount_atomic":"1000","additional_xguard_fees":"0","batch_limit":100}}},"/failures":{"post":{"operationId":"intel_failures","summary":"Production Failure Intelligence","description":"Look up a supported Cloudflare Workers error in the official error reference and return the documented diagnostic steps.","parameters":[{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":8,"maxLength":128}},{"in":"header","name":"Payment-Signature","schema":{"type":"string"}},{"in":"header","name":"X-XGuard-Quote","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"provider":{"type":"string","enum":["cloudflare-workers"]},"code":{"type":"string","enum":["1101","1102","1019","1021","1022","1024","1027","1042"]}},"required":["provider","code"]}}}},"responses":{"200":{"description":"Settled result with signed receipt and Payment-Response header"},"402":{"description":"Payment required or rejected","headers":{"Payment-Required":{"schema":{"type":"string"}}}},"503":{"description":"Unavailable or settlement pending. Use the original recovery credentials."}},"x-x402":{"currency":"USD","unit_price":"0.001","settlement_asset":"USDC","network":"eip155:8453","unit_amount_atomic":"1000","additional_xguard_fees":"0","batch_limit":100}}},"/infrastructure":{"post":{"operationId":"intel_infrastructure","summary":"Infrastructure Intelligence","description":"Return a provider’s recorded service status, cited evidence and a deployment or incident-response action.","parameters":[{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":8,"maxLength":128}},{"in":"header","name":"Payment-Signature","schema":{"type":"string"}},{"in":"header","name":"X-XGuard-Quote","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"provider":{"type":"string","enum":["github","cloudflare","anthropic","openai","npm"]}},"required":["provider"]}}}},"responses":{"200":{"description":"Settled result with signed receipt and Payment-Response header"},"402":{"description":"Payment required or rejected","headers":{"Payment-Required":{"schema":{"type":"string"}}}},"503":{"description":"Unavailable or settlement pending. Use the original recovery credentials."}},"x-x402":{"currency":"USD","unit_price":"0.001","settlement_asset":"USDC","network":"eip155:8453","unit_amount_atomic":"1000","additional_xguard_fees":"0","batch_limit":100}}},"/tools":{"post":{"operationId":"intel_tools","summary":"AI Agent Tool Intelligence","description":"Resolve a technical task to a tool, input contract, payment method and supported transports in the XGuard registry.","parameters":[{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":8,"maxLength":128}},{"in":"header","name":"Payment-Signature","schema":{"type":"string"}},{"in":"header","name":"X-XGuard-Quote","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"task":{"type":"string","enum":["fact","dependency","api-diff","model-price","compatibility","diagnosis","cloud-status","advisory","decision"]}},"required":["task"]}}}},"responses":{"200":{"description":"Settled result with signed receipt and Payment-Response header"},"402":{"description":"Payment required or rejected","headers":{"Payment-Required":{"schema":{"type":"string"}}}},"503":{"description":"Unavailable or settlement pending. Use the original recovery credentials."}},"x-x402":{"currency":"USD","unit_price":"0.001","settlement_asset":"USDC","network":"eip155:8453","unit_amount_atomic":"1000","additional_xguard_fees":"0","batch_limit":100}}},"/security":{"post":{"operationId":"intel_security","summary":"Software Security Intelligence","description":"Look up published OSV advisories for one exact package release; returns affected-package evidence and published fix boundaries.","parameters":[{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":8,"maxLength":128}},{"in":"header","name":"Payment-Signature","schema":{"type":"string"}},{"in":"header","name":"X-XGuard-Quote","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"ecosystem":{"type":"string","enum":["npm","PyPI","Go","crates.io","Maven","NuGet"]},"name":{"type":"string","minLength":1,"maxLength":180},"version":{"type":"string","minLength":1,"maxLength":100}},"required":["ecosystem","name","version"]}}}},"responses":{"200":{"description":"Settled result with signed receipt and Payment-Response header"},"402":{"description":"Payment required or rejected","headers":{"Payment-Required":{"schema":{"type":"string"}}}},"503":{"description":"Unavailable or settlement pending. Use the original recovery credentials."}},"x-x402":{"currency":"USD","unit_price":"0.001","settlement_asset":"USDC","network":"eip155:8453","unit_amount_atomic":"1000","additional_xguard_fees":"0","batch_limit":100}}},"/decisions":{"post":{"operationId":"intel_decisions","summary":"Machine Decision API","description":"Return an evidence-scoped deployment, upgrade or dependency-security decision for one question.","parameters":[{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":8,"maxLength":128}},{"in":"header","name":"Payment-Signature","schema":{"type":"string"}},{"in":"header","name":"X-XGuard-Quote","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","additionalProperties":false,"properties":{"question":{"type":"string","enum":["provider-available"]},"provider":{"type":"string","enum":["github","cloudflare","anthropic","openai","npm"]}},"required":["question","provider"]},{"type":"object","additionalProperties":false,"properties":{"question":{"type":"string","enum":["known-vulnerabilities"]},"ecosystem":{"type":"string","enum":["npm","PyPI","Go","crates.io","Maven","NuGet"]},"name":{"type":"string","minLength":1,"maxLength":180},"version":{"type":"string","minLength":1,"maxLength":100}},"required":["question","ecosystem","name","version"]},{"type":"object","additionalProperties":false,"properties":{"question":{"type":"string","enum":["npm-compatibility"]},"name":{"type":"string","minLength":1,"maxLength":180},"version":{"type":"string","minLength":1,"maxLength":100},"target":{"type":"string","minLength":1,"maxLength":180},"target_version":{"type":"string","minLength":1,"maxLength":100}},"required":["question","name","version","target","target_version"]}]}}}},"responses":{"200":{"description":"Settled result with signed receipt and Payment-Response header"},"402":{"description":"Payment required or rejected","headers":{"Payment-Required":{"schema":{"type":"string"}}}},"503":{"description":"Unavailable or settlement pending. Use the original recovery credentials."}},"x-x402":{"currency":"USD","unit_price":"0.001","settlement_asset":"USDC","network":"eip155:8453","unit_amount_atomic":"1000","additional_xguard_fees":"0","batch_limit":100}}},"/batch":{"post":{"operationId":"intel_batch","summary":"Fact batch","description":"Return all requested fact units in order. One unavailable item aborts the entire batch before settlement.","parameters":[{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":8,"maxLength":128}},{"in":"header","name":"Payment-Signature","schema":{"type":"string"}},{"in":"header","name":"X-XGuard-Quote","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"facts":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string","minLength":1,"maxLength":300}}},"required":["facts"]}}}},"responses":{"200":{"description":"Settled result with signed receipt and Payment-Response header"},"402":{"description":"Payment required or rejected","headers":{"Payment-Required":{"schema":{"type":"string"}}}},"503":{"description":"Unavailable or settlement pending. Use the original recovery credentials."}},"x-x402":{"currency":"USD","unit_price":"0.001","settlement_asset":"USDC","network":"eip155:8453","unit_amount_atomic":"1000","additional_xguard_fees":"0","batch_limit":100}}},"/history":{"post":{"operationId":"intel_history","summary":"Fact history","description":"Read a bounded page of observations for one fact.","parameters":[{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":8,"maxLength":128}},{"in":"header","name":"Payment-Signature","schema":{"type":"string"}},{"in":"header","name":"X-XGuard-Quote","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","additionalProperties":false,"properties":{"fact":{"type":"string","minLength":1,"maxLength":300},"page":{"type":"integer","minimum":1,"maximum":10000}},"required":["fact"]},{"type":"object","additionalProperties":false,"properties":{"fact":{"type":"string","minLength":1,"maxLength":300},"from":{"type":"string","minLength":1,"maxLength":24},"to":{"type":"string","minLength":1,"maxLength":24},"limit":{"type":"integer","minimum":1,"maximum":300},"cursor":{"type":"object","additionalProperties":false,"properties":{"observed_at":{"type":"string","minLength":1,"maxLength":24},"id":{"type":"string","minLength":1,"maxLength":100}},"required":["observed_at","id"]}},"required":["fact","from","to"]}]}}}},"responses":{"200":{"description":"Settled result with signed receipt and Payment-Response header"},"402":{"description":"Payment required or rejected","headers":{"Payment-Required":{"schema":{"type":"string"}}}},"503":{"description":"Unavailable or settlement pending. Use the original recovery credentials."}},"x-x402":{"currency":"USD","unit_price":"0.001","settlement_asset":"USDC","network":"eip155:8453","unit_amount_atomic":"1000","additional_xguard_fees":"0","batch_limit":100}}},"/compare":{"post":{"operationId":"intel_compare","summary":"Historical value comparison","description":"Compare recorded observations for one fact at two UTC timestamps.","parameters":[{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":8,"maxLength":128}},{"in":"header","name":"Payment-Signature","schema":{"type":"string"}},{"in":"header","name":"X-XGuard-Quote","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"fact":{"type":"string","minLength":1,"maxLength":300},"from":{"type":"string","minLength":1,"maxLength":24},"to":{"type":"string","minLength":1,"maxLength":24}},"required":["fact","from","to"]}}}},"responses":{"200":{"description":"Settled result with signed receipt and Payment-Response header"},"402":{"description":"Payment required or rejected","headers":{"Payment-Required":{"schema":{"type":"string"}}}},"503":{"description":"Unavailable or settlement pending. Use the original recovery credentials."}},"x-x402":{"currency":"USD","unit_price":"0.001","settlement_asset":"USDC","network":"eip155:8453","unit_amount_atomic":"1000","additional_xguard_fees":"0","batch_limit":100}}},"/changes":{"post":{"operationId":"intel_changes","summary":"Fact changes","description":"Read adjacent observations for a fact or one page of recorded changes to a source.","parameters":[{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":8,"maxLength":128}},{"in":"header","name":"Payment-Signature","schema":{"type":"string"}},{"in":"header","name":"X-XGuard-Quote","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","additionalProperties":false,"properties":{"fact":{"type":"string","minLength":1,"maxLength":300}},"required":["fact"]},{"type":"object","additionalProperties":false,"properties":{"entity":{"type":"string","minLength":1,"maxLength":220},"change":{"type":"string","minLength":1,"maxLength":100},"page":{"type":"integer","minimum":1,"maximum":10000}},"required":["entity"]}]}}}},"responses":{"200":{"description":"Settled result with signed receipt and Payment-Response header"},"402":{"description":"Payment required or rejected","headers":{"Payment-Required":{"schema":{"type":"string"}}}},"503":{"description":"Unavailable or settlement pending. Use the original recovery credentials."}},"x-x402":{"currency":"USD","unit_price":"0.001","settlement_asset":"USDC","network":"eip155:8453","unit_amount_atomic":"1000","additional_xguard_fees":"0","batch_limit":100}}},"/evidence":{"post":{"operationId":"intel_evidence","summary":"Observation evidence","description":"Retrieve one primary-source evidence record by canonical source and observation ID.","parameters":[{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":8,"maxLength":128}},{"in":"header","name":"Payment-Signature","schema":{"type":"string"}},{"in":"header","name":"X-XGuard-Quote","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"entity":{"type":"string","minLength":1,"maxLength":220},"observation":{"type":"string","minLength":1,"maxLength":100}},"required":["entity","observation"]}}}},"responses":{"200":{"description":"Settled result with signed receipt and Payment-Response header"},"402":{"description":"Payment required or rejected","headers":{"Payment-Required":{"schema":{"type":"string"}}}},"503":{"description":"Unavailable or settlement pending. Use the original recovery credentials."}},"x-x402":{"currency":"USD","unit_price":"0.001","settlement_asset":"USDC","network":"eip155:8453","unit_amount_atomic":"1000","additional_xguard_fees":"0","batch_limit":100}}}}}