{
  "openapi": "3.1.0",
  "info": {
    "title": "Really Big Magnet Co. — Buy API",
    "version": "1.0.0",
    "description": "Really Big Magnet Co. sells exactly one product: The Magnet (🧲), $0.50 per purchase. A paid call to /buy returns the JSON message \"you bought a magnet!\" plus one magnet emoji. That is the entire product. Call /buy through the pay-per-use gateway at https://agents.reallybigmagnet.com — an unpaid call there returns a 402 payment challenge you can settle with x402 (Base USDC), MPP, or card, then retry with proof attached. No API key, no signup. The origin (https://api.reallybigmagnet.com) only serves requests already charged and signed by the gateway; direct calls return 402.",
    "contact": {
      "name": "Really Big Magnet Co.",
      "email": "sales@reallybigmagnet.com",
      "url": "https://www.reallybigmagnet.com/"
    }
  },
  "servers": [
    {
      "url": "https://agents.reallybigmagnet.com",
      "description": "Pay-per-use gateway — call /buy here (handles payment, then forwards)"
    },
    {
      "url": "https://api.reallybigmagnet.com",
      "description": "Origin — serves only gateway-forwarded (already paid) requests"
    }
  ],
  "externalDocs": {
    "url": "https://www.reallybigmagnet.com/",
    "description": "Store website"
  },
  "paths": {
    "/buy": {
      "post": {
        "operationId": "buyMagnet",
        "summary": "Buy one magnet ($0.50)",
        "description": "Buys one magnet for $0.50. The response says \"you bought a magnet!\" and gives you a magnet emoji back (🧲). No request body is required. Unpaid calls receive a 402 payment challenge (settle via x402, MPP, or card and retry).",
        "responses": {
          "200": {
            "description": "You bought a magnet. $0.50 was charged.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "message",
                    "magnet"
                  ],
                  "properties": {
                    "message": {
                      "type": "string",
                      "const": "you bought a magnet!"
                    },
                    "magnet": {
                      "type": "string",
                      "const": "🧲",
                      "description": "Your magnet."
                    },
                    "receipt": {
                      "type": "object",
                      "properties": {
                        "sku": {
                          "type": "string"
                        },
                        "priceUsd": {
                          "type": "number"
                        },
                        "zcRequestId": {
                          "type": "string",
                          "description": "ZeroClick correlation id for this purchase."
                        }
                      }
                    }
                  }
                },
                "example": {
                  "message": "you bought a magnet!",
                  "magnet": "🧲",
                  "receipt": {
                    "sku": "RBM-1",
                    "priceUsd": 0.5,
                    "zcRequestId": "zcreq_example"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Forwarded request whose ZeroClick signature failed verification."
          },
          "402": {
            "description": "Payment required. Via the gateway this is a signed payment challenge (x402 / MPP / card); from the origin it points you at the gateway."
          }
        }
      },
      "get": {
        "operationId": "buyMagnetGet",
        "summary": "Buy one magnet ($0.50)",
        "description": "Buys one magnet for $0.50. The response says \"you bought a magnet!\" and gives you a magnet emoji back (🧲). No request body is required. Unpaid calls receive a 402 payment challenge (settle via x402, MPP, or card and retry).",
        "responses": {
          "200": {
            "description": "You bought a magnet. $0.50 was charged.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "message",
                    "magnet"
                  ],
                  "properties": {
                    "message": {
                      "type": "string",
                      "const": "you bought a magnet!"
                    },
                    "magnet": {
                      "type": "string",
                      "const": "🧲",
                      "description": "Your magnet."
                    },
                    "receipt": {
                      "type": "object",
                      "properties": {
                        "sku": {
                          "type": "string"
                        },
                        "priceUsd": {
                          "type": "number"
                        },
                        "zcRequestId": {
                          "type": "string",
                          "description": "ZeroClick correlation id for this purchase."
                        }
                      }
                    }
                  }
                },
                "example": {
                  "message": "you bought a magnet!",
                  "magnet": "🧲",
                  "receipt": {
                    "sku": "RBM-1",
                    "priceUsd": 0.5,
                    "zcRequestId": "zcreq_example"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Forwarded request whose ZeroClick signature failed verification."
          },
          "402": {
            "description": "Payment required. Via the gateway this is a signed payment challenge (x402 / MPP / card); from the origin it points you at the gateway."
          }
        }
      }
    }
  }
}