{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/docspeed-ai/json-schema/docspeed-ai-classify-request-schema.json",
  "title": "ClassifyRequest",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/docspeed-ai-openapi.json#/components/schemas/ClassifyRequest",
  "properties": {
    "input": {
      "$ref": "#/$defs/InputSource"
    },
    "execution_mode": {
      "type": "string",
      "enum": [
        "async",
        "sync"
      ],
      "title": "Execution Mode",
      "default": "async"
    },
    "input_type": {
      "type": "string",
      "enum": [
        "markdown",
        "image",
        "pdf",
        "text",
        "auto"
      ],
      "title": "Input Type",
      "default": "auto"
    },
    "classification_scope": {
      "type": "string",
      "enum": [
        "document",
        "page"
      ],
      "title": "Classification Scope",
      "default": "document"
    },
    "verbosity": {
      "type": "string",
      "enum": [
        "none",
        "debug"
      ],
      "title": "Verbosity",
      "default": "none"
    },
    "class_definitions": {
      "items": {
        "$ref": "#/$defs/ClassDefinition"
      },
      "type": "array",
      "title": "Class Definitions"
    }
  },
  "type": "object",
  "required": [
    "input"
  ],
  "$defs": {
    "ClassDefinition": {
      "properties": {
        "label": {
          "type": "string",
          "title": "Label"
        },
        "description": {
          "type": "string",
          "title": "Description"
        }
      },
      "type": "object",
      "required": [
        "label",
        "description"
      ],
      "title": "ClassDefinition"
    },
    "InputSource": {
      "properties": {
        "file_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "File Id"
        },
        "text": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Text"
        },
        "markdown": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Markdown"
        },
        "image_base64": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Image Base64"
        },
        "pdf_base64": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Pdf Base64"
        },
        "filename": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Filename"
        }
      },
      "type": "object",
      "title": "InputSource"
    }
  }
}