{
  "openapi": "3.1.0",
  "info": {
    "title": "Dawloom document to markdown API",
    "version": "1.0.0",
    "description": "Convert Word, PDF, PowerPoint, Excel, OpenDocument, RTF, EPUB, and CSV documents to GitHub-flavored markdown. Free, no authentication, files are converted in memory and never stored. Also available as an MCP server at https://dawloom.com/mcp for AI agents."
  },
  "servers": [
    {
      "url": "https://dawloom.com"
    }
  ],
  "paths": {
    "/api/convert": {
      "get": {
        "summary": "Usage documentation",
        "responses": {
          "200": {
            "description": "Usage examples and limits"
          }
        }
      },
      "post": {
        "summary": "Convert a document to markdown",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                },
                "required": [
                  "file"
                ]
              }
            },
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "HTTP(S) URL of the document to fetch and convert"
                  },
                  "base64": {
                    "type": "string",
                    "description": "Base64-encoded document bytes"
                  },
                  "filename": {
                    "type": "string",
                    "description": "Filename with extension, improves format detection and is required for CSV"
                  }
                }
              }
            },
            "application/octet-stream": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Converted markdown. JSON envelope by default; send \"Accept: text/markdown\" for the raw markdown body.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "format": {
                      "type": "string"
                    },
                    "duration_ms": {
                      "type": "number"
                    },
                    "markdown": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "File exceeds the 25 MB limit"
          },
          "422": {
            "description": "Conversion failed: unsupported, malformed, encrypted, resourceLimit, or missingPart"
          }
        }
      }
    }
  }
}