{"uid":"cap_1NdM769jxtvNXp1GwPaUG","slug":"d-d-5e-loot-generator-api-45698f90","name":"D&D 5e Loot Generator API","description":"Loot generator / treasure generator API for D&D 5e. Rolls coins (and, for hoards, gems/art objects and a magic-item slot) scaled by a challenge-rating band. SRD-style treasure math (OGL 1.0a / CC-BY-4.0). Seedable.","url":"https://x402.agentutility.ai/loot-gen","method":"POST","headers":{},"bodySchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"input":{"type":"object","properties":{"type":{"type":"string","const":"http"},"method":{"type":"string","enum":["POST"]},"bodyType":{"type":"string","enum":["json","form-data","text"]},"body":{"properties":{"challenge_rating":{"type":"number","description":"Encounter/monster CR (0-30) to scale the treasure. Default 1."},"hoard":{"type":"boolean","description":"Generate a treasure hoard (coins + gems/art + magic items) instead of individual coins."},"seed":{"type":"number","description":"Optional integer seed for reproducible loot."}},"required":[]}},"required":["type","method","bodyType","body"],"additionalProperties":false},"output":{"type":"object","properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"challenge_rating":{"type":"integer"},"type":{"type":"string"},"coins":{"type":"object","properties":{"gp":{"type":"integer"},"pp":{"type":"integer"}}},"approx_total_gp":{"type":"integer"},"valuables":{"type":"array","items":{"type":"string"}},"magic_items":{"type":"array","items":{"type":"string"}}}}},"required":["type"]}},"required":["input"]},"responseSchema":{"type":"json","example":{"type":"hoard","coins":{"gp":1500,"pp":90},"valuables":["jade","silver ewer"],"magic_items":["potion of greater healing"],"approx_total_gp":3409,"challenge_rating":8}},"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_UoLW34ZDikDfV-d5tdpdP","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":"Generates SRD-compliant D&D 5e treasure (coins, gems, art objects, magic items) scaled by challenge-rating band, with optional seeding for reproducibility","exampleAgentPrompt":"Roll me a full treasure hoard for a CR 11 D&D 5e encounter — include coins, gems, art objects, and a magic item slot, and use seed 42 so I can reproduce it later.","exampleUseCases":[{"title":"Random loot drop for wandering monsters","prompt":"Generate individual treasure for a group of CR 2 bandits my party just defeated — just coins, no hoard."},{"title":"Dragon hoard for a published module","prompt":"I need a reproducible treasure hoard for a CR 17 ancient dragon — roll coins, gems, art objects, and a magic item using seed 8675309 so the same result comes up every time I run this session."},{"title":"Balanced loot across a dungeon level","prompt":"Roll loot for a CR 5 hoard encounter in my dungeon — give me the full breakdown of gold, gems, art objects, and what magic item slot it generates."}],"resultDescription":"Returns a structured breakdown of treasure: coin denominations (CP, SP, EP, GP, PP) rolled according to 5e SRD tables for the specified CR band; for hoard requests, also includes gem and art object tables plus a rolled magic item slot. Results are deterministic when a seed is provided.","failureModes":["Invalid or out-of-range challenge rating band returns a 400 error","Payment not settled (x402 USDC payment failure) results in a 402 response and no loot generated","Missing required POST body fields return validation errors","Non-numeric seed value may be rejected or ignored depending on implementation"],"whenToPreferThis":"Choose this endpoint when you need SRD-compliant, mathematically scaled D&D 5e treasure generation — especially when reproducibility via seeding matters (e.g. published modules or automated campaign tools). Prefer it over manual table lookups or LLM-improvised loot when consistency with the 5e treasure math is required. Best for agents running tabletop automation workflows, virtual tabletop (VTT) integrations, or game-master assistant bots.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T01:00:26.916Z","isFirstParty":false}