{"openapi":"3.1.0","info":{"title":"AgentProof API","version":"0.1.0","description":"AgentProof validates, repairs, and scores structured API responses before AI agents act on them.","x-guidance":"Use AgentProof when an AI agent receives API output that must be checked before taking action. Use POST /api/validate to validate one response against a supplied JSON Schema, POST /json/repair to repair malformed JSON, POST /schema/infer to infer a schema from examples, and POST /api/contract-score to score response stability across samples."},"servers":[{"url":"https://agentproof-murex.vercel.app"}],"paths":{"/json/repair":{"post":{"operationId":"repairJson","summary":"Repair malformed JSON","description":"Repair malformed JSON and return agent-safe structured output.","x-payment-info":{"protocols":[{"x402":{"network":"eip155:8453"}}],"price":{"mode":"fixed","currency":"USD","amount":"0.001"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"input":{"description":"Malformed JSON string or JSON-compatible value to repair."}},"required":["input"],"additionalProperties":true},{"type":"string","description":"Malformed JSON string to repair."}]}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","properties":{"service":{"type":"string","const":"AgentProof"},"endpoint":{"type":"string","const":"json.repair"},"valid":{"type":"boolean"},"changed":{"type":"boolean"},"repairedText":{"type":"string"},"parsed":{"description":"Any JSON value."},"warnings":{"type":"array","items":{"type":"string"}}},"required":["service","endpoint","valid","changed","repairedText","parsed","warnings"]}}}},"400":{"description":"Invalid request body."},"402":{"description":"Payment Required"}}}},"/schema/infer":{"post":{"operationId":"inferSchema","summary":"Infer JSON Schema","description":"Infer a JSON Schema from one or more sample API responses.","x-payment-info":{"protocols":[{"x402":{"network":"eip155:8453"}}],"price":{"mode":"fixed","currency":"USD","amount":"0.002"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"example":{"description":"Any JSON value."},"examples":{"type":"array","items":{"description":"Any JSON value."}}},"additionalProperties":true}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","properties":{"service":{"type":"string","const":"AgentProof"},"endpoint":{"type":"string","const":"schema.infer"},"schema":{"type":"object"}},"required":["service","endpoint","schema"]}}}},"400":{"description":"Invalid request body."},"402":{"description":"Payment Required"}}}},"/api/validate":{"post":{"operationId":"validateApiResponse","summary":"Validate API response","description":"Validate an API response against JSON Schema and suggest safe repairs.","x-payment-info":{"protocols":[{"x402":{"network":"eip155:8453"}}],"price":{"mode":"fixed","currency":"USD","amount":"0.002"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"response":{"description":"Any JSON value."},"schema":{"type":"object","description":"JSON Schema used to validate the response."}},"required":["response","schema"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","properties":{"service":{"type":"string","const":"AgentProof"},"endpoint":{"type":"string","const":"api.validate"},"valid":{"type":"boolean"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"keyword":{"type":"string"},"message":{"type":"string"},"expected":{},"actual":{},"value":{}}}},"repairSuggestion":{"description":"Any JSON value."}},"required":["service","endpoint","valid","errors"]}}}},"400":{"description":"Invalid request body."},"402":{"description":"Payment Required"}}}},"/api/contract-score":{"post":{"operationId":"scoreApiContract","summary":"Score API contract stability","description":"Score whether API responses are stable and safe for AI agents.","x-payment-info":{"protocols":[{"x402":{"network":"eip155:8453"}}],"price":{"mode":"fixed","currency":"USD","amount":"0.003"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"responses":{"type":"array","items":{"description":"Any JSON value."},"description":"Sample API responses to score for contract stability."},"schema":{"type":"object","description":"Optional JSON Schema to score the responses against."}},"required":["responses"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","properties":{"service":{"type":"string","const":"AgentProof"},"endpoint":{"type":"string","const":"api.contract-score"},"score":{"type":"number"},"verdict":{"type":"string","enum":["agent-proof","usable-with-warnings","risky","invalid"]},"responseCount":{"type":"number"},"validCount":{"type":"number"},"schemaErrors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"keyword":{"type":"string"},"message":{"type":"string"},"expected":{},"actual":{},"value":{}}}},"unstableFields":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"observedTypes":{"type":"array","items":{"type":"string"}}},"required":["path","observedTypes"]}},"missingFields":{"type":"array","items":{"type":"string"}},"notes":{"type":"array","items":{"type":"string"}}},"required":["service","endpoint","score","verdict","responseCount","validCount","schemaErrors","unstableFields","missingFields","notes"]}}}},"400":{"description":"Invalid request body."},"402":{"description":"Payment Required"}}}}}}