{
  "components": {
    "schemas": {
      "AddFavoriteRequest": {
        "properties": {
          "page_number": {
            "title": "Page Number",
            "type": "integer"
          },
          "pdf_id": {
            "title": "Pdf Id",
            "type": "integer"
          }
        },
        "required": [
          "pdf_id",
          "page_number"
        ],
        "title": "AddFavoriteRequest",
        "type": "object"
      },
      "Body_replace_document_api_pdfs__pdf_id__replace_post": {
        "properties": {
          "file": {
            "contentMediaType": "application/octet-stream",
            "title": "File",
            "type": "string"
          }
        },
        "required": [
          "file"
        ],
        "title": "Body_replace_document_api_pdfs__pdf_id__replace_post",
        "type": "object"
      },
      "Body_upload_pdf_api_pdfs_post": {
        "properties": {
          "file": {
            "contentMediaType": "application/octet-stream",
            "title": "File",
            "type": "string"
          },
          "skip_indexing": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Skip Indexing"
          },
          "space_id": {
            "default": 1,
            "title": "Space Id",
            "type": "integer"
          },
          "tags": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Tags",
            "type": "array"
          }
        },
        "required": [
          "file"
        ],
        "title": "Body_upload_pdf_api_pdfs_post",
        "type": "object"
      },
      "BuildSpaceIndex": {
        "properties": {
          "action": {
            "enum": [
              "create",
              "rebuild"
            ],
            "title": "Action",
            "type": "string"
          }
        },
        "required": [
          "action"
        ],
        "title": "BuildSpaceIndex",
        "type": "object"
      },
      "CreateSpace": {
        "properties": {
          "name": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "title": "CreateSpace",
        "type": "object"
      },
      "DuplicatePairSchema": {
        "properties": {
          "detected_at": {
            "title": "Detected At",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "matched_pages": {
            "title": "Matched Pages",
            "type": "integer"
          },
          "page_matches": {
            "default": [],
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Page Matches",
            "type": "array"
          },
          "pdf_created_existing": {
            "title": "Pdf Created Existing",
            "type": "string"
          },
          "pdf_created_new": {
            "title": "Pdf Created New",
            "type": "string"
          },
          "pdf_id_existing": {
            "title": "Pdf Id Existing",
            "type": "integer"
          },
          "pdf_id_new": {
            "title": "Pdf Id New",
            "type": "integer"
          },
          "pdf_name_existing": {
            "title": "Pdf Name Existing",
            "type": "string"
          },
          "pdf_name_new": {
            "title": "Pdf Name New",
            "type": "string"
          },
          "pdf_page_count_existing": {
            "title": "Pdf Page Count Existing",
            "type": "integer"
          },
          "pdf_page_count_new": {
            "title": "Pdf Page Count New",
            "type": "integer"
          },
          "similarity_score": {
            "title": "Similarity Score",
            "type": "number"
          },
          "total_pages_new": {
            "title": "Total Pages New",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "pdf_id_new",
          "pdf_name_new",
          "pdf_page_count_new",
          "pdf_created_new",
          "pdf_id_existing",
          "pdf_name_existing",
          "pdf_page_count_existing",
          "pdf_created_existing",
          "similarity_score",
          "matched_pages",
          "total_pages_new",
          "detected_at"
        ],
        "title": "DuplicatePairSchema",
        "type": "object"
      },
      "EmbedderInfo": {
        "properties": {
          "description": {
            "title": "Description",
            "type": "string"
          },
          "dims_default": {
            "default": 128,
            "title": "Dims Default",
            "type": "integer"
          },
          "download_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Download Error"
          },
          "downloaded": {
            "default": false,
            "title": "Downloaded",
            "type": "boolean"
          },
          "downloaded_bytes": {
            "default": 0,
            "title": "Downloaded Bytes",
            "type": "integer"
          },
          "downloading": {
            "default": false,
            "title": "Downloading",
            "type": "boolean"
          },
          "index_bytes": {
            "default": 0,
            "title": "Index Bytes",
            "type": "integer"
          },
          "index_database_bytes": {
            "default": 0,
            "title": "Index Database Bytes",
            "type": "integer"
          },
          "index_files_bytes": {
            "default": 0,
            "title": "Index Files Bytes",
            "type": "integer"
          },
          "indexed_pages": {
            "default": 0,
            "title": "Indexed Pages",
            "type": "integer"
          },
          "indexed_pdfs": {
            "default": 0,
            "title": "Indexed Pdfs",
            "type": "integer"
          },
          "loaded": {
            "default": false,
            "title": "Loaded",
            "type": "boolean"
          },
          "local_supported": {
            "default": true,
            "title": "Local Supported",
            "type": "boolean"
          },
          "memory_bytes": {
            "default": 0,
            "title": "Memory Bytes",
            "type": "integer"
          },
          "memory_devices": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Memory Devices",
            "type": "array"
          },
          "model_id": {
            "default": "",
            "title": "Model Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "required_models": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Required Models",
            "type": "array"
          },
          "size_bytes": {
            "default": 0,
            "title": "Size Bytes",
            "type": "integer"
          },
          "supports_heatmap": {
            "default": true,
            "title": "Supports Heatmap",
            "type": "boolean"
          },
          "total_bytes": {
            "default": 0,
            "title": "Total Bytes",
            "type": "integer"
          },
          "total_pages": {
            "default": 0,
            "title": "Total Pages",
            "type": "integer"
          },
          "total_pdfs": {
            "default": 0,
            "title": "Total Pdfs",
            "type": "integer"
          }
        },
        "required": [
          "name",
          "description"
        ],
        "title": "EmbedderInfo",
        "type": "object"
      },
      "EnqueueRequest": {
        "properties": {
          "force": {
            "default": false,
            "title": "Force",
            "type": "boolean"
          },
          "kind": {
            "default": "ocr",
            "enum": [
              "ocr",
              "text"
            ],
            "title": "Kind",
            "type": "string"
          },
          "pdf_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "integer"
                },
                "maxItems": 10000,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pdf Ids"
          },
          "space_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Space Id"
          }
        },
        "title": "EnqueueRequest",
        "type": "object"
      },
      "FavoriteItem": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "image_url": {
            "title": "Image Url",
            "type": "string"
          },
          "page_number": {
            "title": "Page Number",
            "type": "integer"
          },
          "pdf_filename": {
            "title": "Pdf Filename",
            "type": "string"
          },
          "pdf_id": {
            "title": "Pdf Id",
            "type": "integer"
          },
          "tags": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Tags",
            "type": "array"
          }
        },
        "required": [
          "id",
          "pdf_id",
          "page_number",
          "created_at",
          "pdf_filename",
          "image_url"
        ],
        "title": "FavoriteItem",
        "type": "object"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "title": "Detail",
            "type": "array"
          }
        },
        "title": "HTTPValidationError",
        "type": "object"
      },
      "IndexingStatusResponse": {
        "properties": {
          "active_job": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Active Job"
          },
          "active_jobs": {
            "default": [],
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Active Jobs",
            "type": "array"
          },
          "jobs": {
            "default": [],
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Jobs",
            "type": "array"
          },
          "paused": {
            "title": "Paused",
            "type": "boolean"
          },
          "queue_size": {
            "title": "Queue Size",
            "type": "integer"
          }
        },
        "required": [
          "paused",
          "queue_size"
        ],
        "title": "IndexingStatusResponse",
        "type": "object"
      },
      "LocalSearchFallback": {
        "properties": {
          "downloaded": {
            "title": "Downloaded",
            "type": "boolean"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "name",
          "downloaded"
        ],
        "title": "LocalSearchFallback",
        "type": "object"
      },
      "MetadataItem": {
        "properties": {
          "key": {
            "title": "Key",
            "type": "string"
          },
          "value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Value"
          }
        },
        "required": [
          "key"
        ],
        "title": "MetadataItem",
        "type": "object"
      },
      "MetadataUpdateRequest": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "title": "Metadata",
            "type": "object"
          }
        },
        "required": [
          "metadata"
        ],
        "title": "MetadataUpdateRequest",
        "type": "object"
      },
      "MoveDocumentsRequest": {
        "properties": {
          "pdf_ids": {
            "items": {
              "type": "integer"
            },
            "maxItems": 10000,
            "minItems": 1,
            "title": "Pdf Ids",
            "type": "array"
          },
          "target_space_id": {
            "title": "Target Space Id",
            "type": "integer"
          }
        },
        "required": [
          "pdf_ids",
          "target_space_id"
        ],
        "title": "MoveDocumentsRequest",
        "type": "object"
      },
      "PDFListItem": {
        "properties": {
          "auto_tags": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Auto Tags",
            "type": "array"
          },
          "conversion_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Conversion Error"
          },
          "conversion_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Conversion Status"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "media_type": {
            "default": "application/pdf",
            "title": "Media Type",
            "type": "string"
          },
          "model_indexed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Indexed"
          },
          "original_filename": {
            "title": "Original Filename",
            "type": "string"
          },
          "page_count": {
            "title": "Page Count",
            "type": "integer"
          },
          "source": {
            "default": "local",
            "title": "Source",
            "type": "string"
          },
          "space_id": {
            "default": 1,
            "title": "Space Id",
            "type": "integer"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "tags": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Tags",
            "type": "array"
          },
          "version": {
            "default": 1,
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "original_filename",
          "page_count",
          "status",
          "created_at"
        ],
        "title": "PDFListItem",
        "type": "object"
      },
      "PDFResponse": {
        "properties": {
          "conversion_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Conversion Error"
          },
          "conversion_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Conversion Status"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          },
          "filename": {
            "title": "Filename",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "md5_hash": {
            "title": "Md5 Hash",
            "type": "string"
          },
          "media_type": {
            "default": "application/pdf",
            "title": "Media Type",
            "type": "string"
          },
          "metadata": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/MetadataItem"
            },
            "title": "Metadata",
            "type": "array"
          },
          "original_filename": {
            "title": "Original Filename",
            "type": "string"
          },
          "page_count": {
            "title": "Page Count",
            "type": "integer"
          },
          "source": {
            "default": "local",
            "title": "Source",
            "type": "string"
          },
          "space_id": {
            "default": 1,
            "title": "Space Id",
            "type": "integer"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "tags": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/TagSchema"
            },
            "title": "Tags",
            "type": "array"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "version": {
            "default": 1,
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "filename",
          "original_filename",
          "md5_hash",
          "page_count",
          "status",
          "created_at",
          "updated_at"
        ],
        "title": "PDFResponse",
        "type": "object"
      },
      "RenameRequest": {
        "properties": {
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "title": "RenameRequest",
        "type": "object"
      },
      "ResolveDuplicateRequest": {
        "properties": {
          "action": {
            "title": "Action",
            "type": "string"
          }
        },
        "required": [
          "action"
        ],
        "title": "ResolveDuplicateRequest",
        "type": "object"
      },
      "SearchResponse": {
        "properties": {
          "embedder_name": {
            "default": "",
            "title": "Embedder Name",
            "type": "string"
          },
          "external_unavailable": {
            "default": false,
            "title": "External Unavailable",
            "type": "boolean"
          },
          "local_fallback": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LocalSearchFallback"
              },
              {
                "type": "null"
              }
            ]
          },
          "query": {
            "title": "Query",
            "type": "string"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/SearchResultItem"
            },
            "title": "Results",
            "type": "array"
          },
          "semantic_weight": {
            "default": 0.5,
            "title": "Semantic Weight",
            "type": "number"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          },
          "unindexed_pages": {
            "default": 0,
            "title": "Unindexed Pages",
            "type": "integer"
          },
          "unindexed_pdfs": {
            "default": 0,
            "title": "Unindexed Pdfs",
            "type": "integer"
          },
          "warnings": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Warnings",
            "type": "array"
          }
        },
        "required": [
          "query",
          "results",
          "total"
        ],
        "title": "SearchResponse",
        "type": "object"
      },
      "SearchResultItem": {
        "properties": {
          "bm25_score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bm25 Score"
          },
          "image_url": {
            "title": "Image Url",
            "type": "string"
          },
          "is_favorite": {
            "default": false,
            "title": "Is Favorite",
            "type": "boolean"
          },
          "match_types": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Match Types",
            "type": "array"
          },
          "media_type": {
            "default": "application/pdf",
            "title": "Media Type",
            "type": "string"
          },
          "page_number": {
            "title": "Page Number",
            "type": "integer"
          },
          "pdf_filename": {
            "title": "Pdf Filename",
            "type": "string"
          },
          "pdf_id": {
            "title": "Pdf Id",
            "type": "integer"
          },
          "score": {
            "title": "Score",
            "type": "number"
          },
          "semantic_score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Semantic Score"
          },
          "snippet": {
            "default": "",
            "title": "Snippet",
            "type": "string"
          },
          "source": {
            "default": "local",
            "title": "Source",
            "type": "string"
          },
          "space_id": {
            "default": 1,
            "title": "Space Id",
            "type": "integer"
          },
          "tags": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Tags",
            "type": "array"
          },
          "text_layer": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Text Layer"
          },
          "text_sources": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Text Sources",
            "type": "array"
          },
          "text_url": {
            "default": "",
            "title": "Text Url",
            "type": "string"
          },
          "vector_id": {
            "title": "Vector Id",
            "type": "string"
          }
        },
        "required": [
          "pdf_id",
          "pdf_filename",
          "page_number",
          "score",
          "image_url",
          "vector_id"
        ],
        "title": "SearchResultItem",
        "type": "object"
      },
      "SettingsResponse": {
        "properties": {
          "settings": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Settings",
            "type": "object"
          }
        },
        "required": [
          "settings"
        ],
        "title": "SettingsResponse",
        "type": "object"
      },
      "SettingsUpdateRequest": {
        "properties": {
          "settings": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Settings",
            "type": "object"
          }
        },
        "required": [
          "settings"
        ],
        "title": "SettingsUpdateRequest",
        "type": "object"
      },
      "SpaceIcon": {
        "properties": {
          "icon": {
            "anyOf": [
              {
                "maxLength": 350000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Icon"
          }
        },
        "title": "SpaceIcon",
        "type": "object"
      },
      "SpaceProcessingSettings": {
        "properties": {
          "indexing_batch_size": {
            "maximum": 32.0,
            "minimum": 1.0,
            "title": "Indexing Batch Size",
            "type": "integer"
          },
          "pdf_dpi": {
            "maximum": 300.0,
            "minimum": 72.0,
            "title": "Pdf Dpi",
            "type": "integer"
          },
          "pool_factor": {
            "maximum": 10.0,
            "minimum": 1.0,
            "title": "Pool Factor",
            "type": "integer"
          }
        },
        "required": [
          "pool_factor",
          "indexing_batch_size",
          "pdf_dpi"
        ],
        "title": "SpaceProcessingSettings",
        "type": "object"
      },
      "SpaceSelection": {
        "properties": {
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          },
          "space_ids": {
            "items": {
              "type": "integer"
            },
            "maxItems": 10000,
            "title": "Space Ids",
            "type": "array"
          }
        },
        "required": [
          "space_ids",
          "enabled"
        ],
        "title": "SpaceSelection",
        "type": "object"
      },
      "TagSchema": {
        "properties": {
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "title": "TagSchema",
        "type": "object"
      },
      "TagsUpdateRequest": {
        "properties": {
          "tags": {
            "items": {
              "type": "string"
            },
            "title": "Tags",
            "type": "array"
          }
        },
        "required": [
          "tags"
        ],
        "title": "TagsUpdateRequest",
        "type": "object"
      },
      "ValidationError": {
        "properties": {
          "ctx": {
            "title": "Context",
            "type": "object"
          },
          "input": {
            "title": "Input"
          },
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "title": "Location",
            "type": "array"
          },
          "msg": {
            "title": "Message",
            "type": "string"
          },
          "type": {
            "title": "Error Type",
            "type": "string"
          }
        },
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError",
        "type": "object"
      },
      "VectorSearchMode": {
        "properties": {
          "mode": {
            "enum": [
              "memory",
              "plaid"
            ],
            "title": "Mode",
            "type": "string"
          }
        },
        "required": [
          "mode"
        ],
        "title": "VectorSearchMode",
        "type": "object"
      }
    },
    "securitySchemes": {
      "APIKeyHeader": {
        "in": "header",
        "name": "X-API-Key",
        "type": "apiKey"
      }
    }
  },
  "info": {
    "description": "Local desktop API; bind to loopback. Authentication is route-specific.",
    "title": "PDFSearch API",
    "version": "0.1.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/api/conversion/pause": {
      "post": {
        "operationId": "pause_api_conversion_pause_post",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Pause",
        "tags": [
          "Document conversion"
        ]
      }
    },
    "/api/conversion/resume": {
      "post": {
        "operationId": "resume_api_conversion_resume_post",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Resume",
        "tags": [
          "Document conversion"
        ]
      }
    },
    "/api/conversion/status": {
      "get": {
        "operationId": "status_api_conversion_status_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Status",
        "tags": [
          "Document conversion"
        ]
      }
    },
    "/api/conversion/{pdf_id}/retry": {
      "post": {
        "operationId": "retry_api_conversion__pdf_id__retry_post",
        "parameters": [
          {
            "in": "path",
            "name": "pdf_id",
            "required": true,
            "schema": {
              "title": "Pdf Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Retry",
        "tags": [
          "Document conversion"
        ]
      }
    },
    "/api/duplicates": {
      "get": {
        "operationId": "list_duplicates_api_duplicates_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/DuplicatePairSchema"
                  },
                  "title": "Response List Duplicates Api Duplicates Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "List Duplicates",
        "tags": [
          "duplicates"
        ]
      }
    },
    "/api/duplicates/count": {
      "get": {
        "operationId": "get_duplicate_count_api_duplicates_count_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Get Duplicate Count",
        "tags": [
          "duplicates"
        ]
      }
    },
    "/api/duplicates/{dup_id}/resolve": {
      "post": {
        "description": "action: \"replace_old\" | \"keep_old\" | \"keep_both\"\nreplace_old: delete the existing (old) PDF, keep new\nkeep_old: delete the new PDF, keep existing\nkeep_both: just dismiss the duplicate record",
        "operationId": "resolve_duplicate_api_duplicates__dup_id__resolve_post",
        "parameters": [
          {
            "in": "path",
            "name": "dup_id",
            "required": true,
            "schema": {
              "title": "Dup Id",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResolveDuplicateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Resolve Duplicate",
        "tags": [
          "duplicates"
        ]
      }
    },
    "/api/favorites": {
      "get": {
        "operationId": "list_favorites_api_favorites_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/FavoriteItem"
                  },
                  "title": "Response List Favorites Api Favorites Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "List Favorites",
        "tags": [
          "favorites"
        ]
      },
      "post": {
        "operationId": "add_favorite_api_favorites_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddFavoriteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FavoriteItem"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Add Favorite",
        "tags": [
          "favorites"
        ]
      }
    },
    "/api/favorites/by-page/{pdf_id}/{page_number}": {
      "delete": {
        "operationId": "remove_favorite_by_page_api_favorites_by_page__pdf_id___page_number__delete",
        "parameters": [
          {
            "in": "path",
            "name": "pdf_id",
            "required": true,
            "schema": {
              "title": "Pdf Id",
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "page_number",
            "required": true,
            "schema": {
              "title": "Page Number",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Remove Favorite By Page",
        "tags": [
          "favorites"
        ]
      }
    },
    "/api/favorites/check/{pdf_id}": {
      "get": {
        "description": "Return list of page_numbers (0-indexed) that are favourited for a given PDF.",
        "operationId": "get_favorited_pages_api_favorites_check__pdf_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "pdf_id",
            "required": true,
            "schema": {
              "title": "Pdf Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "type": "integer"
                  },
                  "title": "Response Get Favorited Pages Api Favorites Check  Pdf Id  Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Get Favorited Pages",
        "tags": [
          "favorites"
        ]
      }
    },
    "/api/favorites/{favorite_id}": {
      "delete": {
        "operationId": "remove_favorite_api_favorites__favorite_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "favorite_id",
            "required": true,
            "schema": {
              "title": "Favorite Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Remove Favorite",
        "tags": [
          "favorites"
        ]
      }
    },
    "/api/indexing/cancel/{pdf_id}": {
      "post": {
        "operationId": "cancel_job_api_indexing_cancel__pdf_id__post",
        "parameters": [
          {
            "in": "path",
            "name": "pdf_id",
            "required": true,
            "schema": {
              "title": "Pdf Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Cancel Job",
        "tags": [
          "indexing"
        ]
      }
    },
    "/api/indexing/pause": {
      "post": {
        "operationId": "pause_api_indexing_pause_post",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Pause",
        "tags": [
          "indexing"
        ]
      }
    },
    "/api/indexing/resume": {
      "post": {
        "operationId": "resume_api_indexing_resume_post",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Resume",
        "tags": [
          "indexing"
        ]
      }
    },
    "/api/indexing/status": {
      "get": {
        "operationId": "get_status_api_indexing_status_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IndexingStatusResponse"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Get Status",
        "tags": [
          "indexing"
        ]
      }
    },
    "/api/indexing/stream": {
      "get": {
        "description": "Server-Sent Events endpoint for real-time indexing progress.\nConnect with EventSource('/api/indexing/stream').",
        "operationId": "stream_progress_api_indexing_stream_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Stream Progress",
        "tags": [
          "indexing"
        ]
      }
    },
    "/api/ocr/engines": {
      "get": {
        "operationId": "engines_api_ocr_engines_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Engines",
        "tags": [
          "OCR and text index"
        ]
      }
    },
    "/api/ocr/enqueue": {
      "post": {
        "operationId": "enqueue_api_ocr_enqueue_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnqueueRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Enqueue",
        "tags": [
          "OCR and text index"
        ]
      }
    },
    "/api/ocr/index": {
      "get": {
        "operationId": "index_stats_api_ocr_index_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Index Stats",
        "tags": [
          "OCR and text index"
        ]
      }
    },
    "/api/ocr/index/rebuild": {
      "post": {
        "operationId": "rebuild_api_ocr_index_rebuild_post",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Rebuild",
        "tags": [
          "OCR and text index"
        ]
      }
    },
    "/api/ocr/pages/{pdf_id}/{page_number}": {
      "post": {
        "operationId": "recognize_page_now_api_ocr_pages__pdf_id___page_number__post",
        "parameters": [
          {
            "in": "path",
            "name": "pdf_id",
            "required": true,
            "schema": {
              "title": "Pdf Id",
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "page_number",
            "required": true,
            "schema": {
              "title": "Page Number",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Recognize Page Now",
        "tags": [
          "OCR and text index"
        ]
      }
    },
    "/api/ocr/pause": {
      "post": {
        "operationId": "pause_api_ocr_pause_post",
        "parameters": [
          {
            "in": "query",
            "name": "kind",
            "required": false,
            "schema": {
              "default": "ocr",
              "enum": [
                "ocr",
                "text"
              ],
              "title": "Kind",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Pause",
        "tags": [
          "OCR and text index"
        ]
      }
    },
    "/api/ocr/resume": {
      "post": {
        "operationId": "resume_api_ocr_resume_post",
        "parameters": [
          {
            "in": "query",
            "name": "kind",
            "required": false,
            "schema": {
              "default": "ocr",
              "enum": [
                "ocr",
                "text"
              ],
              "title": "Kind",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Resume",
        "tags": [
          "OCR and text index"
        ]
      }
    },
    "/api/ocr/status": {
      "get": {
        "operationId": "status_api_ocr_status_get",
        "parameters": [
          {
            "in": "query",
            "name": "kind",
            "required": false,
            "schema": {
              "default": "ocr",
              "enum": [
                "ocr",
                "text"
              ],
              "title": "Kind",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Status",
        "tags": [
          "OCR and text index"
        ]
      }
    },
    "/api/pages/{pdf_id}/file": {
      "get": {
        "description": "Return the original PDF file for viewing.",
        "operationId": "get_pdf_file_api_pages__pdf_id__file_get",
        "parameters": [
          {
            "in": "path",
            "name": "pdf_id",
            "required": true,
            "schema": {
              "title": "Pdf Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Get Pdf File",
        "tags": [
          "pages"
        ]
      }
    },
    "/api/pages/{pdf_id}/find": {
      "get": {
        "operationId": "find_document_text_api_pages__pdf_id__find_get",
        "parameters": [
          {
            "in": "path",
            "name": "pdf_id",
            "required": true,
            "schema": {
              "title": "Pdf Id",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "q",
            "required": true,
            "schema": {
              "maxLength": 2000,
              "minLength": 1,
              "title": "Q",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Find Document Text",
        "tags": [
          "pages"
        ]
      }
    },
    "/api/pages/{pdf_id}/{page_number}/image": {
      "get": {
        "description": "Return the rendered JPEG thumbnail for a specific page.",
        "operationId": "get_page_image_api_pages__pdf_id___page_number__image_get",
        "parameters": [
          {
            "in": "path",
            "name": "pdf_id",
            "required": true,
            "schema": {
              "title": "Pdf Id",
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "page_number",
            "required": true,
            "schema": {
              "title": "Page Number",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Get Page Image",
        "tags": [
          "pages"
        ]
      }
    },
    "/api/pages/{pdf_id}/{page_number}/text": {
      "get": {
        "description": "Native and OCR text with normalized layout and literal query matches (0-based page).",
        "operationId": "get_page_text_api_pages__pdf_id___page_number__text_get",
        "parameters": [
          {
            "in": "path",
            "name": "pdf_id",
            "required": true,
            "schema": {
              "title": "Pdf Id",
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "page_number",
            "required": true,
            "schema": {
              "title": "Page Number",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "default": "",
              "maxLength": 2000,
              "title": "Q",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Get Page Text",
        "tags": [
          "pages"
        ]
      }
    },
    "/api/pdfs": {
      "get": {
        "operationId": "list_pdfs_api_pdfs_get",
        "parameters": [
          {
            "description": "Filter by filename or tag",
            "in": "query",
            "name": "search",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by filename or tag",
              "title": "Search"
            }
          },
          {
            "description": "Filter by exact tag name",
            "in": "query",
            "name": "tag",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by exact tag name",
              "title": "Tag"
            }
          },
          {
            "description": "Compute per-model index status",
            "in": "query",
            "name": "embedder_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Compute per-model index status",
              "title": "Embedder Name"
            }
          },
          {
            "in": "query",
            "name": "space_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Space Id"
            }
          },
          {
            "in": "query",
            "name": "skip",
            "required": false,
            "schema": {
              "default": 0,
              "title": "Skip",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 10000,
              "title": "Limit",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/PDFListItem"
                  },
                  "title": "Response List Pdfs Api Pdfs Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "List Pdfs",
        "tags": [
          "pdfs"
        ]
      },
      "post": {
        "operationId": "upload_pdf_api_pdfs_post",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_upload_pdf_api_pdfs_post"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PDFResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Upload Pdf",
        "tags": [
          "pdfs"
        ]
      }
    },
    "/api/pdfs/move": {
      "post": {
        "operationId": "move_pdfs_api_pdfs_move_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MoveDocumentsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Move Pdfs",
        "tags": [
          "pdfs"
        ]
      }
    },
    "/api/pdfs/{pdf_id}": {
      "delete": {
        "operationId": "delete_pdf_api_pdfs__pdf_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "pdf_id",
            "required": true,
            "schema": {
              "title": "Pdf Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Delete Pdf",
        "tags": [
          "pdfs"
        ]
      },
      "get": {
        "operationId": "get_pdf_api_pdfs__pdf_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "pdf_id",
            "required": true,
            "schema": {
              "title": "Pdf Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PDFResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Get Pdf",
        "tags": [
          "pdfs"
        ]
      }
    },
    "/api/pdfs/{pdf_id}/anytype-link": {
      "get": {
        "operationId": "anytype_link_api_pdfs__pdf_id__anytype_link_get",
        "parameters": [
          {
            "in": "path",
            "name": "pdf_id",
            "required": true,
            "schema": {
              "title": "Pdf Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Anytype Link",
        "tags": [
          "pdfs"
        ]
      }
    },
    "/api/pdfs/{pdf_id}/auto-tag": {
      "post": {
        "description": "Compute auto-tags for a PDF and apply them. Returns applied tags.",
        "operationId": "auto_tag_pdf_api_pdfs__pdf_id__auto_tag_post",
        "parameters": [
          {
            "in": "path",
            "name": "pdf_id",
            "required": true,
            "schema": {
              "title": "Pdf Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Auto Tag Pdf",
        "tags": [
          "pdfs"
        ]
      }
    },
    "/api/pdfs/{pdf_id}/file": {
      "get": {
        "operationId": "download_pdf_api_pdfs__pdf_id__file_get",
        "parameters": [
          {
            "in": "path",
            "name": "pdf_id",
            "required": true,
            "schema": {
              "title": "Pdf Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Download Pdf",
        "tags": [
          "pdfs"
        ]
      }
    },
    "/api/pdfs/{pdf_id}/metadata": {
      "put": {
        "operationId": "update_metadata_api_pdfs__pdf_id__metadata_put",
        "parameters": [
          {
            "in": "path",
            "name": "pdf_id",
            "required": true,
            "schema": {
              "title": "Pdf Id",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetadataUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PDFResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Update Metadata",
        "tags": [
          "pdfs"
        ]
      }
    },
    "/api/pdfs/{pdf_id}/reindex": {
      "post": {
        "operationId": "reindex_pdf_api_pdfs__pdf_id__reindex_post",
        "parameters": [
          {
            "in": "path",
            "name": "pdf_id",
            "required": true,
            "schema": {
              "title": "Pdf Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Reindex Pdf",
        "tags": [
          "pdfs"
        ]
      }
    },
    "/api/pdfs/{pdf_id}/rename": {
      "put": {
        "operationId": "rename_pdf_api_pdfs__pdf_id__rename_put",
        "parameters": [
          {
            "in": "path",
            "name": "pdf_id",
            "required": true,
            "schema": {
              "title": "Pdf Id",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RenameRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PDFResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Rename Pdf",
        "tags": [
          "pdfs"
        ]
      }
    },
    "/api/pdfs/{pdf_id}/replace": {
      "post": {
        "operationId": "replace_document_api_pdfs__pdf_id__replace_post",
        "parameters": [
          {
            "in": "path",
            "name": "pdf_id",
            "required": true,
            "schema": {
              "title": "Pdf Id",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_replace_document_api_pdfs__pdf_id__replace_post"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PDFResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Replace Document",
        "tags": [
          "pdfs"
        ]
      }
    },
    "/api/pdfs/{pdf_id}/tags": {
      "put": {
        "operationId": "update_tags_api_pdfs__pdf_id__tags_put",
        "parameters": [
          {
            "in": "path",
            "name": "pdf_id",
            "required": true,
            "schema": {
              "title": "Pdf Id",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TagsUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PDFResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Update Tags",
        "tags": [
          "pdfs"
        ]
      }
    },
    "/api/pdfs/{pdf_id}/versions": {
      "get": {
        "operationId": "document_versions_api_pdfs__pdf_id__versions_get",
        "parameters": [
          {
            "in": "path",
            "name": "pdf_id",
            "required": true,
            "schema": {
              "title": "Pdf Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Document Versions",
        "tags": [
          "pdfs"
        ]
      }
    },
    "/api/pdfs/{pdf_id}/versions/{version}/file": {
      "get": {
        "operationId": "download_version_api_pdfs__pdf_id__versions__version__file_get",
        "parameters": [
          {
            "in": "path",
            "name": "pdf_id",
            "required": true,
            "schema": {
              "title": "Pdf Id",
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "version",
            "required": true,
            "schema": {
              "title": "Version",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Download Version",
        "tags": [
          "pdfs"
        ]
      }
    },
    "/api/search": {
      "get": {
        "operationId": "search_pdfs_api_search_get",
        "parameters": [
          {
            "description": "Search query",
            "in": "query",
            "name": "q",
            "required": true,
            "schema": {
              "description": "Search query",
              "minLength": 1,
              "title": "Q",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "space_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Space Id"
            }
          },
          {
            "in": "query",
            "name": "space_ids",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "integer"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Space Ids"
            }
          },
          {
            "description": "Max results",
            "in": "query",
            "name": "k",
            "required": false,
            "schema": {
              "default": 100,
              "description": "Max results",
              "maximum": 100,
              "minimum": 1,
              "title": "K",
              "type": "integer"
            }
          },
          {
            "description": "0 = BM25 only, 1 = embeddings only",
            "in": "query",
            "name": "semantic_weight",
            "required": false,
            "schema": {
              "default": 0.5,
              "description": "0 = BM25 only, 1 = embeddings only",
              "maximum": 1,
              "minimum": 0,
              "title": "Semantic Weight",
              "type": "number"
            }
          },
          {
            "description": "Include native/OCR text and page layout",
            "in": "query",
            "name": "include_text",
            "required": false,
            "schema": {
              "default": false,
              "description": "Include native/OCR text and page layout",
              "title": "Include Text",
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Search Pdfs",
        "tags": [
          "search"
        ]
      }
    },
    "/api/search/heatmap": {
      "get": {
        "description": "Compute and return a per-patch similarity heatmap as a semi-transparent PNG overlay.",
        "operationId": "similarity_heatmap_api_search_heatmap_get",
        "parameters": [
          {
            "in": "query",
            "name": "pdf_id",
            "required": true,
            "schema": {
              "title": "Pdf Id",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": true,
            "schema": {
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "q",
            "required": true,
            "schema": {
              "minLength": 1,
              "title": "Q",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Similarity Heatmap",
        "tags": [
          "search"
        ]
      }
    },
    "/api/search/status": {
      "get": {
        "description": "Return whether the search model is loaded and ready.",
        "operationId": "search_status_api_search_status_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Search Status",
        "tags": [
          "search"
        ]
      }
    },
    "/api/search/stream": {
      "get": {
        "description": "Request-scoped progress and result; no global progress shared by searches.",
        "operationId": "search_stream_api_search_stream_get",
        "parameters": [
          {
            "in": "query",
            "name": "q",
            "required": true,
            "schema": {
              "minLength": 1,
              "title": "Q",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "space_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Space Id"
            }
          },
          {
            "in": "query",
            "name": "space_ids",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "integer"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Space Ids"
            }
          },
          {
            "in": "query",
            "name": "k",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 100,
              "minimum": 1,
              "title": "K",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "semantic_weight",
            "required": false,
            "schema": {
              "default": 0.5,
              "maximum": 1,
              "minimum": 0,
              "title": "Semantic Weight",
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Search Stream",
        "tags": [
          "search"
        ]
      }
    },
    "/api/settings": {
      "get": {
        "operationId": "get_settings_api_settings_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettingsResponse"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Get Settings",
        "tags": [
          "settings"
        ]
      },
      "put": {
        "operationId": "update_settings_api_settings_put",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SettingsUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettingsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Update Settings",
        "tags": [
          "settings"
        ]
      }
    },
    "/api/settings/embedders": {
      "get": {
        "operationId": "list_available_embedders_api_settings_embedders_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/EmbedderInfo"
                  },
                  "title": "Response List Available Embedders Api Settings Embedders Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "List Available Embedders",
        "tags": [
          "settings"
        ]
      }
    },
    "/api/settings/embedders/{name}/download": {
      "post": {
        "description": "Start downloading the model for an embedder (background thread).",
        "operationId": "download_embedder_api_settings_embedders__name__download_post",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "title": "Name",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Download Embedder",
        "tags": [
          "settings"
        ]
      }
    },
    "/api/settings/embedders/{name}/index": {
      "delete": {
        "operationId": "delete_model_index_api_settings_embedders__name__index_delete",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "title": "Name",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Delete Model Index",
        "tags": [
          "settings"
        ]
      }
    },
    "/api/settings/embedders/{name}/index-all": {
      "post": {
        "description": "Queue all PDFs with rendered pages for indexing with the specified embedder.\n\nAccepts both locally registered embedder names and external model names —\nthe worker resolves which actual embedder to use based on current settings.",
        "operationId": "index_all_for_embedder_api_settings_embedders__name__index_all_post",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "title": "Name",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Index All For Embedder",
        "tags": [
          "settings"
        ]
      }
    },
    "/api/settings/embedders/{name}/resources": {
      "get": {
        "operationId": "embedder_resources_api_settings_embedders__name__resources_get",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "title": "Name",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Embedder Resources",
        "tags": [
          "settings"
        ]
      }
    },
    "/api/settings/embedders/{name}/status": {
      "get": {
        "description": "Return current download/indexing status for an embedder.",
        "operationId": "embedder_status_api_settings_embedders__name__status_get",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "title": "Name",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmbedderInfo"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Embedder Status",
        "tags": [
          "settings"
        ]
      }
    },
    "/api/settings/embedders/{name}/unload": {
      "post": {
        "operationId": "unload_local_model_api_settings_embedders__name__unload_post",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "title": "Name",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Unload Local Model",
        "tags": [
          "settings"
        ]
      }
    },
    "/api/settings/external-embedders": {
      "get": {
        "description": "Proxy: fetch available embedders from the configured external embed server.\n\nThe ``url`` and ``api_key`` query parameters override values stored in\nsettings so the client can probe a server before saving.",
        "operationId": "list_external_embedders_api_settings_external_embedders_get",
        "parameters": [
          {
            "in": "query",
            "name": "url",
            "required": false,
            "schema": {
              "title": "Url",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "api_key",
            "required": false,
            "schema": {
              "title": "Api Key",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "List External Embedders",
        "tags": [
          "settings"
        ]
      }
    },
    "/api/settings/model-indexing-stats": {
      "get": {
        "operationId": "model_indexing_stats_api_settings_model_indexing_stats_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Model Indexing Stats",
        "tags": [
          "settings"
        ]
      }
    },
    "/api/settings/rebuild-index": {
      "post": {
        "operationId": "rebuild_index_endpoint_api_settings_rebuild_index_post",
        "parameters": [
          {
            "in": "query",
            "name": "embedder_name",
            "required": false,
            "schema": {
              "title": "Embedder Name",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Rebuild Index Endpoint",
        "tags": [
          "settings"
        ]
      }
    },
    "/api/spaces": {
      "get": {
        "operationId": "list_spaces_api_spaces_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "List Spaces",
        "tags": [
          "spaces"
        ]
      },
      "post": {
        "operationId": "create_space_api_spaces_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSpace"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Create Space",
        "tags": [
          "spaces"
        ]
      }
    },
    "/api/spaces/anytype/catalog": {
      "post": {
        "operationId": "refresh_anytype_catalog_api_spaces_anytype_catalog_post",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Refresh Anytype Catalog",
        "tags": [
          "spaces"
        ]
      }
    },
    "/api/spaces/anytype/selection": {
      "patch": {
        "operationId": "set_anytype_selection_api_spaces_anytype_selection_patch",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SpaceSelection"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Set Anytype Selection",
        "tags": [
          "spaces"
        ]
      }
    },
    "/api/spaces/anytype/status": {
      "get": {
        "operationId": "anytype_status_api_spaces_anytype_status_get",
        "parameters": [
          {
            "in": "query",
            "name": "refresh",
            "required": false,
            "schema": {
              "default": false,
              "title": "Refresh",
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Anytype Status",
        "tags": [
          "spaces"
        ]
      }
    },
    "/api/spaces/anytype/sync": {
      "post": {
        "operationId": "sync_anytype_api_spaces_anytype_sync_post",
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Sync Anytype",
        "tags": [
          "spaces"
        ]
      }
    },
    "/api/spaces/{space_id}/icon": {
      "patch": {
        "operationId": "update_space_icon_api_spaces__space_id__icon_patch",
        "parameters": [
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "title": "Space Id",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SpaceIcon"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Update Space Icon",
        "tags": [
          "spaces"
        ]
      }
    },
    "/api/spaces/{space_id}/vector-search": {
      "get": {
        "operationId": "vector_search_status_api_spaces__space_id__vector_search_get",
        "parameters": [
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "title": "Space Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Vector Search Status",
        "tags": [
          "spaces"
        ]
      },
      "patch": {
        "operationId": "update_vector_search_api_spaces__space_id__vector_search_patch",
        "parameters": [
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "title": "Space Id",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VectorSearchMode"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Update Vector Search",
        "tags": [
          "spaces"
        ]
      }
    },
    "/api/spaces/{space_id}/vector-search/index": {
      "post": {
        "operationId": "build_space_index_api_spaces__space_id__vector_search_index_post",
        "parameters": [
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "title": "Space Id",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BuildSpaceIndex"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Build Space Index",
        "tags": [
          "spaces"
        ]
      }
    },
    "/api/spaces/{space_id}/vector-search/processing": {
      "put": {
        "operationId": "update_processing_api_spaces__space_id__vector_search_processing_put",
        "parameters": [
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "title": "Space Id",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SpaceProcessingSettings"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Update Processing",
        "tags": [
          "spaces"
        ]
      }
    },
    "/health": {
      "get": {
        "operationId": "health_health_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Health"
      }
    }
  }
}
