{
 "openapi": "3.1.0",
 "info": {
  "title": "emin.de public API",
  "version": "1.0.0",
  "description": "emin.de publishes long-form written work by Emin Mahrt on Bitcoin self-custody, payment rails, AI agents and the engineering behind them. Every post is plain Markdown in a public GitHub repository and is served as HTML, Markdown, JSON, feeds and through a public MCP server. Read-only. No credentials for article reads; the bulk corpus answers with an x402 payment challenge.",
  "license": {
   "name": "MIT",
   "identifier": "MIT"
  },
  "x-deprecation-policy": "Breaking changes ship under a new path. Deprecated operations are marked deprecated: true and announce the Deprecation (RFC 9745) and Sunset (RFC 8594) headers at least 90 days before removal."
 },
 "servers": [
  {
   "url": "https://emin.de/"
  }
 ],
 "paths": {
  "/api/articles": {
   "get": {
    "operationId": "listArticles",
    "summary": "List every published post",
    "responses": {
     "200": {
      "description": "All posts",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ArticleList"
        }
       }
      }
     },
     "429": {
      "description": "Rate limit exceeded",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      }
     }
    }
   }
  },
  "/api/articles/{slug}": {
   "get": {
    "operationId": "getArticle",
    "summary": "One post including its full Markdown",
    "parameters": [
     {
      "name": "slug",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "The post",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ArticleFull"
        }
       }
      }
     },
     "404": {
      "description": "No post with that slug",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      }
     },
     "429": {
      "description": "Rate limit exceeded",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/corpus": {
   "get": {
    "operationId": "getCorpus",
    "summary": "Every post in one document (x402, paid)",
    "responses": {
     "402": {
      "description": "x402 payment challenge",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "429": {
      "description": "Rate limit exceeded",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      }
     }
    }
   }
  },
  "/mcp": {
   "post": {
    "operationId": "mcpRpc",
    "summary": "MCP Streamable HTTP endpoint (JSON-RPC 2.0)",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "JSON-RPC response",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "202": {
      "description": "Notification accepted, no body"
     },
     "429": {
      "description": "Rate limit exceeded",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      }
     }
    }
   }
  }
 },
 "components": {
  "schemas": {
   "Problem": {
    "type": "object",
    "required": [
     "type",
     "title",
     "status"
    ],
    "properties": {
     "type": {
      "type": "string"
     },
     "title": {
      "type": "string"
     },
     "status": {
      "type": "integer"
     },
     "detail": {
      "type": "string"
     },
     "instance": {
      "type": "string"
     }
    }
   },
   "ArticleSummary": {
    "type": "object",
    "required": [
     "slug",
     "title",
     "url"
    ],
    "properties": {
     "slug": {
      "type": "string"
     },
     "title": {
      "type": "string"
     },
     "description": {
      "type": "string"
     },
     "publishedAt": {
      "type": "string",
      "format": "date"
     },
     "modifiedAt": {
      "type": "string",
      "format": "date"
     },
     "lang": {
      "type": "string"
     },
     "category": {
      "type": "string"
     },
     "format": {
      "type": "string"
     },
     "author": {
      "type": "string"
     },
     "authorType": {
      "type": "string",
      "enum": [
       "human",
       "ai_editorial"
      ]
     },
     "provenance": {
      "type": "string",
      "enum": [
       "transcript",
       "written",
       "ai_generated"
      ]
     },
     "topics": {
      "type": "array",
      "items": {
       "type": "string"
      }
     },
     "wordCount": {
      "type": "integer"
     },
     "url": {
      "type": "string",
      "format": "uri"
     },
     "markdownUrl": {
      "type": "string",
      "format": "uri"
     }
    }
   },
   "ArticleList": {
    "type": "object",
    "properties": {
     "count": {
      "type": "integer"
     },
     "articles": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/ArticleSummary"
      }
     }
    }
   },
   "ArticleFull": {
    "allOf": [
     {
      "$ref": "#/components/schemas/ArticleSummary"
     },
     {
      "type": "object",
      "properties": {
       "markdown": {
        "type": "string"
       }
      }
     }
    ]
   }
  }
 }
}