{
  "name": "InferTheta Agent API",
  "version": "1.0.0",
  "description": "Decision infrastructure for agents: design Bayesian networks, fill CPTs, run inference, and return structured explanations.",
  "documentation": {
    "openapi": "https://infertheta-agent-engine-production.up.railway.app/openapi.json",
    "llmsTxt": "https://infertheta-agent-engine-production.up.railway.app/llms.txt",
    "humanApp": "https://infertheta.com/",
    "mcp": "Prefer this HTTP API for remote agents. Optional local stdio MCP: clone the repo and run npm run mcp (see /llms.txt)."
  },
  "auth": {
    "modes": [
      "Authorization: Bearer <api_key>",
      "X-API-Key: <api_key>"
    ],
    "sandbox": "POST /v1/sandbox — free key + small credits (no login)",
    "buy": "POST /v1/checkout { pack } — Stripe guest checkout, then GET /v1/checkout/{sessionId}",
    "pricing": "https://infertheta-agent-engine-production.up.railway.app/v1/pricing"
  },
  "agentWorkflow": [
    "POST /v1/sandbox OR POST /v1/checkout → get apiKey",
    "POST /v1/networks — create empty or upload JSON",
    "POST /v1/networks/{id}/build or /nodes /edges /cpt — design + fill CPTs",
    "POST /v1/networks/{id}/evidence — observe facts",
    "POST /v1/networks/{id}/inference — compute posteriors (pay-per-call credits)",
    "POST /v1/networks/{id}/evaluate-decision — choose action",
    "POST /v1/networks/{id}/explain — auditable why for a human"
  ],
  "legacySessionEndpoints": [
    "GET /nodes",
    "POST /load-network",
    "POST /evidence",
    "POST /inference",
    "POST /evaluate-decision",
    "POST /chat"
  ],
  "policy": "https://infertheta-agent-engine-production.up.railway.app/v1/policy"
}