{
  "openapi": "3.1.0",
  "info": {
    "title": "Sumbloom Puzzles API",
    "version": "1.1.0",
    "description": "Paid API keys from $5/month (Starter: 10,000 puzzles a month); free tier 50 puzzles a day per IP with no key. Buy: https://sumbloom.cybermaxtools.com/buy/starter?s=lead · all plans: https://sumbloom.cybermaxtools.com/docs#pricing\n\nPricing: free tier 50 puzzles/day per IP, no key. Paid API keys: Starter $5/month = 10,000 puzzles/month; Pro $15/month = 100,000 puzzles/month; Starter yearly $50/year = 10,000 puzzles/month; Pro yearly $150/year = 100,000 puzzles/month. Get a key: https://sumbloom.cybermaxtools.com/docs#pricing\n\nOriginal number puzzles (Target, Cage Grid, Brick Pyramid) as JSON or printable SVG, with solutions. Free tier without a key (50 puzzles a day, 30/min per IP). By CyberMax.",
    "contact": {
      "name": "CyberMax",
      "url": "https://cybermax-tools-cybermax.static.hf.space/"
    },
    "x-x402": {
      "protocol": "x402",
      "versions": [
        1,
        2
      ],
      "scheme": "exact",
      "network": [
        "base",
        "eip155:8453"
      ],
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "currency": "USDC",
      "price": {
        "perCallUsd": 0.002
      },
      "payPerCallEndpoints": [
        "/x402/v1/puzzle",
        "/x402/v1/puzzle.svg"
      ],
      "alsoOn": "the plain endpoints answer 402 with the same terms once the free daily quota is used up (no key sent)",
      "headers": {
        "request": [
          "X-PAYMENT (v1)",
          "PAYMENT-SIGNATURE (v2)"
        ],
        "response": [
          "X-PAYMENT-RESPONSE",
          "PAYMENT-RESPONSE"
        ]
      }
    },
    "license": {
      "name": "Proprietary (free tier + paid API keys)",
      "identifier": "LicenseRef-CyberMax"
    },
    "x-pricing": {
      "api": "Sumbloom API",
      "currency": "USD",
      "free": {
        "price": 0,
        "callsPerDayPerIp": 50,
        "perMinutePerIp": 30,
        "key": "none needed"
      },
      "plans": [
        {
          "id": "starter",
          "name": "Starter",
          "price": 5,
          "billing": "per month",
          "calls": 10000,
          "per": "calendar month (UTC)",
          "perMinute": 60,
          "buy": "https://sumbloom.cybermaxtools.com/buy/starter?s=openapi"
        },
        {
          "id": "pro",
          "name": "Pro",
          "price": 15,
          "billing": "per month",
          "calls": 100000,
          "per": "calendar month (UTC)",
          "perMinute": 120,
          "buy": "https://sumbloom.cybermaxtools.com/buy/pro?s=openapi"
        },
        {
          "id": "starter-yearly",
          "name": "Starter yearly",
          "price": 50,
          "billing": "per year",
          "calls": 10000,
          "per": "calendar month (UTC)",
          "perMinute": 60,
          "buy": "https://sumbloom.cybermaxtools.com/buy/starter-yearly?s=openapi"
        },
        {
          "id": "pro-yearly",
          "name": "Pro yearly",
          "price": 150,
          "billing": "per year",
          "calls": 100000,
          "per": "calendar month (UTC)",
          "perMinute": 120,
          "buy": "https://sumbloom.cybermaxtools.com/buy/pro-yearly?s=openapi"
        }
      ],
      "unit": "puzzles",
      "howToUse": {
        "header": "x-api-key: YOUR_KEY",
        "alt": [
          "Authorization: Bearer YOUR_KEY",
          "?key=YOUR_KEY"
        ],
        "mcp": "send the key as Authorization: Bearer YOUR_KEY",
        "usage": "https://sumbloom.cybermaxtools.com/key"
      },
      "manageKey": "https://sumbloom.cybermaxtools.com/manage",
      "payments": "Stripe Checkout: card, Apple Pay, Google Pay, Link; sales tax/VAT handled by Stripe. Cancel any time at https://sumbloom.cybermaxtools.com/manage."
    }
  },
  "servers": [
    {
      "url": "https://sumbloom.cybermaxtools.com"
    },
    {
      "url": "https://sumbloom.cybermax-tools.workers.dev"
    }
  ],
  "paths": {
    "/v1/puzzle": {
      "get": {
        "operationId": "getPuzzle",
        "summary": "Get a number puzzle as JSON",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "target",
                "cage",
                "pyramid"
              ],
              "default": "cage"
            }
          },
          {
            "name": "level",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "easy",
                "medium",
                "hard"
              ],
              "default": "easy"
            }
          },
          {
            "name": "seed",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Same seed = same puzzle. Omit for random."
          },
          {
            "name": "daily",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "Today's puzzle (UTC)."
          },
          {
            "name": "solution",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Puzzle",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Bad type or level"
          },
          "401": {
            "description": "Invalid or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Free tier used up (50/day per IP) or rate/plan limit reached; the body has an upgrade link."
          }
        }
      }
    },
    "/v1/puzzle.svg": {
      "get": {
        "operationId": "getPuzzleSvg",
        "summary": "Get a number puzzle as a printable SVG image",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "target",
                "cage",
                "pyramid"
              ],
              "default": "cage"
            }
          },
          {
            "name": "level",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "easy",
                "medium",
                "hard"
              ],
              "default": "easy"
            }
          },
          {
            "name": "seed",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Same seed = same puzzle. Omit for random."
          },
          {
            "name": "daily",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "Today's puzzle (UTC)."
          },
          {
            "name": "solution",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "SVG",
            "content": {
              "image/svg+xml": {}
            }
          },
          "401": {
            "description": "Invalid or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/mcp": {
      "post": {
        "operationId": "mcp",
        "summary": "Remote MCP server (streamable HTTP, JSON-RPC 2.0): tool get_number_puzzle",
        "responses": {
          "200": {
            "description": "JSON-RPC response"
          },
          "401": {
            "description": "Invalid or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/x402/v1/puzzle": {
      "get": {
        "operationId": "getPuzzlePayPerCall",
        "summary": "Get a number puzzle as JSON (pay per call in USDC via x402, no key)",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "target",
                "cage",
                "pyramid"
              ],
              "default": "cage"
            }
          },
          {
            "name": "level",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "easy",
                "medium",
                "hard"
              ],
              "default": "easy"
            }
          },
          {
            "name": "seed",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Same seed = same puzzle. Omit for random."
          },
          {
            "name": "daily",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "Today's puzzle (UTC)."
          },
          {
            "name": "solution",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Puzzle",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Bad type or level"
          },
          "401": {
            "description": "Invalid or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required: x402 payment requirements (body: x402Version 1 accepts[]; header PAYMENT-REQUIRED: x402 v2)."
          }
        },
        "description": "Pay per call with x402: $0.002 per call in USDC on Base. No key, no account: an unpaid call returns 402 with the payment requirements; retry with the X-PAYMENT (x402 v1) or PAYMENT-SIGNATURE (v2) header.",
        "security": [],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.002"
          },
          "protocols": [
            {
              "x402": {
                "version": [
                  1,
                  2
                ],
                "network": [
                  "base",
                  "eip155:8453"
                ],
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "scheme": "exact"
              }
            }
          ]
        }
      }
    },
    "/x402/v1/puzzle.svg": {
      "get": {
        "operationId": "getPuzzleSvgPayPerCall",
        "summary": "Get a number puzzle as a printable SVG image (pay per call in USDC via x402, no key)",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "target",
                "cage",
                "pyramid"
              ],
              "default": "cage"
            }
          },
          {
            "name": "level",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "easy",
                "medium",
                "hard"
              ],
              "default": "easy"
            }
          },
          {
            "name": "seed",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Same seed = same puzzle. Omit for random."
          },
          {
            "name": "daily",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "Today's puzzle (UTC)."
          },
          {
            "name": "solution",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "SVG",
            "content": {
              "image/svg+xml": {}
            }
          },
          "401": {
            "description": "Invalid or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required: x402 payment requirements (body: x402Version 1 accepts[]; header PAYMENT-REQUIRED: x402 v2)."
          }
        },
        "description": "Pay per call with x402: $0.002 per call in USDC on Base. No key, no account: an unpaid call returns 402 with the payment requirements; retry with the X-PAYMENT (x402 v1) or PAYMENT-SIGNATURE (v2) header.",
        "security": [],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.002"
          },
          "protocols": [
            {
              "x402": {
                "version": [
                  1,
                  2
                ],
                "network": [
                  "base",
                  "eip155:8453"
                ],
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "scheme": "exact"
              }
            }
          ]
        }
      }
    }
  },
  "externalDocs": {
    "description": "Get an API key (pricing)",
    "url": "https://sumbloom.cybermaxtools.com/docs#pricing"
  },
  "components": {
    "securitySchemes": {
      "ApiKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key",
        "description": "Optional. Paid plan key from https://sumbloom.cybermaxtools.com/docs#pricing; leave out for the free tier."
      },
      "BearerKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "Same key as a Bearer token."
      }
    }
  },
  "security": [
    {},
    {
      "ApiKeyHeader": []
    },
    {
      "BearerKey": []
    }
  ]
}