{"version":1,"endpoints":[{"method":"GET","path":"/api","summary":"health check","scenario":{"use":"when you want a quick check that the API is up.","returns":"a tiny `{ hello: \"set world\" }` payload."}},{"method":"GET","path":"/api/spec","summary":"this document","scenario":{"use":"when you want to discover every endpoint without reading source.","returns":"the full surface map: method, path, query params, a one-line summary, and a two-line scenario per endpoint."}},{"method":"GET","path":"/api/skill","summary":"agent-readable skill (markdown with YAML frontmatter) describing how to use the API; also reachable at /skill, /skill.md, /.well-known/skill, /.well-known/skill.md, /llms.txt","scenario":{"use":"when an agent (or human) wants a one-page how-to that wraps every endpoint with usage patterns, recipes, and examples.","returns":"a single markdown document with YAML frontmatter (name, description, spec URL, license, canonical paths) — Content-Type: text/markdown."}},{"method":"GET","path":"/api/stats","summary":"canonical 9 base stats and inclusive [min, max] bounds","scenario":{"use":"when you need the canonical stat order before sending stats to /api/attributes or /api/drop.","returns":"the nine base stats (strength, dexterity, intelligence, wisdom, agility, vitality, perception, resolve, luck) and their inclusive [min, max] bounds. Derived attributes (clarity, initiative, reflexes, accuracy-style channels, max health, etc.) are computed from the 5 primaries — see /api/attributes/spec."}},{"method":"GET","path":"/api/slots","summary":"equipment slots, per-slot capacity, derived-attribute domain (affects), and canonical iteration order","scenario":{"use":"when you want to render a loadout layout or learn which derived attributes a slot influences.","returns":"every equipment slot in canonical order with its capacity (hand and finger hold two; everything else holds one) and its derived-attribute domain."}},{"method":"GET","path":"/api/skills","summary":"all skills","scenario":{"use":"when you want the full skills table.","returns":"every skill name and weight; characters draw 1 to 4 skills from this pool."}},{"method":"GET","path":"/api/advantages","summary":"all advantages","scenario":{"use":"when you want the full advantages table to seed a trait picker.","returns":"every advantage as raw weighted-table entries; pair with /api/traits/impact to score one."}},{"method":"GET","path":"/api/disadvantages","summary":"all disadvantages","scenario":{"use":"when you want the full disadvantages table to seed a trait picker.","returns":"every disadvantage as raw weighted-table entries; pair with /api/traits/impact to score one."}},{"method":"GET","path":"/api/roll/item","summary":"roll a fresh item including a single-row breakdown matching /api/roll/set orbBreakdown shape ({ slot, affects, items: [{ name, orbValue, tier, scoreTier, score, tierName, material }] })","scenario":{"use":"when you want a single fresh item with no orb cost — equivalent to /api/craft?orbs=1 for free.","returns":"the item enriched with score, scoreTier, floored tier, tierName, orbValue, material envelope, and a one-row breakdown matching /api/roll/set."}},{"method":"GET","path":"/api/roll/set","summary":"roll a full equipment set with aggregate orbValue and per-slot orbBreakdown ({ slot, affects, items: [{ name, orbValue, tier, scoreTier, score, tierName, material }] })","scenario":{"use":"when you want to outfit something with a full equipment set in one call.","returns":"the 15-item equipment object plus an aggregate orbValue and a per-slot orbBreakdown walked in canonical slot order."}},{"method":"GET","path":"/api/roll/character","summary":"roll a full character including equipmentOrbValue and equipmentOrbBreakdown ({ slot, affects, items: [{ name, orbValue, tier, scoreTier, score, tierName, material }] })","scenario":{"use":"when you want a complete playable character in a single call.","returns":"base stats, modifiedStats (after trait deltas), enriched equipment, equipmentOrbValue and equipmentOrbBreakdown, traits with impacts, and the twenty derived attributes."}},{"method":"GET","path":"/api/rarity","query":"indexes | rolls","summary":"score and tier an item","scenario":{"use":"when you have an item's index or roll vector and need its rarity score, tier, probability, and per-factor breakdown.","returns":"score, scoreTier, floored tier, probability, orbValue, the rolled material envelope, and the per-factor contribution sorted by −log10(p)."}},{"method":"GET","path":"/api/rarity/tiers","summary":"tier definitions and measured shares","scenario":{"use":"when you want to label a rarity score (Common, Uncommon, Rare, Epic, Legendary, Mythic, Godly).","returns":"the seven tier definitions with R-range cutoffs and the §2 measured shares from a 200k Monte Carlo."}},{"method":"GET","path":"/api/craft/cost","query":"tier=1..7","summary":"orb cost to floor at tier","example":"/api/craft/cost?tier=5","scenario":{"use":"when you want the up-front orb price to floor a craft at a given tier (1, 5, 25, 125, 625, 3125, 15625).","returns":"the orb cost and the rejection-sampling budget the server applies before giving up."}},{"method":"GET","path":"/api/craft","query":"tier=1..7 | orbs=N, seed?, budget?","summary":"rejection-sample to tier or best-of-N lottery","example":"/api/craft?orbs=125","scenario":{"use":"when you want to spend orbs — either rejection-sample to a target tier (tier=1..7) or run a best-of-N lottery (orbs=N).","returns":"the resulting item, score, scoreTier, floored tier, tierName, and material envelope, plus attempts/capped (tier mode) or rolls/rollsExpected (orb mode)."}},{"method":"GET","path":"/api/boost/cost","query":"from=8..23, to=9..24","summary":"orb cost to push a stat across [from, to]","example":"/api/boost/cost?from=14&to=18","scenario":{"use":"when you want to price a stat upgrade across [from, to] inside the 8 to 24 range.","returns":"the total orbs and the per-step breakdown; the full 8 to 24 climb costs 53,337 orbs."}},{"method":"GET","path":"/api/drop","query":"stats=9-ints, class, seed?, override?","summary":"price the orb drop for an enemy","example":"/api/drop?stats=12-14-10-11-13-16-12-14-11&class=elite","scenario":{"use":"when you want to price the orb drop for a kill.","returns":"the rolled orb amount given the enemy stats, encounter class multiplier, variance, and any optional override."}},{"method":"GET","path":"/api/drop/classes","summary":"encounter classes (trash/veteran/elite/boss/world-boss) and their drop multipliers","scenario":{"use":"when you want the canonical list of encounter classes before calling /api/drop.","returns":"trash, veteran, elite, boss, and world-boss with their drop multipliers (1, 3, 10, 50, 250)."}},{"method":"GET","path":"/api/traits/impact","query":"name, kind=advantage|disadvantage","summary":"deterministic FNV-1a-derived trait modifier","scenario":{"use":"when you have a single trait name and need its deterministic stat modifier without paging through every advantage or disadvantage.","returns":"the FNV-1a-derived `{primary, primaryDelta, secondary?, secondaryDelta?, tier}` impact for that name and kind."}},{"method":"GET","path":"/api/traits/impacts","query":"kind=advantage|disadvantage","summary":"precomputed bulk trait impact map","example":"/api/traits/impacts?kind=advantage","scenario":{"use":"when you want every trait pre-scored as a stat modifier — flip kind to disadvantage for the negative pool.","returns":"a deterministic FNV-1a-derived impact per name with its tier (1-4) and primary or secondary stat deltas."}},{"method":"GET","path":"/api/attributes","query":"stats=9-ints","summary":"derive 23 attributes from the 5 primary stats (other 4 are passed through but unused)","example":"/api/attributes?stats=14-12-10-11-13-16-12-14-11","scenario":{"use":"when you want to expand stats into health, damage, speed, dodge, and the rest of the twenty derived attributes.","returns":"each attribute with its computed value; pair with /api/attributes/spec for the formulas."}},{"method":"GET","path":"/api/attributes/spec","summary":"attribute formula spec","scenario":{"use":"when you want the formula behind every derived attribute (base, primary stat, primary coefficient, secondary stat, secondary coefficient).","returns":"the full attribute spec so a client can recompute attributes locally without calling /api/attributes."}}]}