# Trusted Agent Market Snapshot — Dice Roll (x402)

> Trusted Agent Market Snapshot — Dice Roll (x402) is a paid API for AI agents from trusted-x402.compose.land, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-10).

Rolls dice using standard notation (e.g. 2d6+3, 4d6kh3) and returns detailed per-roll breakdowns including kept/dropped dice and totals, paid via x402 micropayment.

## Facts

- Endpoint: POST https://trusted-x402.compose.land/v1/utilities/dice-roll?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/trusted-agent-market-snapshot-dice-roll-x402-9707800e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ZJw2v22FBJeFTygOTgRw-

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 trusted-agent-market-snapshot-dice-roll-x402-9707800e -d '<json body>'
```

Example prompt: Roll 4d6 keep highest 3, six times over, with seed 'hero42' so I can generate reproducible D&D character stats.

## When to prefer this

Choose this endpoint when you need a paid, auditable, server-side dice roll with full breakdown of kept/dropped dice and support for standard tabletop RPG notation (e.g. kh/kl keep mechanics, modifiers). Prefer it over client-side randomization when reproducibility via seed and a trusted third-party result are required. The x402 micropayment model makes it suitable for agent-to-agent or automated pipelines needing verifiable random outcomes.

## Known failure modes

- Invalid dice notation string returns a parse error
- Missing required 'notation' field returns 400-equivalent error
- Payment not provided or insufficient causes x402 payment-required response
- Unsupported notation modifiers may cause parsing failures
- Seed value mismatch or type error may return unexpected output

## How this service works

Agent-market demand snapshot API. Pay $0.01 USDC via x402 for category demand scores across defi, nft, infra, social, and analytics, or $0.03 per category for the named services behind it.

## Output

Returns a JSON object with the canonical notation string, parsed dice/sides/modifier breakdown, an array of per-roll results (each with all dice rolled, kept dice, dropped dice, subtotal, modifier, and total), the grand total across all rolls, a timestamp, and optional seed echo.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "notation"
 ],
 "properties": {
  "seed": {
   "type": "string",
   "description": "Optional seed for reproducible output."
  },
  "rolls": {
   "type": "integer",
   "description": "How many times to evaluate the expression. Default 1."
  },
  "notation": {
   "type": "string",
   "description": "Dice notation: [count]d<sides>[kh|kl<n>][+|-<mod>], e.g. 2d6+3, 4d6kh3, 2d20kl1. URL-encode + as %2B."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "generated_at",
  "notation",
  "parsed",
  "rolls_requested",
  "results",
  "grand_total",
  "meta"
 ],
 "properties": {
  "meta": {
   "type": "object"
  },
  "seed": {
   "type": [
    "string",
    "null"
   ]
  },
  "parsed": {
   "type": "object",
   "required": [
    "dice",
    "sides",
    "modifier"
   ],
   "properties": {
    "dice": {
     "type": "number"
    },
    "keep": {
     "type": [
      "object",
      "null"
     ],
     "properties": {
      "mode": {
       "enum": [
        "highest",
        "lowest"
       ],
       "type": "string"
      },
      "count": {
       "type": "number"
      }
     }
    },
    "sides": {
     "type": "number"
    },
    "modifier": {
     "type": "number"
    }
   }
  },
  "results": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "roll",
     "dice",
     "kept",
     "dropped",
     "subtotal",
     "modifier",
     "total"
    ],
    "properties": {
     "dice": {
      "type": "array",
      "items": {
       "type": "number"
      },
      "description": "Every die rolled."
     },
     "kept": {
      "type": "array",
      "items": {
       "type": "number"
      }
     },
     "roll": {
      "type": "number",
      "description": "1-based index of this evaluation."
     },
     "total": {
      "type": "number",
      "description": "subtotal + modifier."
     },
     "dropped": {
      "type": "array",
      "items": {
       "type": "number"
      },
      "description": "Dice discarded by kh/kl keep notation."
     },
     "modifier": {
      "type": "number"
     },
     "subtotal": {
      "type": "number",
      "description": "Sum of kept dice, before the modifier."
     }
    }
   }
  },
  "notation": {
   "type": "string",
   "description": "Canonical form of the parsed notation."
  },
  "grand_total": {
   "type": "number",
   "description": "Sum of every roll's total."
  },
  "generated_at": {
   "type": "string"
  },
  "notation_input": {
   "type": "string",
   "description": "Notation exactly as supplied."
  },
  "rolls_requested": {
   "type": "number"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/trusted-agent-market-snapshot-dice-roll-x402-9707800e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from trusted-x402.compose.land](https://www.zero.xyz/host/trusted-x402.compose.land/llms.txt)
