openapi: 3.2.0 info: title: AAAA Nexus VRF 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: VRF description: Verifiable random function for gaming draws and verification paths: /v1/vrf/draw: post: operationId: vrfDraw summary: VRF Gaming draw (VRF-100) description: 'Verifiable random function draw for gaming applications. Fee: $0.01 + 0.5% of pot_value_usd.' tags: - VRF security: - ApiKeyAuth: [] - X402PaymentProof: [] requestBody: required: true content: application/json: schema: type: object required: - game_id - round - range_max - pot_value_usd properties: game_id: type: string round: type: integer range_max: type: integer pot_value_usd: type: number responses: '200': description: VRF draw result content: application/json: schema: type: object properties: draw_id: type: string value: type: integer proof: type: string verified: type: boolean '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '402': $ref: '#/components/responses/PaymentRequired' /v1/vrf/verify-draw: post: operationId: vrfVerifyDraw summary: VRF Verify draw (VRF-101) description: Verify a previous VRF draw. Included with draw fee. tags: - VRF security: - ApiKeyAuth: [] - X402PaymentProof: [] requestBody: required: true content: application/json: schema: type: object required: - draw_id - expected_value properties: draw_id: type: string expected_value: type: integer responses: '200': description: VRF verification result content: application/json: schema: type: object properties: draw_id: type: string valid: type: boolean expected_value: type: integer actual_value: type: integer '400': $ref: '#/components/responses/BadRequest' '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