openapi: 3.2.0 info: title: AAAA Nexus Reputation API version: 0.5.1 description: Formally verified AI safety APIs for autonomous agents. Supports REST, MCP, A2A (Google protocol), and x402 micropayment protocol. contact: email: atomadic69@gmail.com url: https://github.com/atomadictech/aaaa-nexus servers: - url: https://atomadic.tech description: Production security: [] tags: - name: Reputation description: 'Reputation ledger: record interactions, score queries, history' paths: /v1/reputation/record: post: operationId: recordReputation summary: Record agent interaction description: Record an agent interaction in the reputation ledger. Costs $0.02/call. tags: - Reputation security: - ApiKeyAuth: [] - X402PaymentProof: [] requestBody: required: true content: application/json: schema: type: object required: - agent_id - interaction_type - outcome properties: agent_id: type: string interaction_type: type: string outcome: type: string enum: - positive - negative - neutral counterparty_id: type: string responses: '200': description: Interaction recorded content: application/json: schema: type: object properties: record_id: type: string agent_id: type: string recorded_at: type: string format: date-time '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '402': $ref: '#/components/responses/PaymentRequired' /v1/reputation/score: get: operationId: getReputationScore summary: Get reputation score description: Get the reputation score for an agent. Costs $0.008/call. tags: - Reputation parameters: - name: agent_id in: query required: true schema: type: string description: Agent identifier security: - ApiKeyAuth: [] - X402PaymentProof: [] responses: '200': description: Reputation score content: application/json: schema: type: object properties: agent_id: type: string score: type: number format: float total_interactions: type: integer positive_ratio: type: number format: float '401': $ref: '#/components/responses/Unauthorized' '402': $ref: '#/components/responses/PaymentRequired' /v1/reputation/history: get: operationId: getReputationHistory summary: Reputation history description: Get the reputation history for an agent. tags: - Reputation parameters: - name: agent_id in: query required: true schema: type: string description: Agent identifier security: - ApiKeyAuth: [] - X402PaymentProof: [] responses: '200': description: Reputation history content: application/json: schema: type: object properties: agent_id: type: string history: type: array items: type: object properties: interaction_type: type: string outcome: type: string timestamp: type: string format: date-time '401': $ref: '#/components/responses/Unauthorized' '402': $ref: '#/components/responses/PaymentRequired' components: responses: PaymentRequired: description: 'Payment required. Use x402 protocol: send USDC on Base L2, Polygon, or Solana to the treasury address provided in the response, then retry with the X-Payment-Proof header.' content: application/json: schema: type: object properties: error: type: string example: Payment required amount: type: string example: '0.002' currency: type: string example: USDC treasury: type: string description: Destination wallet address chains: type: array items: type: string example: - base - polygon - solana BadRequest: description: Invalid request body or missing required fields. content: application/json: schema: type: object properties: error: type: string Unauthorized: description: Missing or invalid API key. content: application/json: schema: type: object properties: error: type: string example: Unauthorized securitySchemes: ApiKeyAuth: type: apiKey in: header name: X-API-Key description: API key obtained from https://atomadic.tech/pay X402PaymentProof: type: apiKey in: header name: X-Payment-Proof description: Base64-encoded USDC payment proof for x402 autonomous payment flow (Base L2, Polygon, or Solana) AdminTokenAuth: type: apiKey in: header name: X-Admin-Token description: Admin token for privileged operations