{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/docspeed-ai/json-schema/docspeed-ai-synthesize-response-schema.json",
  "title": "SynthesizeResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/docspeed-ai-generation-api-openapi.yml#/components/schemas/SynthesizeResponse",
  "properties": {
    "file": {
      "$ref": "#/$defs/FileRef"
    },
    "pages": {
      "items": {
        "$ref": "#/$defs/SynthesizePage"
      },
      "type": "array",
      "title": "Pages"
    },
    "task": {
      "type": "string",
      "enum": [
        "edit_document",
        "generate_po",
        "generate_related_document"
      ],
      "title": "Task"
    },
    "prompt": {
      "type": "string",
      "title": "Prompt"
    },
    "source_file_ids": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Source File Ids"
    },
    "metadata": {
      "additionalProperties": true,
      "type": "object",
      "title": "Metadata"
    }
  },
  "type": "object",
  "required": [
    "file",
    "task",
    "prompt"
  ],
  "$defs": {
    "FileRef": {
      "properties": {
        "file_id": {
          "type": "string",
          "title": "File Id"
        },
        "filename": {
          "type": "string",
          "title": "Filename"
        },
        "content_type": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Content Type"
        },
        "size_bytes": {
          "type": "integer",
          "title": "Size Bytes"
        },
        "created_at": {
          "type": "number",
          "title": "Created At"
        },
        "page_count": {
          "type": "integer",
          "title": "Page Count",
          "default": 1
        }
      },
      "type": "object",
      "required": [
        "file_id",
        "filename",
        "size_bytes",
        "created_at"
      ],
      "title": "FileRef"
    },
    "SynthesizePage": {
      "properties": {
        "page_index": {
          "type": "integer",
          "title": "Page Index"
        },
        "width": {
          "type": "integer",
          "title": "Width"
        },
        "height": {
          "type": "integer",
          "title": "Height"
        },
        "image_ref": {
          "type": "string",
          "title": "Image Ref"
        }
      },
      "type": "object",
      "required": [
        "page_index",
        "width",
        "height",
        "image_ref"
      ],
      "title": "SynthesizePage"
    }
  }
}