Listen Get

API & Data Indexes

Keywords

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

Machine-readable data indexes and APIs for building tools, agents, or integrations with the Disease Eradication Plan.

Machine-readable data indexes and APIs for building tools, agents, or integrations with the Disease Eradication Plan.

This page documents the data indexes and APIs available for programmatic access to the book’s content, parameters, images, and chat functionality.

Parameters & Shareable Snippets

Every numeric value in this book lives in a single Python file and is auto-generated into two public artifacts on each build. Use these if you want the live numbers, the citations behind them, or ready-to-embed prose for the most important sections of the book.

JSON (language-agnostic)

URL: /assets/json/parameters.json

$27.2 billion, 604 (95% CI: 453-894), 150 thousand deaths/day, and every other numeric value used in the book, in one file. Each parameter includes its raw value, formatted display string, unit, description, source, confidence, confidence interval, and a link to the chapter where it appears most.

Top-level schema:

{
  "sourceFile": "dih_models/parameters.py",
  "parameters": {
    "TREATY_ANNUAL_FUNDING": {
      "value": 27180000000,
      "formatted": "$27.2B",
      "unit": "USD/year",
      "description": "Annual funding from 1% of global military spending",
      "sourceType": "calculated",
      "sourceRef": "",
      "confidence": "high",
      "formula": "GLOBAL_MILITARY_SPENDING * 0.01",
      "confidenceInterval": [25100000000, 29300000000],
      "chapterUrl": "https://manual.warondisease.org/knowledge/solution/1-percent-treaty.html"
    }
  },
  "shareableSnippets": {
    "whyOptimizationIsNecessary": {
      "markdown": "Governments were created to promote the general welfare...",
      "sourceFile": "knowledge/strategy/declaration-of-optimization.qmd",
      "updatedAt": "2026-04-09"
    },
    "declarationOfOptimization": { "markdown": "...", "sourceFile": "...", "updatedAt": "..." }
  },
  "citations": {
    "sipri-milex-2024": { "type": "report", "title": "SIPRI Military Expenditure Database 2024", "..." }
  }
}

Parameter fields:

Field Description
value Raw numeric value (float)
formatted Display string with auto-scaled units (e.g. “$27.2B”, “150K deaths”)
unit Canonical unit (USD, years, deaths, ratio, etc.)
description Human-readable explanation
sourceType external (cited data), calculated (formula-derived), or definition (policy assumption)
sourceRef BibTeX citation key for external sources
confidence high, medium, low, or estimated
formula Formula string for calculated parameters
confidenceInterval [lower, upper] for statistical parameters
chapterUrl URL of the manual chapter where this parameter appears most often

TypeScript (with types)

URL: /assets/js/parameters-calculations-citations.ts

Same data as the JSON file plus full TypeScript interfaces (Parameter, Citation, ShareableSnippet, SourceType, Confidence), typed exports, and helper unions (ParameterName, ShareableSnippetKey). Import it directly into any Next.js, Remix, or SvelteKit project:

import {
  parameters,
  citations,
  shareableSnippets,
  type ParameterName,
} from './parameters-calculations-citations';

// Get a formatted display value
const funding = parameters.TREATY_ANNUAL_FUNDING.formatted; // "$27.2B"

// Render a pre-built prose snippet in a React Markdown component
import ReactMarkdown from 'react-markdown';
<ReactMarkdown>{shareableSnippets.declarationOfOptimization.markdown}</ReactMarkdown>

Shareable Snippets

The shareableSnippets block contains ready-to-embed markdown for the most important sections of the book. Variable references are pre-resolved to their current values and wrapped as markdown links pointing to the manual chapter where each parameter appears most. Citations are stripped (readers click through for sources), and all relative paths are absolutized. Drop the markdown directly into any markdown renderer.

Currently available snippets:

Key Source Description
whyOptimizationIsNecessary declaration-of-optimization.qmd The opening pitch of the Declaration. Best for blog posts, social embeds, and op-ed framing.
declarationOfOptimization declaration-of-optimization.qmd The full formal declaration (Jefferson-style grievances and resolution). Best for signature pages and long-form reprints.

All data is regenerated from dih_models/parameters.py on every deploy. If a parameter changes here, it changes everywhere the TS or JSON is consumed on next fetch.

Versioning & Stability

There is no stable API version. Both files always reflect the current HEAD of the develop branch and update on every deploy. Parameter names, units, and values can change between versions when sources update or someone notices a naming-convention violation.

If your application cannot tolerate breaking changes, pin a specific commit:

https://raw.githubusercontent.com/wishonia/earth-optimization-protocol/COMMIT_SHA/assets/json/parameters.json

Replace COMMIT_SHA with any full or short commit hash from the repository. The entire git history is your version archive, giving infinite granularity with no infrastructure needed. For the absolute safest path, download the file once and commit it to your own repo, then update deliberately when you review what changed.

TypeScript consumers get an additional safety net: if a parameter is renamed or removed, parameters.RENAMED_NAME becomes a compile error at build time, not a runtime bug. JSON consumers do not get this and should defensively check for the presence of fields they depend on.

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: Harnessing Greed to Eradicate 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 is an AI that teaches your visitors about the 1% Treaty146, a plan to redirect 1% of global military spending to clinical trials. It 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 Prize147 has two targets by 2040: global HALE reaching 85 years (95% CI: 76.4 years-95.6 years) and median income reaching $76,704 (95% CI: $37,794-$161,225). Every person who learns about the 1% Treaty and registers a vote earns you a VOTE point. Targets met, the prize pool goes to VOTE point-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 $6.74 million (95% CI: $2.62 million-$15.7 million) in a world that stops wasting $101 trillion (95% CI: $83.3 trillion-$191 trillion)/year on political dysfunction. The downside is three lines of HTML.