{
  "openapi": "3.0.3",
  "info": {
    "title": "MaynorAI article-sync API",
    "version": "0.2.47.49",
    "description": "Cloud draft APIs for MaynorAI文章同步助手. These endpoints manage the user's cloud article and video libraries. They do not publish to WeChat, Zhihu, or other platforms. Syncing to platforms still uses the browser extension and defaults to drafts. Create an API key at https://editor.maynor1024.live/settings/apikeys."
  },
  "servers": [
    {
      "url": "https://editor.maynor1024.live"
    }
  ],
  "paths": {
    "/api/library/articles": {
      "get": {
        "operationId": "listLibraryArticles",
        "summary": "List cloud article drafts",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Article list"
          },
          "401": {
            "description": "Login or API key required"
          }
        }
      },
      "post": {
        "operationId": "createLibraryArticle",
        "summary": "Create a cloud article draft (does not publish)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Created draft"
          },
          "401": {
            "description": "Login or API key required"
          }
        }
      }
    },
    "/api/library/articles/{id}": {
      "get": {
        "operationId": "getLibraryArticle",
        "summary": "Read one cloud article draft",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Draft"
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Not found"
          }
        }
      },
      "put": {
        "operationId": "updateLibraryArticle",
        "summary": "Update a cloud article draft (does not publish)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Updated draft"
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Not found"
          }
        }
      },
      "delete": {
        "operationId": "deleteLibraryArticle",
        "summary": "Soft-delete a cloud article draft",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted"
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/api/library/videos": {
      "get": {
        "operationId": "listLibraryVideos",
        "summary": "List cloud video drafts (does not publish)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Video list"
          },
          "401": {
            "description": "Unauthorized"
          }
        }
      }
    },
    "/api/library/videos/{id}": {
      "get": {
        "operationId": "getLibraryVideo",
        "summary": "Read one cloud video draft (does not publish)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Draft"
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/mcp": {
      "post": {
        "operationId": "mcpJsonRpc",
        "summary": "User MCP (Streamable HTTP). Requires an API key. Tools manage cloud drafts only and do not publish.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "JSON-RPC response"
          },
          "401": {
            "description": "Missing or invalid API key"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "API key",
        "description": "Personal API key from https://editor.maynor1024.live/settings/apikeys, prefixed with sk_."
      }
    }
  }
}