API & Data Indexes
war-on-disease, 1-percent-treaty, medical-research, public-health, peace-dividend, decentralized-trials, dfda, dih, victory-bonds, health-economics, cost-benefit-analysis, clinical-trials, drug-development, regulatory-reform, military-spending, peace-economics, decentralized-governance, wishocracy, blockchain-governance, impact-investing
This page documents the data indexes and APIs available for programmatic access to the book’s content, parameters, images, and chat functionality.
Search Index
URL: /assets/json/search-index.json
Full-text search index generated from all 76 chapters in the manual. Used by the chat widget for retrieval-augmented generation (RAG). Each entry includes resolved parameter values, section headings, and structured metadata for every referenced calculation.
Entry schema:
{
"path": "knowledge/solution/1-percent-treaty.qmd",
"url": "/solution/1-percent-treaty.html",
"title": "A 1% Treaty",
"description": "Each nation redirects 1% of military spending...",
"tags": ["1-percent-treaty", "military-spending"],
"sections": ["The Treaty", "Funding", "Why It Works"],
"published": true,
"lastmod": "2026-03-20",
"text": "Full chapter text with variables resolved to display values...",
"parameters": {
"treaty_annual_funding": {
"display": "$27.2B",
"href": "/knowledge/appendix/parameters-and-calculations.html#sec-treaty_annual_funding",
"formula": "MILITARY_SPENDING * 1%",
"source_ref": "",
"source_type": "calculated",
"confidence": "high",
"unit": "USD/year",
"latex": "$$\\begin{gathered}Funding_{treaty} = Spending_{mil} \\times 1\\% = \\$27.2B\\end{gathered}$$"
}
},
"figures": [
{
"path": "assets/images/1-percent-treaty/treaty-flow-diagram.jpg",
"caption": "How the 1% Treaty funds flow from military budgets to clinical trials"
}
]
}Parameter metadata fields:
| Field | Description |
|---|---|
display |
Rendered value (e.g. “$27.2B”) |
href |
Link to calculation details page |
formula |
Human-readable formula |
source_ref |
BibTeX citation key for external sources |
source_type |
external (cited data), calculated (derived), or definition (assumption) |
confidence |
high, medium, or low |
unit |
Parameter unit (USD, rate, multiplier, etc.) |
latex |
Full LaTeX equation with intermediate steps |
Image Index
URL: /assets/image-index.json
Catalog of 2,757 images with dimensions, semantic types, keywords, and descriptions. Used by the chat widget to show relevant figures alongside responses.
Entry schema:
{
"path": "assets/images/1-percent-treaty/treaty-flow-diagram.jpg",
"filename": "treaty-flow-diagram.jpg",
"extension": "jpg",
"sizeBytes": 187508,
"size": "183.1 KB",
"width": 1248,
"height": 832,
"format": "jpeg",
"aspectRatio": "3:2",
"modified": "2026-03-16T01:52:55.946Z",
"imageType": "infographic",
"style": "bw-academic",
"title": "Treaty Fund Flow",
"description": "How military budget redirections flow through the DIH",
"keywords": ["treaty", "funding", "flow", "military", "clinical trials"]
}Image types: cover, icon, og, chart, infographic, slide, other
Sites Metadata
URL: /assets/json/sites-metadata.json
Publication manifest for all 19 research papers and sites in the project. Includes abstracts, DOIs, PDF download URLs, page counts, and publishing status across platforms.
Top-level schema:
{
"totalSites": 19,
"totalPages": 145,
"sites": [
{
"id": "1-pct-treaty-impact",
"title": "The 1% Treaty: An Incentive-Compatible Approach to Ending War and Disease",
"siteUrl": "https://manual.warondisease.org/knowledge/economics/1-pct-treaty-impact.html",
"pdfUrl": "https://...",
"doi": "10.5281/zenodo.14827947",
"abstract": "...",
"keywords": ["war-on-disease", "1-percent-treaty", "clinical-trials"],
"pageCount": 42,
"publishing": { "...platform status..." }
}
]
}Chat API
Base URL: https://transmit.warondisease.org
POST /api/chat
Streaming chat endpoint. Responds as Wishonia (an alien observer teaching humans about the plan).
Request:
{
"question": "How does the 1% treaty work?",
"context": "Optional RAG context from search index",
"history": [
{"role": "user", "content": "Previous question"},
{"role": "assistant", "content": "Previous answer"}
]
}Response: Streaming text/plain (chunks arrive as they’re generated).
For best results, include RAG context from the search index. The chat widget does this automatically using client-side TF-IDF scoring.
POST /api/tts
Text-to-speech using Gemini TTS with the Kore voice.
Request:
{
"text": "Text to convert to speech"
}Response: audio/wav
GET /api/voice-token
Returns credentials for the Gemini Live API WebSocket connection (bidirectional voice chat).
Response:
{
"key": "API key for WebSocket connection"
}Help Your Visitors Learn How to End War and Disease
150,000 people die from preventable diseases every day. The plan to fix this exists, but most people don’t know about it yet. You can change that by adding Wishonia to your website.
Wishonia Love, CEO and President of Universe Optimization Services, teaches your visitors how to help end war and disease, starting with the 1% Treaty1 2 (redirecting 1% of global military spending to clinical trials). She answers questions, explains the math, cites sources, and shows relevant charts. Every conversation is one more person who understands how to end the largest unnecessary cause of death on the planet.
Embed the Chat Widget
Add three lines of HTML to any website. A floating chat bubble appears in the bottom-right corner. No API key, no server setup, no framework required.
<link rel="stylesheet" href="https://transmit.warondisease.org/assets/css/chat-widget.css">
<meta name="dih-api-base" content="https://transmit.warondisease.org">
<script src="https://transmit.warondisease.org/assets/js/chat-widget.js" defer></script>Your visitors can ask about the treaty, the economics, the governance model, or why humanity spends 604 times more on killing capacity than testing medicines. Every answer is grounded in peer-reviewed research with linked sources.
Why Organizations Should Embed This
The Earth Optimization Prize3 has two targets by 2040: global HALE reaching 79.4 years (90% CI: 70.2 years-90.7 years) and median income reaching $4,381 (90% CI: $3,292-$5,411). Every person who learns about the 1% Treaty and registers a vote earns you an Earth Optimization Point. Targets met, the prize pool goes to Earth Optimization Points holders. Targets missed, depositors still beat their retirement accounts.
Embedding Wishonia is how you play. Every visitor who asks a question and decides to support the treaty is a point. The widget does the teaching. You paste three lines of HTML.
The upside per person is $2.93 million (90% CI: $1.29 million-$4.91 million) in a world that stops wasting $101 trillion (90% CI: $59.6 trillion-$161 trillion)/year on political dysfunction. The downside is three lines of HTML.
Or Just Link to It
Send people to transmit.warondisease.org for the full chat experience with conversation history, voice chat, and the robot.
Put the Scoreboard on Your Website
The arcade mortality scoreboard (the bar pinned to the bottom of this site, counting the deaths that research could eventually prevent) is embeddable. Same deal as the widget: paste HTML, no API key, no build step. The embed configurator previews all five bar designs live and generates the code for you.
The Full Scoreboard
One line. You get the pinned HUD, the fullscreen math screen when a visitor clicks the score, and the button pointing at the vote:
<script src="https://manual.warondisease.org/assets/js/mortality-counters.js" defer></script>The script loads its own stylesheet, derives the manual’s address from its own URL, and fetches live parameter values. If the parameter fetch fails, the counters fall back to values hard-coded in the script; they tick either way.
Pick a layout and a visual theme with one more line each (options and live previews in the configurator):
<meta name="dih-scoreboard-variant" content="instrument-panel">
<meta name="dih-scoreboard-theme" content="arcade">Every interaction fires a dih-scoreboard CustomEvent on document (bar-shown, bar-dismissed, overlay-opened, overlay-closed, cta-clicked, variant-changed, theme-changed, each tagged with the active variant and theme), so you can measure which design converts with whatever analytics you already run.
Counters Without the Bar
If you want live numbers inside your own prose without our scoreboard eating the bottom of your screen, keep the script tag and add one more meta tag, then write spans wherever you want numbers:
<meta name="dih-disable-features" content="delay-counter-hud">
<script src="https://manual.warondisease.org/assets/js/mortality-counters.js" defer></script>
<p>Since the plan went public,
<span data-dih-delay-value="since-publication">counting</span>
people have died of diseases that research could eventually prevent,
at <span data-dih-delay-value="per-second">1.6</span> per second.</p>The span’s text content is replaced and re-rendered about eight times a second. Whatever you put inside is the loading state.
Counter types (data-dih-delay-value):
| Value | Renders |
|---|---|
since-publication |
Preventable deaths since the plan’s publication date, live |
per-day |
Preventable deaths per day of delay |
per-minute |
Per minute |
per-second |
Per second |
suffering-hours-since-publication |
Hours of healthy life lost since publication, live |
suffering-hours-per-second |
Hours of healthy life lost per second |
money-since-publication |
Dollars burned on war + disease since publication, live |
money-per-second |
Dollars burned per second |
timeline-lives |
Projected lives saved by the accelerated timeline |
timeline-dalys |
Projected healthy life-years saved |
publication-date |
The publication date the clocks count from |
Add data-dih-delay-compact="true" to any span for compact notation (“139K” instead of “138,942”).
How the Numbers Stay Honest
Every figure the scoreboard renders is computed from the same parameters.json that generates this book, and the fullscreen rules screen links each number to its source and math. If you embed the scoreboard, you inherit the receipts. Disputes are welcome; rigged machines do not publish their wiring.
