{"openapi":"3.1.0","info":{"title":"Endgame Simulations — headless API","version":"1.0.0","description":"Endgame Simulations sells rehearsal distributions: frequencies are shares of rehearsals ending in each outcome under stated scenario assumptions and a stated world snapshot. They are exploration of plausible dynamics, NOT forecasts of real-world events. Payloads carry k-of-N bases and IC likelihood bands, never point probabilities of real events.\n\nAuthentication: `Authorization: Bearer plk_live_…` (org admins issue keys in Settings → API keys; prepaid agent accounts via hello@endgamesimulations.com). Billing is a prepaid wallet in integer cents. Commissions hold at launch and settle on completion; errored runs are on the house. Poll at >=60s intervals or hold the SSE stream; the 202 body carries estimated_minutes and queue_position."},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","bearerFormat":"plk_live_..."}}},"security":[{"apiKey":[]}],"paths":{"/api/pricing":{"get":{"summary":"Prices and plans (no auth)","description":"The single pricing source of truth, headless SKUs included once the surface is live."}},"/api/v2/wallet":{"get":{"summary":"Wallet balance, billing mode and ledger tail","description":"Scope: read. Minimum first top-up $250 (concierge, H1)."}},"/api/v2/campaigns":{"post":{"summary":"Commission a swarm — the unit of sale","description":"Scope: commission. Body: {scenario, mode: 'swarm', run_count, max_ticks, tier}. Two shapes: standard (3 runs x 12 ticks, ultra) $49, ~35 min; flagship (tier: 'sovereign' — 5 runs x 15 ticks) $129, ~64 min. Returns 202 with estimated_minutes, queue_position (an honest approximation) and a poll URL. Send an Idempotency-Key header — a retrying agent must never double-spend. One active commission per key. One run is an anecdote; a distribution requires N — the swarm is the unit of sale.","responses":{"202":{"description":"Launched (or replayed idempotently)"},"402":{"description":"Insufficient wallet balance. The body says exactly what to do: price_usd, balance_usd, topup_url, docs_url."},"429":{"description":"Key already has an active commission — Retry-After set"}}}},"/api/v2/campaigns/{id}":{"get":{"summary":"Poll a commission","description":"Scope: read. Poll at >=60s intervals or hold the SSE stream; the 202 body carries estimated_minutes and queue_position."}},"/api/v2/campaigns/{id}/assessment":{"get":{"summary":"The assessment brief (schema-validated JSON)","description":"Scope: read. key_judgments with IC bands and k/N basis, outcome_landscape, indicators, trajectory, probability_matrix, code-verified Wilson intervals, code-owned limitations. .md and .html siblings exist."}},"/api/v2/simulations":{"post":{"summary":"One exploratory run (scenario-shaping)","description":"Scope: commission. $15, up to 12 ticks. One run is an anecdote — commission a swarm for a distribution.","responses":{"402":{"description":"Insufficient wallet balance. The body says exactly what to do: price_usd, balance_usd, topup_url, docs_url."}}}},"/api/v2/simulations/{id}/stream":{"get":{"summary":"SSE event stream (replayable)","description":"Scope: read. ?access_token=plk_… works where headers cannot; Last-Event-ID resumes."}},"/api/v2/simulations/{id}/chat":{"post":{"summary":"War Room interrogation of a run","description":"Scope: chat. Body: {message, history}. Wallet orgs: 25 messages included per commission, 10 per single run, then $0.50 per message. The reply carries the meter.","responses":{"402":{"description":"Insufficient wallet balance. The body says exactly what to do: price_usd, balance_usd, topup_url, docs_url."}}}}}}