{"uid":"cap_oCAffMvKTfm_bm-YC5j0p","slug":"x402-agentutility-d20-ability-check-resolver-4765520c","name":"x402 AgentUtility D20 Ability Check Resolver","description":"Resolves a d20 ability check, skill check, attack roll, or saving throw for tabletop RPGs. Rolls a d20 with an optional modifier and advantage/disadvantage, compares to a DC, and reports total, success/failure, and natural-20 / natural-1. Seedable. Use it as a d20 check resolver API for any RPG.","url":"https://x402.agentutility.ai/ability-check?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"required":[],"properties":{"dc":{"type":"number","description":"Difficulty class to beat. Omit to just get the roll."},"seed":{"type":"number","description":"Optional integer seed for a reproducible roll."},"modifier":{"type":"number","description":"Total bonus/penalty added to the d20 (-20..40). Default 0."},"advantage":{"type":"boolean","description":"Roll twice, take the higher."},"disadvantage":{"type":"boolean","description":"Roll twice, take the lower."}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"dc":{"type":"integer"},"mode":{"type":"string"},"total":{"type":"integer"},"success":{"type":"boolean"},"modifier":{"type":"integer"},"d20_rolls":{"type":"array","items":{"type":"integer"}},"natural_roll":{"type":"integer"},"critical_failure":{"type":"boolean"},"critical_success":{"type":"boolean"}}}}}}},"responseSchema":{"type":"json","example":{"dc":15,"mode":"advantage","total":20,"success":true,"modifier":5,"d20_rolls":[15,7],"natural_roll":15,"critical_failure":false,"critical_success":false}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_KY6_XDutSnd-EanSIW3Q6","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Resolves a d20 ability check, skill check, attack roll, or saving throw for tabletop RPGs, returning the roll total, success/failure against a DC, and natural-20/natural-1 flags.","exampleAgentPrompt":"Roll a d20 with a +5 modifier and advantage against a DC 14 for my ranger's Perception check — tell me if I succeed and whether it was a natural 20.","exampleUseCases":[{"title":"Combat attack roll resolution","prompt":"My fighter is attacking a goblin — roll a d20 with a +6 modifier against AC 13, with no advantage or disadvantage, and tell me if the attack hits or if I rolled a natural 20."},{"title":"Saving throw with disadvantage","prompt":"My wizard needs to make a Constitution saving throw against DC 12 with disadvantage and a +1 modifier — resolve the roll and tell me if they succeed or fail."},{"title":"Seeded skill check for replay","prompt":"Roll a Stealth check for my rogue with a +7 modifier against DC 15, no advantage or disadvantage, using seed 42 so we can reproduce the result — did they succeed?"}],"resultDescription":"Returns the raw d20 die value, the final total (die + modifier), whether the total meets or exceeds the DC (success or failure), and boolean flags for natural-20 and natural-1 outcomes. If advantage or disadvantage was applied, both dice values may be included.","failureModes":["Invalid modifier type returns a 400 validation error","DC value out of expected range may return an error","Missing required fields (e.g. no DC provided) causes a 422 unprocessable entity","Seed value conflicts or out-of-range inputs may return a 400 error","Network timeout on the x402 payment layer before the roll is resolved"],"whenToPreferThis":"Choose this endpoint when you need a verifiable, auditable, server-side d20 roll with optional modifier and advantage/disadvantage mechanics — especially for AI-driven TTRPG agents where client-side randomness is untrusted, or when you need seedable/reproducible rolls for GMing, testing, or dispute resolution. Prefer it over client-side dice rollers when you need canonical pass/fail adjudication against a DC in an automated workflow.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-20T00:53:35.921Z","isFirstParty":false,"canonicalSlug":"x402-agentutility-d20-ability-check-resolver-4765520c"}