# AgentUtility Dice Roll

> AgentUtility Dice Roll is a paid API for AI agents from x402.agentutility.ai, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-13).

Evaluates standard dice notation expressions (XdY, modifiers, keep-highest/lowest) and returns detailed per-die results, totals, and optional reproducible seeded rolls.

## Facts

- Endpoint: POST https://x402.agentutility.ai/dice-roll
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentutility-dice-roll-0b7b6e77
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-KKzGvrpn79i_e87wdJhE

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agentutility-dice-roll-0b7b6e77 -d '<json body>'
```

Example prompt: Roll 4d6kh3 six times for my D&D character's ability scores — I want to see each individual die result and which ones were kept.

## When to prefer this

Choose this endpoint when you need server-side, auditable dice rolling with full transparency into individual die results, keep/drop mechanics, and optional seeded reproducibility — especially for tabletop RPG use cases requiring standard dice notation like XdY, kh/kl modifiers, and flat +/- modifiers. Prefer this over client-side random number generation when reproducibility or auditability matters.

## Known failure modes

- Invalid dice notation string returns a parse error
- rolls count outside 1-100 range returns a validation error
- Malformed request body returns HTTP 400
- Non-integer seed values may cause unexpected behavior
- Network timeout on rare occasions

## How this service works

Rolls dice from standard dice notation for tabletop RPGs. Evaluates XdY, flat modifiers (+/-), and keep-highest / keep-lowest (4d6kh3 for stat rolls, 2d20kh1 / 2d20kl1 for advantage/disadvantage). Returns each individual die, which were kept vs dropped, the per-roll total, and the grand total; roll the whole expression up to 100 times with 'rolls'. Pass 'seed' for reproducible output. Use it as a dice roller API, dice notation evaluator, or tabletop random roll engine.

## Output

Returns a structured JSON object containing the parsed notation, an array of roll results (each with individual dice values, kept dice, dropped dice, modifier, and per-roll total), the grand total across all rolls, and the possible min/max range of the expression.

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "range": {
   "max": 18,
   "min": 3
  },
  "rolls": [
   {
    "dice": [
     4,
     3,
     6,
     5
    ],
    "kept": [
     4,
     6,
     5
    ],
    "total": 15,
    "dropped": [
     3
    ],
    "modifier": 0
   }
  ],
  "parsed": {
   "keep": {
    "n": 3,
    "mode": "h"
   },
   "count": 4,
   "sides": 6,
   "modifier": 0
  },
  "notation": "4d6kh3",
  "grand_total": 15
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentutility-dice-roll-0b7b6e77/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.agentutility.ai](https://www.zero.xyz/host/x402.agentutility.ai/llms.txt)
