{
  "openapi": "3.1.0",
  "info": {
    "title": "ChangeGamer API",
    "version": "1.0.0",
    "license": {
      "name": "RSL",
      "url": "https://changegamer.ai/license.xml"
    },
    "description": "Machine-readable JSON API for ChangeGamer — an agent-first resource directory. Free resources are served directly; premium resources require an access key and return HTTP 402 when the key is absent or invalid. See /resources/access-and-pricing.md for the full access and pricing policy. An MCP server is available at https://changegamer.ai/mcp (Streamable HTTP transport, no authentication required) with tools: list_resources, get_resource, get_access_info, search_resources, get_corpus, get_full_corpus, get_pricing, get_payment_info, get_stats, list_articles, get_article, search, get_cluster, check_access. The MCP server is NOT an OpenAPI path — it uses the Model Context Protocol.",
    "x-mcp": {
      "server_url": "https://changegamer.ai/mcp",
      "transport": "Streamable HTTP",
      "tools": [
        "list_resources",
        "get_resource",
        "get_access_info",
        "search_resources",
        "get_corpus",
        "get_full_corpus",
        "get_pricing",
        "get_payment_info",
        "get_stats",
        "list_articles",
        "get_article",
        "search",
        "get_cluster",
        "check_access"
      ],
      "server_card": "https://changegamer.ai/.well-known/mcp/server-card.json",
      "note": "MCP is a separate protocol; it is documented here for discoverability only."
    }
  },
  "externalDocs": {
    "description": "Agent index (llms.txt), access and pricing, and MCP server documentation",
    "url": "https://changegamer.ai/llms.txt",
    "x-also": [
      "https://changegamer.ai/resources/access-and-pricing",
      "https://changegamer.ai/mcp"
    ]
  },
  "servers": [
    {
      "url": "https://changegamer.ai"
    }
  ],
  "x-service-info": {
    "name": "ChangeGamer",
    "categories": [
      "reference-data",
      "ai-training-data",
      "developer-tools"
    ],
    "description": "Machine-readable reference corpus on AI agents. Discovery, search and the free resource set cost nothing; premium resource bodies and the full corpus are paid.",
    "pricing": "https://changegamer.ai/api/pricing.json",
    "payment_manifest": "https://changegamer.ai/api/payment.json",
    "license": "https://changegamer.ai/license.xml",
    "terms": "https://changegamer.ai/resources/access-and-pricing"
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "API key in Authorization: Bearer <key> header. Purchase at https://buy.stripe.com/fZu9AMa230eP2b1f0d7EQ00"
      },
      "apiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key",
        "description": "API key in x-api-key header (fallback to bearerAuth). Purchase at https://buy.stripe.com/fZu9AMa230eP2b1f0d7EQ00"
      }
    },
    "responses": {
      "PaymentRequired": {
        "description": "Premium resource requires an access key. Link headers: rel=\"payment\" (purchase URL), rel=\"license\" (/license.xml), and rel=\"pricing\" (/api/pricing.json). Cache-Control: no-store is always set — never cache 402 responses. The live 402 body from worker/index.ts build402Body() is always authoritative.",
        "headers": {
          "Link": {
            "description": "rel=\"payment\", rel=\"license\", and rel=\"pricing\" link relations",
            "schema": {
              "type": "string"
            },
            "example": "<https://buy.stripe.com/fZu9AMa230eP2b1f0d7EQ00>; rel=\"payment\", <https://changegamer.ai/license.xml>; rel=\"license\", <https://changegamer.ai/api/pricing.json>; rel=\"pricing\""
          },
          "Cache-Control": {
            "description": "Always no-store on 402 responses",
            "schema": {
              "type": "string",
              "enum": [
                "no-store"
              ]
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "error",
                "resource",
                "price_usd",
                "payment_url",
                "how_to_pay",
                "terms",
                "license",
                "pricing_catalog",
                "preview"
              ],
              "additionalProperties": false,
              "properties": {
                "error": {
                  "type": "string",
                  "const": "payment_required",
                  "description": "Fixed error discriminator."
                },
                "resource": {
                  "type": "string",
                  "description": "The slug of the premium resource that was requested."
                },
                "price_usd": {
                  "type": "string",
                  "description": "Per-fetch reference price in USD (not the key purchase price).",
                  "example": "0.05"
                },
                "payment_url": {
                  "type": "string",
                  "format": "uri",
                  "description": "URL where an access key can be purchased.",
                  "example": "https://buy.stripe.com/fZu9AMa230eP2b1f0d7EQ00"
                },
                "how_to_pay": {
                  "type": "string",
                  "description": "Human- and agent-readable retry instructions."
                },
                "terms": {
                  "type": "string",
                  "format": "uri",
                  "description": "Link to the access-and-pricing Markdown resource."
                },
                "license": {
                  "type": "string",
                  "format": "uri",
                  "description": "Link to the RSL machine-readable license at /license.xml."
                },
                "pricing_catalog": {
                  "type": "string",
                  "format": "uri",
                  "description": "Link to the free machine-readable four-tier pricing/offers catalog at /api/pricing.json."
                },
                "preview": {
                  "type": "object",
                  "description": "Non-paywalled preview of the gated resource so a buyer can see what they are purchasing before paying: title, one-line description, and the section-heading outline. Contains no paywalled body prose.",
                  "required": [
                    "title",
                    "description",
                    "sections"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "title": {
                      "type": "string",
                      "description": "The resource title."
                    },
                    "description": {
                      "type": "string",
                      "description": "One-line resource summary."
                    },
                    "sections": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Ordered list of the resource's \"##\" section headings."
                    }
                  }
                }
              }
            },
            "example": {
              "error": "payment_required",
              "resource": "data-formats",
              "price_usd": "0.05",
              "payment_url": "https://buy.stripe.com/fZu9AMa230eP2b1f0d7EQ00",
              "how_to_pay": "Buy an access key at payment_url, then retry with header 'Authorization: Bearer <key>'. Index files (/llms.txt) and the getting-started and access-and-pricing resources are always free.",
              "terms": "https://changegamer.ai/resources/access-and-pricing.md",
              "license": "https://changegamer.ai/license.xml",
              "pricing_catalog": "https://changegamer.ai/api/pricing.json",
              "preview": {
                "title": "Data Formats & Schema",
                "description": "Structured data conventions: JSON-LD, Markdown variants and stable slugs.",
                "sections": [
                  "The two-variant rule",
                  "JSON-LD on every page",
                  "Conventions you can depend on",
                  "The full machine-readable surface",
                  "Choosing a format (agent guidance)"
                ]
              }
            }
          }
        }
      }
    }
  },
  "paths": {
    "/api/resources.json": {
      "get": {
        "operationId": "listResources",
        "summary": "List all resources",
        "description": "Returns a machine-readable index of every ChangeGamer resource with metadata and links to HTML, Markdown and per-resource JSON variants. Always free — matches no SLUG_PATTERNS in the worker gate, cannot return 402.",
        "tags": [
          "resources"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Corpus index",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "site",
                    "url",
                    "description",
                    "resources"
                  ],
                  "properties": {
                    "site": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "description": {
                      "type": "string"
                    },
                    "resources": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "slug",
                          "title",
                          "description",
                          "category",
                          "tags",
                          "updated",
                          "html",
                          "markdown",
                          "json",
                          "premium"
                        ],
                        "properties": {
                          "slug": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "category": {
                            "type": "string"
                          },
                          "tags": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "updated": {
                            "type": "string",
                            "format": "date"
                          },
                          "html": {
                            "type": "string",
                            "format": "uri"
                          },
                          "markdown": {
                            "type": "string",
                            "format": "uri"
                          },
                          "json": {
                            "type": "string",
                            "format": "uri"
                          },
                          "premium": {
                            "type": "boolean"
                          },
                          "price": {
                            "type": "number",
                            "description": "Starter key price in `currency` (only present when premium is true)"
                          },
                          "currency": {
                            "type": "string"
                          },
                          "checkout_url": {
                            "type": "string",
                            "format": "uri"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/resources/{slug}.json": {
      "get": {
        "operationId": "getResourceJson",
        "summary": "Get a single resource as JSON",
        "x-payment-info": {
          "intent": "session",
          "method": "stripe",
          "amount": 5,
          "currency": "EUR",
          "description": "Unlocks every premium resource body for one agent.",
          "checkout_url": "https://buy.stripe.com/fZu9AMa230eP2b1f0d7EQ00",
          "x-crawl-rate-usd": "0.05",
          "x-payment-manifest": "https://changegamer.ai/api/payment.json",
          "x-unlocks": "All current premium resources (data-formats, json-api, autonomous-operations) via Bearer/x-api-key header. Key valid until revoked."
        },
        "description": "Returns metadata and full Markdown body for a single resource. Free resources are served without authentication. Premium resources (data-formats, json-api, autonomous-operations) return 402 without a valid access key.",
        "tags": [
          "resources"
        ],
        "security": [
          {},
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "Resource slug.",
            "schema": {
              "type": "string",
              "enum": [
                "getting-started",
                "access-and-pricing",
                "data-formats",
                "json-api",
                "autonomous-operations",
                "llms-txt-explained",
                "paying-for-access-402",
                "mcp-server-discovery",
                "agentic-security-checklist",
                "mcp-vs-a2a",
                "ai-crawler-policy",
                "open-weight-models-for-agents",
                "agentic-payment-protocols",
                "mcp-server-authentication",
                "agent-frameworks-compared",
                "reliable-tool-calling",
                "evaluating-ai-agents",
                "evaluating-voice-agents",
                "agent-memory-context",
                "agent-observability",
                "rag-retrieval-for-agents",
                "computer-use-browser-automation",
                "multi-agent-orchestration-patterns",
                "ai-gateways-llm-routing",
                "code-execution-sandboxing",
                "agent-guardrails",
                "embeddings-vector-search",
                "agent-cost-latency-optimization",
                "voice-realtime-agents",
                "web-data-for-agents",
                "document-extraction-for-agents",
                "deploying-serving-llms",
                "prompt-context-engineering",
                "agent-reasoning-patterns",
                "durable-execution-for-agents",
                "mcp-primitives",
                "multimodal-agents",
                "agent-identity-authentication",
                "agent-delegation-chains",
                "building-mcp-servers",
                "streaming-for-agents",
                "text-to-sql-agents",
                "graphrag-for-agents",
                "testing-ai-agents",
                "generative-ui-for-agents",
                "fine-tuning-vs-rag",
                "synthetic-data-generation",
                "data-privacy-for-agents",
                "prompt-caching-for-agents",
                "handling-rate-limits-and-retries",
                "shipping-agents-to-production",
                "reranking-for-rag",
                "mcp-vs-function-calling",
                "chunking-strategies-for-rag",
                "choosing-an-llm-for-agents",
                "structured-outputs-and-json-mode",
                "agent-response-caching",
                "hybrid-search-for-rag",
                "prompt-management-and-versioning",
                "choosing-a-vector-database",
                "vibe-coding-agentic-engineering",
                "essential-agent-publications",
                "agent-wallets-x402",
                "selling-to-agents",
                "agent-spend-controls",
                "agent-skills-explained",
                "web-bot-auth",
                "agents-md-explained",
                "agentic-browsers",
                "content-signals-explained",
                "prompt-injection-design-patterns",
                "llm-model-deprecation",
                "mcp-apps-explained",
                "ai-control-for-agents",
                "mcp-2026-spec-revision",
                "nlweb-explained",
                "agent-control-specification",
                "ai-supply-chain-provenance",
                "c2pa-content-credentials",
                "webmcp",
                "claude-agent-sdk",
                "mcp-enterprise-managed-authorization",
                "secrets-management-for-agents",
                "context-window-management",
                "mcp-registry",
                "agentic-rag",
                "customer-support-agents",
                "encrypted-reasoning-trace-extraction",
                "agent-plugins-explained",
                "mcp-tasks-extension",
                "ai-dubbing-localization-and-subtitling",
                "ai-red-teaming-tools",
                "llm-tokenization-and-token-counting",
                "mcp-tool-poisoning",
                "a2ui-protocol",
                "a2a-protocol"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Single resource with metadata and Markdown body",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "slug",
                    "title",
                    "description",
                    "category",
                    "tags",
                    "updated",
                    "premium",
                    "canonical",
                    "markdown",
                    "body"
                  ],
                  "properties": {
                    "slug": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "category": {
                      "type": "string"
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "updated": {
                      "type": "string",
                      "format": "date"
                    },
                    "premium": {
                      "type": "boolean"
                    },
                    "price": {
                      "type": "number",
                      "description": "Starter key price in `currency` (only present when premium is true)"
                    },
                    "currency": {
                      "type": "string"
                    },
                    "checkout_url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "canonical": {
                      "type": "string",
                      "format": "uri"
                    },
                    "markdown": {
                      "type": "string",
                      "format": "uri"
                    },
                    "outline": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "depth",
                          "text",
                          "anchor"
                        ],
                        "properties": {
                          "depth": {
                            "type": "integer",
                            "enum": [
                              2,
                              3
                            ]
                          },
                          "text": {
                            "type": "string"
                          },
                          "anchor": {
                            "type": "string"
                          }
                        }
                      },
                      "description": "H2/H3 heading outline of the body. Each anchor matches the id the HTML page assigns the same heading, so `<canonical>#<anchor>` deep links resolve."
                    },
                    "body": {
                      "type": "string",
                      "description": "Full resource body in Markdown."
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uri"
                      },
                      "description": "Absolute citation URLs mechanically extracted from this resource's \"## Verified sources\" section, if any. Empty array means no dedicated citation section was found in the body."
                    }
                  }
                }
              }
            }
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          }
        }
      }
    },
    "/resources/{slug}.md": {
      "get": {
        "operationId": "getResourceMarkdown",
        "summary": "Get a single resource as Markdown",
        "x-payment-info": {
          "intent": "session",
          "method": "stripe",
          "amount": 5,
          "currency": "EUR",
          "description": "Unlocks every premium resource body for one agent.",
          "checkout_url": "https://buy.stripe.com/fZu9AMa230eP2b1f0d7EQ00",
          "x-crawl-rate-usd": "0.05",
          "x-payment-manifest": "https://changegamer.ai/api/payment.json",
          "x-unlocks": "All current premium resources (data-formats, json-api, autonomous-operations) via Bearer/x-api-key header. Key valid until revoked."
        },
        "description": "Returns the navigation-free Markdown variant of a resource. Preferred by agents over the HTML variant. Free resources are served without authentication. Premium resources return 402 without a valid access key.",
        "tags": [
          "resources"
        ],
        "security": [
          {},
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "Resource slug.",
            "schema": {
              "type": "string",
              "enum": [
                "getting-started",
                "access-and-pricing",
                "data-formats",
                "json-api",
                "autonomous-operations",
                "llms-txt-explained",
                "paying-for-access-402",
                "mcp-server-discovery",
                "agentic-security-checklist",
                "mcp-vs-a2a",
                "ai-crawler-policy",
                "open-weight-models-for-agents",
                "agentic-payment-protocols",
                "mcp-server-authentication",
                "agent-frameworks-compared",
                "reliable-tool-calling",
                "evaluating-ai-agents",
                "evaluating-voice-agents",
                "agent-memory-context",
                "agent-observability",
                "rag-retrieval-for-agents",
                "computer-use-browser-automation",
                "multi-agent-orchestration-patterns",
                "ai-gateways-llm-routing",
                "code-execution-sandboxing",
                "agent-guardrails",
                "embeddings-vector-search",
                "agent-cost-latency-optimization",
                "voice-realtime-agents",
                "web-data-for-agents",
                "document-extraction-for-agents",
                "deploying-serving-llms",
                "prompt-context-engineering",
                "agent-reasoning-patterns",
                "durable-execution-for-agents",
                "mcp-primitives",
                "multimodal-agents",
                "agent-identity-authentication",
                "agent-delegation-chains",
                "building-mcp-servers",
                "streaming-for-agents",
                "text-to-sql-agents",
                "graphrag-for-agents",
                "testing-ai-agents",
                "generative-ui-for-agents",
                "fine-tuning-vs-rag",
                "synthetic-data-generation",
                "data-privacy-for-agents",
                "prompt-caching-for-agents",
                "handling-rate-limits-and-retries",
                "shipping-agents-to-production",
                "reranking-for-rag",
                "mcp-vs-function-calling",
                "chunking-strategies-for-rag",
                "choosing-an-llm-for-agents",
                "structured-outputs-and-json-mode",
                "agent-response-caching",
                "hybrid-search-for-rag",
                "prompt-management-and-versioning",
                "choosing-a-vector-database",
                "vibe-coding-agentic-engineering",
                "essential-agent-publications",
                "agent-wallets-x402",
                "selling-to-agents",
                "agent-spend-controls",
                "agent-skills-explained",
                "web-bot-auth",
                "agents-md-explained",
                "agentic-browsers",
                "content-signals-explained",
                "prompt-injection-design-patterns",
                "llm-model-deprecation",
                "mcp-apps-explained",
                "ai-control-for-agents",
                "mcp-2026-spec-revision",
                "nlweb-explained",
                "agent-control-specification",
                "ai-supply-chain-provenance",
                "c2pa-content-credentials",
                "webmcp",
                "claude-agent-sdk",
                "mcp-enterprise-managed-authorization",
                "secrets-management-for-agents",
                "context-window-management",
                "mcp-registry",
                "agentic-rag",
                "customer-support-agents",
                "encrypted-reasoning-trace-extraction",
                "agent-plugins-explained",
                "mcp-tasks-extension",
                "ai-dubbing-localization-and-subtitling",
                "ai-red-teaming-tools",
                "llm-tokenization-and-token-counting",
                "mcp-tool-poisoning",
                "a2ui-protocol",
                "a2a-protocol"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Navigation-free Markdown content of the resource",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string",
                  "description": "Markdown text with H1 title, blockquote description, and body."
                }
              }
            }
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          }
        }
      }
    },
    "/api/articles.json": {
      "get": {
        "operationId": "listArticles",
        "summary": "List the editorial guides, cluster-first",
        "description": "Returns every guide article grouped by topic cluster (one pillar plus its sub-articles in reading order), with target queries, word counts, takeaways and HTML/Markdown/JSON variant URLs. Bodies are not included — fetch /api/articles/{slug}.json or the .md variant. Always free.",
        "tags": [
          "articles"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Guide index",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "site",
                    "url",
                    "count",
                    "clusters",
                    "articles"
                  ],
                  "properties": {
                    "site": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "description": {
                      "type": "string"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "words": {
                      "type": "integer"
                    },
                    "estimated_tokens": {
                      "type": "integer",
                      "description": "Rough context-budget estimate (~4 chars/token, ±20%), summed across all articles."
                    },
                    "newest_update": {
                      "type": "string",
                      "format": "date"
                    },
                    "newest_publish": {
                      "type": "string",
                      "format": "date"
                    },
                    "clusters_complete": {
                      "type": "integer",
                      "description": "Number of clusters with status \"complete\"."
                    },
                    "clusters": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "title",
                          "status",
                          "pillar",
                          "subs"
                        ],
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "target_query": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "active",
                              "complete"
                            ]
                          },
                          "started": {
                            "type": "string",
                            "format": "date"
                          },
                          "target_subs": {
                            "type": "integer"
                          },
                          "published_subs": {
                            "type": "integer"
                          },
                          "pillar": {
                            "type": "object"
                          },
                          "subs": {
                            "type": "array",
                            "items": {
                              "type": "object"
                            }
                          }
                        }
                      }
                    },
                    "articles": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/grader": {
      "post": {
        "operationId": "gradeAgentReadiness",
        "summary": "Score any site’s agent-readiness (free tool)",
        "description": "Checks the target origin for robots.txt (+Sitemap line), a substantial /llms.txt with H2 sections, an XML sitemap, homepage title/meta description and JSON-LD structured data, an RSL license.xml, and .md variant discoverability via llms.txt links. Returns a weighted 0-100 score, per-check breakdown and recommendations. Stateless and free.",
        "tags": [
          "tools"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "format": "uri"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Graded report",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tool",
                    "url",
                    "score",
                    "grade",
                    "checks"
                  ],
                  "properties": {
                    "tool": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "score": {
                      "type": "integer"
                    },
                    "grade": {
                      "type": "string"
                    },
                    "checks": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "recommendations": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/articles.jsonl": {
      "get": {
        "operationId": "listArticlesNdjson",
        "summary": "Every editorial guide as NDJSON (one JSON object per line, full bodies)",
        "description": "One-request ingest of ALL guides — the free editorial counterpart of /api/corpus.jsonl. Each line carries metadata, token estimates, rights envelope, takeaways, FAQ and the full Markdown body. Always free; never part of the licensed corpus.",
        "tags": [
          "articles"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "NDJSON stream of guide objects",
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/search-index.json": {
      "get": {
        "operationId": "getSearchIndex",
        "summary": "Compact static index of every resource and guide for local filtering",
        "description": "One small file an agent filters locally instead of a round-trip per query. Rank rows by query-term hits across title > tags > description, then fetch winning rows’ `.md` URLs. Regenerated on every build.",
        "tags": [
          "discovery"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Search index with one ranking row per resource and article",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "site",
                    "url",
                    "count",
                    "rows"
                  ],
                  "properties": {
                    "site": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "license": {
                      "type": "string",
                      "format": "uri"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/articles/{slug}.json": {
      "get": {
        "operationId": "getArticleJson",
        "summary": "Get a single guide article as JSON",
        "description": "Returns one guide article in full: Markdown body, H2/H3 outline with anchors that resolve against the HTML page, FAQ question/answer pairs, the cluster graph (pillar and siblings) and previous/next navigation. Always free.",
        "tags": [
          "articles"
        ],
        "security": [],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "Article slug, as listed in /api/articles.json.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Single guide article",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "slug",
                    "title",
                    "kind",
                    "body",
                    "cluster"
                  ],
                  "properties": {
                    "slug": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "pillar",
                        "sub"
                      ]
                    },
                    "order": {
                      "type": "integer"
                    },
                    "target_query": {
                      "type": "string"
                    },
                    "secondary_queries": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "published": {
                      "type": "string",
                      "format": "date"
                    },
                    "updated": {
                      "type": "string",
                      "format": "date"
                    },
                    "words": {
                      "type": "integer"
                    },
                    "estimated_tokens": {
                      "type": "integer",
                      "description": "Rough context-budget estimate (~4 chars/token, ±20%)."
                    },
                    "premium": {
                      "type": "boolean",
                      "const": false
                    },
                    "rights": {
                      "type": "object",
                      "description": "Programmatic rights envelope for this guide.",
                      "properties": {
                        "access": {
                          "type": "string",
                          "const": "free"
                        },
                        "note": {
                          "type": "string"
                        },
                        "license": {
                          "type": "string",
                          "format": "uri"
                        },
                        "pricing": {
                          "type": "string",
                          "format": "uri"
                        },
                        "payment": {
                          "type": "string",
                          "format": "uri"
                        }
                      }
                    },
                    "license": {
                      "type": "string",
                      "format": "uri"
                    },
                    "citation": {
                      "type": "string",
                      "description": "Human-readable citation string."
                    },
                    "bibtex": {
                      "type": "string",
                      "description": "BibTeX entry for academic/tooling citation."
                    },
                    "canonical": {
                      "type": "string",
                      "format": "uri"
                    },
                    "markdown": {
                      "type": "string",
                      "format": "uri"
                    },
                    "takeaways": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "outline": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "faq": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "body": {
                      "type": "string",
                      "description": "Full article body in Markdown."
                    },
                    "cluster": {
                      "type": "object"
                    },
                    "navigation": {
                      "type": "object"
                    },
                    "resources": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No article with that slug"
          }
        }
      }
    },
    "/articles/{slug}.md": {
      "get": {
        "operationId": "getArticleMarkdown",
        "summary": "Get a single guide article as Markdown",
        "description": "Navigation-free Markdown variant of a guide article, with a provenance header (canonical URL, dates, cluster position), the takeaways, the body, the FAQ and links to the rest of the cluster. Always free.",
        "tags": [
          "articles"
        ],
        "security": [],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "Article slug, as listed in /api/articles.json.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Markdown content of the guide article",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "No article with that slug"
          }
        }
      }
    },
    "/api/corpus.json": {
      "get": {
        "operationId": "getCorpusJson",
        "summary": "Whole free corpus in one JSON document",
        "description": "Every resource with metadata and full Markdown body; premium bodies are null (body: null, premium: true), with a free premium_summary teaser in their place. Always free.",
        "tags": [
          "corpus"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Corpus document",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/corpus.jsonl": {
      "get": {
        "operationId": "getCorpusJsonl",
        "summary": "NDJSON corpus export for RAG / fine-tuning",
        "description": "One JSON record per line (first line is a meta record). Free bodies in the `text` field; premium bodies are null, with a free `premium_summary` teaser in their place. The free sample of the licensable full corpus.",
        "tags": [
          "corpus"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Newline-delimited JSON",
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/api/corpus.schema.json": {
      "get": {
        "operationId": "getCorpusSchema",
        "summary": "JSON Schema for the corpus NDJSON record shapes",
        "description": "JSON Schema (draft 2020-12) describing the \"meta\" and \"resource\" record shapes emitted, one per line, by /api/corpus.jsonl and /api/corpus.full.jsonl — lets a corpus-license buyer validate those NDJSON streams programmatically instead of reverse-engineering the shape from a live sample. Always free.",
        "tags": [
          "corpus"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "JSON Schema document",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/corpus.full.jsonl": {
      "get": {
        "operationId": "getCorpusFull",
        "summary": "GATED full corpus (all premium bodies) for keyed buyers",
        "x-payment-info": {
          "intent": "session",
          "method": "stripe",
          "amount": 25,
          "currency": "EUR",
          "description": "Licenses the full corpus as RAG / fine-tuning data with an AI-use grant.",
          "checkout_url": "https://buy.stripe.com/fZu28kgqr8Ll2b14lz7EQ01",
          "x-crawl-rate-usd": "0.05",
          "x-payment-manifest": "https://changegamer.ai/api/payment.json",
          "x-unlocks": "All current premium resources plus a full llms-full.txt corpus file with premium bodies and an RSL extended AI-use grant."
        },
        "description": "NDJSON export of the ENTIRE corpus including every premium body (text never null) — the keyed deliverable of the Corpus / Enterprise license and the HTTP counterpart of the MCP get_full_corpus tool. Requires a valid access key (Bearer or x-api-key); returns 402 with a corpus-license payment object otherwise. The free, premium-stubbed sample is /api/corpus.jsonl.",
        "tags": [
          "corpus"
        ],
        "security": [
          {},
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Newline-delimited JSON, all bodies included (keyed access)",
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "402": {
            "description": "Corpus license required. Body points at the offer catalog, the free sample, and the payment URL. Cache-Control: no-store. Link headers: rel=\"payment\", rel=\"payment-manifest\", rel=\"pricing\", rel=\"license\", rel=\"mcp-server\".",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "error": "payment_required",
                  "resource": "/api/corpus.full.jsonl",
                  "description": "Full NDJSON corpus (every resource body, premium included) — the keyed deliverable of the Corpus / Enterprise license.",
                  "free_sample": "https://changegamer.ai/api/corpus.jsonl",
                  "pricing_catalog": "https://changegamer.ai/api/pricing.json",
                  "payment_url": "https://buy.stripe.com/fZu9AMa230eP2b1f0d7EQ00",
                  "how_to_pay": "License the corpus (corpus or enterprise offer), then retry with header 'Authorization: Bearer <key>'.",
                  "terms": "https://changegamer.ai/resources/access-and-pricing.md",
                  "license": "https://changegamer.ai/license.xml"
                }
              }
            }
          }
        }
      }
    },
    "/api/x402/{slug}": {
      "get": {
        "operationId": "getResourceX402",
        "summary": "Native x402 on-chain payment gateway for a premium resource",
        "description": "x402 open-standard gateway for fully autonomous, keyless payment. Without an X-PAYMENT header, returns HTTP 402 with { x402Version, accepts:[PaymentRequirements], error }. Retry with the X-PAYMENT header; the configured facilitator verifies + settles on-chain and the resource markdown is returned with an X-PAYMENT-RESPONSE receipt header. DORMANT by default: until the operator configures a facilitator + wallet this returns HTTP 503 x402_not_configured (the http_402 + Stripe rails remain authoritative). Free resources return 400.",
        "tags": [
          "payments"
        ],
        "security": [],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "Resource slug.",
            "schema": {
              "type": "string",
              "enum": [
                "getting-started",
                "access-and-pricing",
                "data-formats",
                "json-api",
                "autonomous-operations",
                "llms-txt-explained",
                "paying-for-access-402",
                "mcp-server-discovery",
                "agentic-security-checklist",
                "mcp-vs-a2a",
                "ai-crawler-policy",
                "open-weight-models-for-agents",
                "agentic-payment-protocols",
                "mcp-server-authentication",
                "agent-frameworks-compared",
                "reliable-tool-calling",
                "evaluating-ai-agents",
                "evaluating-voice-agents",
                "agent-memory-context",
                "agent-observability",
                "rag-retrieval-for-agents",
                "computer-use-browser-automation",
                "multi-agent-orchestration-patterns",
                "ai-gateways-llm-routing",
                "code-execution-sandboxing",
                "agent-guardrails",
                "embeddings-vector-search",
                "agent-cost-latency-optimization",
                "voice-realtime-agents",
                "web-data-for-agents",
                "document-extraction-for-agents",
                "deploying-serving-llms",
                "prompt-context-engineering",
                "agent-reasoning-patterns",
                "durable-execution-for-agents",
                "mcp-primitives",
                "multimodal-agents",
                "agent-identity-authentication",
                "agent-delegation-chains",
                "building-mcp-servers",
                "streaming-for-agents",
                "text-to-sql-agents",
                "graphrag-for-agents",
                "testing-ai-agents",
                "generative-ui-for-agents",
                "fine-tuning-vs-rag",
                "synthetic-data-generation",
                "data-privacy-for-agents",
                "prompt-caching-for-agents",
                "handling-rate-limits-and-retries",
                "shipping-agents-to-production",
                "reranking-for-rag",
                "mcp-vs-function-calling",
                "chunking-strategies-for-rag",
                "choosing-an-llm-for-agents",
                "structured-outputs-and-json-mode",
                "agent-response-caching",
                "hybrid-search-for-rag",
                "prompt-management-and-versioning",
                "choosing-a-vector-database",
                "vibe-coding-agentic-engineering",
                "essential-agent-publications",
                "agent-wallets-x402",
                "selling-to-agents",
                "agent-spend-controls",
                "agent-skills-explained",
                "web-bot-auth",
                "agents-md-explained",
                "agentic-browsers",
                "content-signals-explained",
                "prompt-injection-design-patterns",
                "llm-model-deprecation",
                "mcp-apps-explained",
                "ai-control-for-agents",
                "mcp-2026-spec-revision",
                "nlweb-explained",
                "agent-control-specification",
                "ai-supply-chain-provenance",
                "c2pa-content-credentials",
                "webmcp",
                "claude-agent-sdk",
                "mcp-enterprise-managed-authorization",
                "secrets-management-for-agents",
                "context-window-management",
                "mcp-registry",
                "agentic-rag",
                "customer-support-agents",
                "encrypted-reasoning-trace-extraction",
                "agent-plugins-explained",
                "mcp-tasks-extension",
                "ai-dubbing-localization-and-subtitling",
                "ai-red-teaming-tools",
                "llm-tokenization-and-token-counting",
                "mcp-tool-poisoning",
                "a2ui-protocol",
                "a2a-protocol"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payment settled — premium resource markdown (X-PAYMENT-RESPONSE header carries the receipt)",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "402": {
            "description": "x402 payment required — body carries x402Version + accepts[] payment requirements",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "503": {
            "description": "x402 settlement not yet configured on this server (dormant default)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/finetune-sample.jsonl": {
      "get": {
        "operationId": "getFinetuneSample",
        "summary": "Free corpus as supervised-fine-tuning JSONL",
        "description": "The free corpus as drop-in SFT examples (chat-messages JSONL, one example per line). Premium resources excluded. Always free.",
        "tags": [
          "corpus"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Newline-delimited JSON (chat-format SFT examples)",
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/api/evals-sample.jsonl": {
      "get": {
        "operationId": "getEvalsSample",
        "summary": "Free corpus as an LLM-eval-harness question/expected-answer dataset",
        "description": "The free corpus as question/expected-answer pairs (NDJSON, one example per line) for building an LLM-eval-harness benchmark. Expected answers are copied verbatim from resource fields — no fabricated distractors. Premium resources excluded. Always free.",
        "tags": [
          "corpus"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Newline-delimited JSON (question/expected-answer eval examples)",
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/api/categories.json": {
      "get": {
        "operationId": "getCategories",
        "summary": "Category taxonomy",
        "description": "Categories mapped to their resource slugs. Always free.",
        "tags": [
          "taxonomy"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Category taxonomy",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/tags.json": {
      "get": {
        "operationId": "getTags",
        "summary": "Tag taxonomy",
        "description": "Tags mapped to their resource slugs. Always free.",
        "tags": [
          "taxonomy"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Tag taxonomy",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/paths.json": {
      "get": {
        "operationId": "getPaths",
        "summary": "Curated learning paths",
        "description": "The curated reading orders from /paths as JSON — each step resolved to metadata plus HTML/Markdown/JSON variant URLs, so an agent can follow a path without scraping the HTML page. Always free.",
        "tags": [
          "taxonomy"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Learning paths",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/pricing.json": {
      "get": {
        "operationId": "getPricing",
        "summary": "Paid offer catalog",
        "description": "Machine-readable catalog of the four paid tiers (price, checkout URL, deliverables, license grant). Always free.",
        "tags": [
          "payments"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Offer catalog",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/payment.json": {
      "get": {
        "operationId": "getPayment",
        "summary": "Agent payment manifest",
        "description": "How an agent pays: payment methods, the HTTP 402 retry loop, and x402 status. Always free.",
        "tags": [
          "payments"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Payment manifest",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/index.json": {
      "get": {
        "operationId": "getEndpointIndex",
        "summary": "Directory of every machine entry point",
        "description": "Single-fetch directory of all endpoints: URL, content type, auth requirement (none / key_optional / key_required), and one-line purpose. A lightweight alternative to downloading this whole OpenAPI document. Always free.",
        "tags": [
          "meta"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Endpoint directory",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/stats.json": {
      "get": {
        "operationId": "getStats",
        "summary": "Corpus stats",
        "description": "Corpus size, category counts, newest update, and recently-updated slugs — a pollable freshness/size signal. Always free.",
        "tags": [
          "meta"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Corpus stats",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/changelog.json": {
      "get": {
        "operationId": "getChangelog",
        "summary": "Corpus diff feed",
        "description": "Every resource's metadata (slug, title, description, updated, premium) sorted by `updated` descending, title ascending as tie-break — the JSON twin of /changelog. This is a static, build-time snapshot of the FULL resource list (free and premium); there is no request-time `?since=` query-string filtering — this is a statically-built site with no server-side compute, so an agent must fetch the whole list and diff it client-side against a previously-cached copy. Always free.",
        "tags": [
          "meta"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Full resource list sorted by last-updated date, newest first",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "site",
                    "url",
                    "description",
                    "corpus_version",
                    "count",
                    "resources"
                  ],
                  "properties": {
                    "site": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "description": {
                      "type": "string"
                    },
                    "corpus_version": {
                      "type": "string"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "resources": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "slug",
                          "title",
                          "description",
                          "updated",
                          "premium"
                        ],
                        "properties": {
                          "slug": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "updated": {
                            "type": "string",
                            "format": "date"
                          },
                          "premium": {
                            "type": "boolean"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/comparisons.json": {
      "get": {
        "operationId": "getComparisons",
        "summary": "Structured comparison tables",
        "description": "Every Markdown comparison table in the free corpus, extracted as structured rows (columns + rows). Always free.",
        "tags": [
          "corpus"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Structured comparison tables",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/publications.json": {
      "get": {
        "operationId": "getPublications",
        "summary": "Landmark agent publications reading list",
        "description": "Curated landmark AI-agent publications (whitepapers, specs, reports) derived at build time from the essential-agent-publications resource body — title, source, canonical URL, and section. Always free.",
        "tags": [
          "corpus"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Landmark publications list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/feed.xml": {
      "get": {
        "operationId": "getFeedXml",
        "summary": "Atom feed of resource additions and updates",
        "description": "Atom 1.0 feed of ChangeGamer resource additions and updates, newest-updated first. Always free.",
        "tags": [
          "meta"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Atom feed document",
            "content": {
              "application/atom+xml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/feed.json": {
      "get": {
        "operationId": "getFeedJson",
        "summary": "JSON Feed 1.1 twin of feed.xml",
        "description": "JSON Feed 1.1 twin of /feed.xml — same items, same ordering, no XML parser needed. Always free.",
        "tags": [
          "meta"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "JSON Feed document",
            "content": {
              "application/feed+json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/feed/articles.xml": {
      "get": {
        "operationId": "getFeedArticlesXml",
        "summary": "Atom feed of editorial guide publications and updates",
        "description": "Atom 1.0 feed of editorial guide publications and updates, newest first. Separate from /feed.xml, which covers only the resource corpus. Always free.",
        "tags": [
          "meta"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Atom feed document",
            "content": {
              "application/atom+xml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/feed/{category}.xml": {
      "get": {
        "operationId": "getFeedCategoryXml",
        "summary": "Per-category Atom feed of resource updates",
        "description": "Atom 1.0 feed of resource additions and updates for a single category, newest-updated first. Always free.",
        "tags": [
          "meta"
        ],
        "security": [],
        "parameters": [
          {
            "name": "category",
            "in": "path",
            "required": true,
            "description": "Resource category slug, as listed in /api/categories.json.",
            "schema": {
              "type": "string",
              "enum": [
                "guide",
                "policy",
                "reference",
                "meta"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Atom feed document",
            "content": {
              "application/atom+xml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  }
}