{
  "name": "RANDSUM API",
  "version": "v1",
  "description": "Roll dice in RANDSUM notation, roll for tabletop game systems, and draw random integers. Every endpoint is public, CORS-enabled and needs no key.",
  "docs": "https://randsum.dev/api/introduction/",
  "notation": "https://randsum.dev/spec/",
  "mcp": "https://api.randsum.dev/mcp",
  "endpoints": [
    {
      "path": "/v1/roll",
      "methods": [
        "GET",
        "POST"
      ],
      "description": "Roll RANDSUM dice, in short form (notation) or long form (the roll() options object: sides, quantity, modifiers). Optional integer seed for a reproducible roll.",
      "params": {
        "notation": "string: short form, e.g. 4d6L",
        "sides": "long form: integer",
        "quantity": "long form: integer, default 1",
        "modifiers.<name>[.<option>]": "long form, e.g. modifiers.drop.lowest=1",
        "seed": "integer, optional"
      },
      "example": "https://api.randsum.dev/v1/roll?notation=4d6L",
      "longformExample": "https://api.randsum.dev/v1/roll?sides=6&quantity=4&modifiers.drop.lowest=1"
    },
    {
      "path": "/v1/validate",
      "methods": [
        "GET",
        "POST"
      ],
      "description": "Check a roll without rolling, in short or long form. Valid rolls come back in both forms with a description; invalid ones with a fix.",
      "params": {
        "notation": "string, or the long-form fields /v1/roll takes"
      },
      "example": "https://api.randsum.dev/v1/validate?notation=2d20H%2B5"
    },
    {
      "path": "/v1/random",
      "methods": [
        "GET"
      ],
      "description": "Uniform random integers from min to max inclusive, from a cryptographic source. Up to 1000 per request.",
      "params": {
        "min": "integer, default 1",
        "max": "integer, default 100",
        "count": "integer, default 1"
      },
      "example": "https://api.randsum.dev/v1/random?min=1&max=6&count=3"
    },
    {
      "path": "/v1/games",
      "methods": [
        "GET"
      ],
      "description": "Supported game systems and the inputs each one takes.",
      "example": "https://api.randsum.dev/v1/games"
    },
    {
      "path": "/v1/games/{game}/roll",
      "methods": [
        "GET",
        "POST"
      ],
      "description": "Roll for a game system, interpreted by that game's rules.",
      "params": {
        "...": "the inputs /v1/games lists for that game"
      },
      "example": "https://api.randsum.dev/v1/games/blades/roll?rating=3"
    }
  ]
}