{
  "openapi": "3.1.0",
  "info": {
    "title": "Prompt Edit Content API",
    "version": "1.0.0",
    "summary": "Read-only HTTP interface for retrieving Prompt Edit's prompt engineering reference as clean Markdown.",
    "description": "Every page on www.promptedit.app is available as Markdown, either by content negotiation (send `Accept: text/markdown`) or by appending `.md` to any page path. Bulk representations are available for agents that prefer a single fetch over crawling. This is a static site: all endpoints are unauthenticated, read-only, and safe to cache.",
    "contact": {
      "name": "Sebastian Messingfeld",
      "url": "https://www.linkedin.com/in/messingfeld/"
    },
    "license": {
      "name": "Content is published for automated processing under the site's Content Signals policy",
      "url": "https://www.promptedit.app/robots.txt"
    }
  },
  "servers": [{ "url": "https://www.promptedit.app" }],
  "tags": [
    { "name": "pages", "description": "Individual reference pages" },
    { "name": "bulk", "description": "Whole-site representations" }
  ],
  "paths": {
    "/{path}": {
      "get": {
        "tags": ["pages"],
        "operationId": "getPage",
        "summary": "Retrieve a page as HTML or Markdown",
        "description": "Returns HTML by default. Send `Accept: text/markdown` to receive the Markdown representation of the same page. Responses vary on `Accept`.",
        "parameters": [
          {
            "name": "path",
            "in": "path",
            "required": true,
            "description": "Page path without leading or trailing slash, e.g. `prompt-framework/costar`.",
            "schema": { "type": "string" },
            "examples": {
              "framework": { "value": "prompt-framework/costar" },
              "comparison": { "value": "prompt-frameworks/compare/zero-shot-vs-few-shot" },
              "flow": { "value": "prompt-flow/the-refiner" }
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "required": false,
            "description": "Set to `text/markdown` for the Markdown representation.",
            "schema": { "type": "string", "default": "text/html" }
          }
        ],
        "responses": {
          "200": {
            "description": "The page.",
            "headers": {
              "Vary": {
                "description": "Always includes `Accept` for HTML responses.",
                "schema": { "type": "string" }
              },
              "Content-Location": {
                "description": "Present on Markdown responses: the `.md` URL of the returned representation.",
                "schema": { "type": "string" }
              },
              "x-markdown-tokens": {
                "description": "Approximate token count of the Markdown body. Advisory.",
                "schema": { "type": "integer" }
              }
            },
            "content": {
              "text/html": { "schema": { "type": "string" } },
              "text/markdown": {
                "schema": { "type": "string" },
                "example": "---\ntitle: \"CO-STAR Framework\"\nsource: https://www.promptedit.app/prompt-framework/costar\n---\n\n# CO-STAR Framework\n"
              }
            }
          },
          "404": { "description": "No such page." }
        }
      }
    },
    "/{path}.md": {
      "get": {
        "tags": ["pages"],
        "operationId": "getPageMarkdown",
        "summary": "Retrieve a page as Markdown directly",
        "description": "Equivalent to `GET /{path}` with `Accept: text/markdown`, for clients that cannot set request headers. Each document opens with YAML frontmatter carrying `title`, `description` and the canonical `source` URL.",
        "parameters": [
          {
            "name": "path",
            "in": "path",
            "required": true,
            "schema": { "type": "string" },
            "examples": { "framework": { "value": "prompt-framework/costar" } }
          }
        ],
        "responses": {
          "200": {
            "description": "Markdown representation of the page.",
            "content": { "text/markdown": { "schema": { "type": "string" } } }
          },
          "404": { "description": "No such page." }
        }
      }
    },
    "/llms.txt": {
      "get": {
        "tags": ["bulk"],
        "operationId": "getLlmsIndex",
        "summary": "Curated index of the site for LLMs",
        "description": "Short overview and link index, per the llms.txt convention.",
        "responses": {
          "200": {
            "description": "Index document.",
            "content": { "text/plain": { "schema": { "type": "string" } } }
          }
        }
      }
    },
    "/llms-full.txt": {
      "get": {
        "tags": ["bulk"],
        "operationId": "getLlmsFull",
        "summary": "Full text of every reference page in one document",
        "description": "Concatenated Markdown of all framework guides, comparisons and prompt flows, each preceded by its source URL. Roughly 800 KB.",
        "responses": {
          "200": {
            "description": "Full-text document.",
            "content": { "text/plain": { "schema": { "type": "string" } } }
          }
        }
      }
    },
    "/sitemap.xml": {
      "get": {
        "tags": ["bulk"],
        "operationId": "getSitemap",
        "summary": "XML sitemap of all pages",
        "responses": {
          "200": {
            "description": "Sitemap.",
            "content": { "application/xml": { "schema": { "type": "string" } } }
          }
        }
      }
    },
    "/mcp": {
      "post": {
        "tags": ["bulk"],
        "operationId": "mcp",
        "summary": "Model Context Protocol endpoint (Streamable HTTP)",
        "description": "JSON-RPC 2.0 MCP server exposing the framework reference as tools (`list_frameworks`, `get_framework`, `recommend_framework`), resources (every guide) and prompts. Stateless and unauthenticated; responses are returned as a single `application/json` object rather than an SSE stream. `GET` returns 405, as no server-initiated stream is offered. The server card is at `/.well-known/mcp/server-card.json`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "type": "object" },
              "example": { "jsonrpc": "2.0", "id": 1, "method": "tools/list" }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC response.",
            "content": { "application/json": { "schema": { "type": "object" } } }
          },
          "202": { "description": "Notification or response accepted; no body." },
          "400": { "description": "Parse error or unsupported MCP-Protocol-Version." }
        }
      }
    },
    "/.well-known/api-catalog": {
      "get": {
        "tags": ["bulk"],
        "operationId": "getApiCatalog",
        "summary": "API catalog for this site (RFC 9727)",
        "responses": {
          "200": {
            "description": "Linkset document.",
            "content": { "application/linkset+json": { "schema": { "type": "object" } } }
          }
        }
      }
    }
  }
}
