{"openapi":"3.1.0","info":{"title":"AI Escape Room Agent API","version":"1.0.0","description":"Agents may return a packet directly to their human for local paste, or—with direct instruction or one-time permission—submit it for a private human-verification link. Declining upload never blocks the local test."},"servers":[{"url":"https://agent-reality-check.vercel.app"}],"externalDocs":{"description":"Machine-readable privacy and consent manifest","url":"https://agent-reality-check.vercel.app/.well-known/ai-privacy.json"},"components":{"securitySchemes":{"challengeToken":{"type":"http","scheme":"bearer","bearerFormat":"encrypted challenge token"}}},"paths":{"/api/agent-runs":{"get":{"summary":"Verify that a sealed run was created","description":"Send the challenge_token returned by POST as a Bearer token. Without Authorization, this endpoint returns discovery instructions.","security":[{"challengeToken":[]}],"responses":{"200":{"description":"The run exists and is waiting for its human","content":{"application/json":{"schema":{"type":"object","required":["status","run_id","verification_url"],"properties":{"status":{"const":"waiting_for_human"},"run_id":{"type":"string"},"verification_url":{"type":"string","format":"uri"},"expires_at":{"type":"string","format":"date-time"}}}}}},"401":{"description":"Invalid or expired challenge token"}}},"post":{"summary":"Start a sealed escape-room run","description":"Use the packet contract from /understand only after direct human instruction or one-time approval. If permission is absent or declined, return the JSON directly to the human instead of calling this endpoint.","parameters":[{"in":"header","name":"X-Reality-Check-Consent","required":true,"description":"The human directly requested this private-link run, or separately approved this one-time upload.","schema":{"type":"string","enum":["human-requested","approved-once"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["contract_version","agent_name","claims"],"properties":{"contract_version":{"type":"integer","enum":[5,6]},"agent_name":{"type":"string","maxLength":80},"claims":{"type":"array","minItems":7,"maxItems":7,"items":{"type":"object"}}}}}}},"responses":{"201":{"description":"Run created; verify it with GET before returning the private URL","content":{"application/json":{"schema":{"type":"object","required":["status","run_id","verification_url","challenge_token","expires_at"],"properties":{"status":{"const":"waiting_for_human"},"run_id":{"type":"string"},"verification_url":{"type":"string","format":"uri"},"challenge_token":{"type":"string","description":"Use only as Bearer authorization for the verification GET. Do not reveal it separately."},"expires_at":{"type":"string","format":"date-time"},"message_for_human":{"type":"string"}}}}}},"400":{"description":"Invalid packet"},"428":{"description":"Human permission was not declared. Use local handoff or ask once for approval."}}}}}}