{"openapi":"3.1.0","info":{"title":"A-Identity Trust Oracle","version":"1.1.0","summary":"The identity and reputation oracle for the agent economy.","description":"Before one AI agent pays another, it calls A-Identity to verify the counterparty. Seven x402 tools (six paid, one free) over a live on-chain engine: ERC-8004 identity + KYA (Know-Your-Agent), a deterministic 0-1000 reputation score computed from real on-chain settlements, a pre-transaction ALLOW / WARN / DENY risk verdict, a two-sided counterparty check that catches same-operator self-dealing, and a guardrail policy check. Every number is reproducible and every settlement is verifiable on-chain at /proof. Paid tools use the x402 protocol in USDC: an unpaid request returns HTTP 402 with the payment requirements; after payment the request is replayed and served.\n\nTwo settlement rails are live. The tool endpoints settle per call on X Layer (eip155:196). A second rail settles on Circle Arc testnet (eip155:5042002) through Circle Gateway's batched nanopayments, where the buyer signs an EIP-3009 authorization off-chain for zero gas and thousands of sub-cent authorizations net into one on-chain transfer. On Arc the gas token is USDC itself, so an agent needs no second asset to transact.","contact":{"name":"A-Identity","url":"https://a-identity.xyz"},"license":{"name":"MIT"}},"x-x402":{"version":2,"rails":[{"name":"per-call","network":"eip155:196","networkName":"X Layer mainnet","scheme":"exact","asset":"USD₮0","paths":"/tools/*","note":"Every paid tool call settles as its own on-chain transfer. The full settlement list is public at /proof."},{"name":"nanopayment","network":"eip155:5042002","networkName":"Circle Arc testnet","scheme":"exact","asset":"USDC","assetAddress":"0x3600000000000000000000000000000000000000","facilitator":"Circle Gateway (GatewayWalletBatched)","verifyingContract":"0x0077777d7eba4688bdef3e311b846f25870a19b9","paths":"/api/x402/nano/data","note":"Gasless for the buyer: an EIP-3009 authorization is signed off-chain and Circle Gateway batches the on-chain settlement."}]},"servers":[{"url":"https://a-identity-asp.onrender.com","description":"Trust Oracle tools (x402 per-call, X Layer)"},{"url":"https://a-identity-backend.onrender.com","description":"Arc rail (x402 nanopayments over Circle Gateway, Arc testnet)"}],"tags":[{"name":"tools","description":"Paid pay-per-call tools (x402, USDC)"},{"name":"discovery","description":"Free discovery, proof, and methodology endpoints"}],"paths":{"/tools/verify_agent":{"post":{"tags":["tools"],"summary":"Verify an AI agent's identity (ERC-8004 + KYA)","description":"Returns the agent's on-chain ERC-8004 registration and KYA (wallet-control) status. Price: $0.001 (x402, USDC).","x-price":"$0.001","x-payment":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentIdRequest"}}}},"responses":{"200":{"description":"Identity + KYA result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"402":{"$ref":"#/components/responses/PaymentRequired"}}}},"/tools/reputation_score":{"post":{"tags":["tools"],"summary":"On-chain 0-1000 reputation score","description":"A deterministic 0-1000 reputation score computed from real on-chain settlements, KYA, and tenure. Price: $0.002 (x402, USDC).","x-price":"$0.002","x-payment":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentIdRequest"}}}},"responses":{"200":{"description":"Reputation result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"402":{"$ref":"#/components/responses/PaymentRequired"}}}},"/tools/risk_check":{"post":{"tags":["tools"],"summary":"Pre-transaction ALLOW / WARN / DENY risk verdict","description":"A single ALLOW / WARN / DENY decision with reasons for a counterparty, before you pay it. Optionally takes a txContext to size the risk to the payment. Price: $0.005 (x402, USDC).","x-price":"$0.005","x-payment":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskCheckRequest"}}}},"responses":{"200":{"description":"Risk verdict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskResult"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"402":{"$ref":"#/components/responses/PaymentRequired"}}}},"/tools/agent_passport":{"post":{"tags":["tools"],"summary":"Full agent passport (identity + reputation + KYA + risk)","description":"The full passport in one call: ERC-8004 identity, KYA, reputation, and risk. Price: $0.01 (x402, USDC).","x-price":"$0.01","x-payment":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentIdRequest"}}}},"responses":{"200":{"description":"Agent passport","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"402":{"$ref":"#/components/responses/PaymentRequired"}}}},"/health":{"get":{"tags":["discovery"],"summary":"Liveness + service card (free)","responses":{"200":{"description":"Service card (tools, prices, payment info)","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/.well-known/agent.json":{"get":{"tags":["discovery"],"summary":"Inspectable service manifest (free)","responses":{"200":{"description":"The Agent Marketplace service manifest","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/proof":{"get":{"tags":["discovery"],"summary":"Public, verifiable proof of real on-chain settlements (free)","responses":{"200":{"description":"Proof (HTML for a browser, JSON for an API caller)"}}}},"/methodology":{"get":{"tags":["discovery"],"summary":"Deterministic scoring methodology (free)","responses":{"200":{"description":"Methodology","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/tools/counterparty_check":{"post":{"tags":["tools"],"summary":"Two-sided counterparty check before an agent-to-agent deal","description":"Checks BOTH sides of a proposed deal and flags same-operator self-dealing, which a one-sided scan cannot see. Price: $0.008 (x402, USDC).","x-payment":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CounterpartyCheckRequest"}}}},"responses":{"200":{"description":"Two-sided verdict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskResult"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"402":{"$ref":"#/components/responses/PaymentRequired"}},"x-price":"$0.008"}},"/tools/guardrail_check":{"post":{"tags":["tools"],"summary":"Does this agent run under an enforced policy?","description":"Does this agent operate under an enforced spend/trade policy, and does it respect the verdicts? Returns bands only: no caps, allowlists, symbols, amounts or holdings are ever disclosed. \"Not registered\" and \"we cannot see the roster\" are reported as different answers. Price: $0.005 (x402, USDC).","x-payment":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentIdRequest"}}}},"responses":{"200":{"description":"Guardrail profile, in bands","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuardrailResult"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"402":{"$ref":"#/components/responses/PaymentRequired"}},"x-price":"$0.005"}},"/tools/trust_preview":{"post":{"tags":["tools"],"summary":"Free coarse trust band (rate limited)","description":"A free, coarse trust band plus revoked and Sybil flags. No payment and no key; rate limited to 20 calls per hour per IP. The on-ramp before a paid call.","x-price":"free","x-payment":"none","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentIdRequest"}}}},"responses":{"200":{"description":"Coarse trust band","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskResult"}}}},"400":{"$ref":"#/components/responses/BadRequest"}}}},"/api/x402/nano/data":{"servers":[{"url":"https://a-identity-backend.onrender.com","description":"Arc rail (Circle Gateway nanopayments)"}],"get":{"tags":["tools"],"summary":"Live Arc chain data, paid by gasless USDC nanopayment on Arc","description":"The Arc settlement rail. An unpaid GET returns an x402 v2 challenge whose accepts[] names Circle Arc testnet (eip155:5042002), native USDC, and Circle Gateway's GatewayWalletBatched domain. The buyer signs an EIP-3009 authorization off-chain, so the call costs the buyer no gas, and Gateway batches the on-chain settlement. Price: $0.001 (1000 USDC units).","x-price":"$0.001","x-payment":"x402-nanopayment","x-network":"eip155:5042002","parameters":[{"name":"PAYMENT-SIGNATURE","in":"header","required":false,"description":"Base64 x402 payment payload. Omit it to receive the 402 challenge first.","schema":{"type":"string"}}],"responses":{"200":{"description":"The paid resource, plus the Gateway settlement in the PAYMENT-RESPONSE header","content":{"application/json":{"schema":{"type":"object"}}}},"402":{"$ref":"#/components/responses/PaymentRequired"}}}},"/stats":{"get":{"tags":["discovery"],"summary":"Live settlement stats","description":"Live balance of the payout wallet and settlement totals.","responses":{"200":{"description":"Live stats"}}}},"/openapi.json":{"get":{"tags":["discovery"],"summary":"This document","description":"The OpenAPI spec for this service, served so agents and the Circle Agent Marketplace can read its inputs and outputs.","responses":{"200":{"description":"OpenAPI 3.1 document"}}}}},"components":{"schemas":{"AgentIdRequest":{"type":"object","required":["agentId"],"properties":{"agentId":{"type":"string","description":"Platform id, ERC-8004 token id (e.g. \"#849980\"), or the owner 0x address.","maxLength":128,"examples":["#849980"]}}},"RiskCheckRequest":{"allOf":[{"$ref":"#/components/schemas/AgentIdRequest"},{"type":"object","properties":{"txContext":{"type":"object","description":"Optional context to size the risk to the intended payment.","properties":{"amountUsd":{"type":"number","description":"The USD amount about to be paid."},"payee":{"type":"string","description":"The payee about to be paid, as an agent id or address. Optional."}}}}}]},"ToolResult":{"type":"object","description":"Tool-specific result. Common fields shown; each tool adds its own.","properties":{"tool":{"type":"string"},"agentId":{"type":"string"},"checkedAt":{"type":"string","format":"date-time"}}},"RiskResult":{"type":"object","properties":{"tool":{"type":"string","const":"risk_check"},"agentId":{"type":"string"},"decision":{"type":"string","enum":["ALLOW","WARN","DENY"]},"risk":{"type":"string","enum":["low","medium","high"]},"reasons":{"type":"array","items":{"type":"string"}},"checkedAt":{"type":"string","format":"date-time"}}},"Error":{"type":"object","properties":{"error":{"type":"string"}}},"CounterpartyCheckRequest":{"type":"object","required":["from","to"],"properties":{"from":{"type":"string","description":"The paying agent: ERC-8004 token id (\"#849980\"), CAIP id (\"eip155:196:8004/6271\"), or 0x owner address. Alias: \"payer\"."},"to":{"type":"string","description":"The counterparty agent, same accepted forms. Aliases: \"counterparty\", \"agentId\"."},"txContext":{"$ref":"#/components/schemas/RiskCheckRequest/allOf/1/properties/txContext"}}},"GuardrailResult":{"type":"object","properties":{"tool":{"type":"string"},"agentId":{"type":"string"},"found":{"type":"boolean","description":"Whether this agent is on the platform roster."},"guardrails":{"type":"object","description":"Banded profile: observability (observed / not_registered / unavailable), whether a policy is enforced, and volume/rate/count bands. Never raw values."},"note":{"type":"string"},"checkedAt":{"type":"string","format":"date-time"}}}},"responses":{"PaymentRequired":{"description":"x402 Payment Required. The response body carries the payment requirements; pay in USDC and replay the request.","content":{"application/json":{"schema":{"type":"object","description":"x402 payment requirements (accepts[], network, asset, amount, payTo)."}}}},"BadRequest":{"description":"Missing or invalid agentId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}