{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/superdocs-app/json-schema/superdocs-app-base64-upload-request-schema.json",
  "title": "Base64UploadRequest",
  "description": "JSON request body for base64-encoded file uploads.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/superdocs-app-attachments-api-openapi.yml#/components/schemas/Base64UploadRequest",
  "properties": {
    "filename": {
      "type": "string",
      "maxLength": 512,
      "title": "Filename",
      "description": "Original filename with extension (e.g. 'contract.pdf'). Used for file type detection."
    },
    "file_base64": {
      "type": "string",
      "maxLength": 50000000,
      "title": "File Base64",
      "description": "Base64-encoded file content."
    },
    "session_id": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 256
        },
        {
          "type": "null"
        }
      ],
      "title": "Session Id",
      "description": "Session ID. Auto-generated if not provided."
    },
    "return_html": {
      "type": "boolean",
      "title": "Return Html",
      "description": "With a session_id: false (default) returns compact metadata only (chunks_count, version_id, page_setup) — the document is loaded into the session and you edit it via chat, keeping your context small; true returns the full parsed HTML inline. Ignored on the convert-only path (no session_id), which always returns the converted html.",
      "default": false
    }
  },
  "type": "object",
  "required": [
    "filename",
    "file_base64"
  ]
}