{
  "openapi": "3.1.0",
  "info": {
    "title": "WizeB AI-Native Index API",
    "version": "1.2.0",
    "description": "The Enhanced AI-Native Index: a per-gap 90-day plan and a 2-hour live build session with the WizeB team, sold to AI agents over x402 (HTTP 402). Free Index questions: https://wizeb.com/ai-native-index/questions.json. MCP server: https://wizeb.com/mcp. Docs: https://wizeb.com/ai-native-index/agent-payments",
    "contact": {
      "name": "WizeB",
      "url": "https://wizeb.com",
      "email": "hello@wizeb.com"
    },
    "x-guidance": "Agents: run the free AI-Native Index first (questions at https://wizeb.com/ai-native-index/questions.json or the MCP server https://wizeb.com/mcp), then POST the 30 answers here with the user's name and email. The endpoint answers 402 with x402 requirements ($10 USDC on Base); pay from the agent's wallet and retry with PAYMENT-SIGNATURE. Ask the user before spending. No wallet? Tell the user and point them to https://cal.id/r/discovery \u2014 WizeB helps set one up."
  },
  "servers": [
    {
      "url": "https://wizeb.com"
    }
  ],
  "x-discovery": {
    "protocols": [
      "x402"
    ],
    "mcp": "https://wizeb.com/mcp"
  },
  "paths": {
    "/api/index/enhanced": {
      "post": {
        "operationId": "buyEnhancedIndexReport",
        "summary": "Buy the Enhanced AI-Native Index report ($10 USDC via x402)",
        "description": "Returns 402 with x402 payment requirements (PAYMENT-REQUIRED header) until a valid PAYMENT-SIGNATURE is attached. On settlement returns the score, tier, gaps, report_id and the 2-hour session code; the full plan is emailed as a PDF within ~2 minutes.",
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "10.00"
          },
          "networks": [
            "eip155:8453"
          ],
          "asset": "USDC"
        },
        "security": [
          {
            "x402": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "answers",
                  "name",
                  "email"
                ],
                "properties": {
                  "answers": {
                    "oneOf": [
                      {
                        "type": "array",
                        "minItems": 30,
                        "maxItems": 30,
                        "items": {
                          "type": "object",
                          "required": [
                            "id",
                            "option"
                          ],
                          "properties": {
                            "id": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 30
                            },
                            "option": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 5
                            }
                          }
                        }
                      },
                      {
                        "type": "string",
                        "pattern": "^[1-5]{30}$",
                        "description": "30 option digits"
                      }
                    ]
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 150
                  },
                  "company": {
                    "type": "string",
                    "maxLength": 120
                  }
                }
              },
              "example": {
                "answers": "232312423123321224313224321312",
                "name": "Jane Doe",
                "email": "jane@company.com",
                "company": "Company"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Paid \u2014 order created; PAYMENT-RESPONSE header carries the settlement receipt.",
            "content": {
              "application/json": {
                "example": {
                  "report_id": "znNT3lU3oHTjp4Ha",
                  "status": "paid",
                  "score": 33,
                  "tier": "Experimenter",
                  "session": {
                    "booking_url": "https://cal.id/r/discovery",
                    "code": "WZ-3F9A1C"
                  },
                  "status_url": "https://wizeb.com/api/index/enhanced?report=znNT3lU3oHTjp4Ha"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input (only checked once a payment is attached)."
          },
          "402": {
            "description": "Payment required \u2014 x402 requirements in the PAYMENT-REQUIRED header and JSON body (accepts[], message, help)."
          }
        }
      },
      "get": {
        "operationId": "enhancedIndexStatus",
        "summary": "Payment requirements (no query) or report status (?report=id)",
        "parameters": [
          {
            "name": "report",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "report_id from a paid order"
          },
          {
            "name": "pdf",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Download the PDF once status is done"
          }
        ],
        "responses": {
          "200": {
            "description": "Order status (status, plan summary, pdf_url, session code, receipt)."
          },
          "402": {
            "description": "No report id given \u2014 the x402 challenge."
          },
          "404": {
            "description": "Unknown report id."
          }
        },
        "security": []
      }
    }
  },
  "components": {
    "securitySchemes": {
      "x402": {
        "type": "apiKey",
        "in": "header",
        "name": "PAYMENT-SIGNATURE",
        "description": "x402 v2 payment payload (base64). See https://x402.org"
      }
    }
  }
}
