# Dice Notation Parser

> Dice Notation Parser is a paid API for AI agents from dice.openverbs.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-14).

Parses dice notation strings (e.g. '3d6+2', '4d6kh3', '2d20dl1') into structured terms describing dice count, sides, modifiers, and keep/drop rules

## Facts

- Endpoint: POST https://dice.openverbs.com/v1/parse
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/dice-notation-parser-6a199247
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ded6aq_G5ubjXso3AaaC-

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 dice-notation-parser-6a199247 -d '<json body>'
```

Example prompt: Can you parse the dice notation '4d6kh3' for me and break it down into its structured components — how many dice, which die type, and the keep-highest rule?

## When to prefer this

Use this endpoint when you need to validate or structurally decompose a dice notation string without actually rolling it. Ideal for game engines that need to parse user-submitted expressions before executing them, or for building editors and validators. If you also need the probability distribution or an actual roll result, use the sibling endpoints on dice.openverbs.com instead.

## Known failure modes

- Malformed or unrecognized dice notation returns HTTP 400 with a clean error
- Empty notation string rejected by schema (minLength:1)
- Unsupported notation syntax (e.g. non-standard extensions) may yield 400
- Network timeout or service unavailability

## How this service works

Parse dice notation such as "3d6+2", "4d6kh3" (keep highest 3) or "2d20dl1" (drop lowest 1) into structured terms. Malformed notation is a clean 400.

## Output

A structured breakdown of the dice notation including number of dice, die face count (e.g. d6, d20, d%), arithmetic modifiers (+/-), and any keep-highest or drop-lowest rules. Malformed input returns a clean 400 error.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "notation"
     ],
     "properties": {
      "notation": {
       "type": "string",
       "minLength": 1,
       "description": "Dice notation, e.g. \"3d6+2\", \"4d6kh3\", \"1d%\"."
      }
     },
     "additionalProperties": false
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/dice-notation-parser-6a199247/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from dice.openverbs.com](https://www.zero.xyz/host/dice.openverbs.com/llms.txt)
