{
    "openapi": "3.1.0",
    "info": {
        "title": "Visual Indexing and Search \u00b5Service",
        "description": "Service for indexing and querying of collections of video data for RAG applications",
        "contact": {
            "name": "#sw-cvcore-visual-search",
            "url": "https://nvidia.com/"
        },
        "version": "1.1.0"
    },
    "servers": [
        {
            "url": "/v1"
        }
    ],
    "paths": {
        "/collections": {
            "post": {
                "tags": [
                    "Collections"
                ],
                "summary": "Create a collection",
                "description": "Create a new collection with the given pipeline.",
                "operationId": "create_collection",
                "parameters": [
                    {
                        "name": "id",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "anyOf": [
                                {
                                    "type": "string",
                                    "format": "uuid"
                                },
                                {
                                    "type": "null"
                                }
                            ],
                            "title": "Id"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CollectionCreate"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Collection successfully created.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CollectionResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Pipeline does not exist."
                    },
                    "409": {
                        "description": "Collection ID specified already exists."
                    },
                    "422": {
                        "description": "Unable to create collection, invalid parameters provided."
                    }
                }
            },
            "get": {
                "tags": [
                    "Collections"
                ],
                "summary": "List all collections",
                "description": "Retrieve all collections.",
                "operationId": "get_collections",
                "responses": {
                    "200": {
                        "description": "Successful collection listing.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CollectionListResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/pipelines/{pipeline_id}/collections": {
            "get": {
                "tags": [
                    "Collections"
                ],
                "summary": "List all collection info in a pipeline",
                "description": "Retrieve all collections with info",
                "operationId": "get_pipeline_collections",
                "parameters": [
                    {
                        "name": "pipeline_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "maxLength": 100,
                            "pattern": "^[a-zA-Z0-9_-]+$",
                            "description": "Identifier for the pipeline.",
                            "title": "Pipeline Id"
                        },
                        "description": "Identifier for the pipeline."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful collection info listing.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CollectionInfoListResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HTTPValidationError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/collections/{collection_id}": {
            "get": {
                "tags": [
                    "Collections"
                ],
                "summary": "Return collection details",
                "description": "Retrieve a collection by ID.",
                "operationId": "get_collection",
                "parameters": [
                    {
                        "name": "collection_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "maxLength": 100,
                            "pattern": "^[a-zA-Z0-9_-]+$",
                            "description": "Identifier for the collection.",
                            "title": "Collection Id"
                        },
                        "description": "Identifier for the collection."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful collection retrieval.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CollectionInfoResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Collection does not exist."
                    },
                    "422": {
                        "description": "Unable to retrieve collection due to validation error while processing request."
                    }
                }
            },
            "patch": {
                "tags": [
                    "Collections"
                ],
                "summary": "Update a collection",
                "description": "Only the `name` and `tags` attributes are mutable. Once a collection is created,\n        the `pipeline` cannot be changed.",
                "operationId": "update_collection",
                "parameters": [
                    {
                        "name": "collection_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "maxLength": 100,
                            "pattern": "^[a-zA-Z0-9_-]+$",
                            "description": "Identifier for the collection.",
                            "title": "Collection Id"
                        },
                        "description": "Identifier for the collection."
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CollectionPatch"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful update of collection.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CollectionResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Collection does not exist."
                    },
                    "422": {
                        "description": "\n                Unable to update collection due to validation error while processing request.\n            "
                    }
                }
            },
            "delete": {
                "tags": [
                    "Collections"
                ],
                "summary": "Delete Collection",
                "description": "Delete a collection by ID.",
                "operationId": "delete_collection",
                "parameters": [
                    {
                        "name": "collection_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "maxLength": 100,
                            "pattern": "^[a-zA-Z0-9_-]+$",
                            "description": "Identifier for the collection.",
                            "title": "Collection Id"
                        },
                        "description": "Identifier for the collection."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful collection deletion.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DeleteResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Collection does not exist."
                    },
                    "422": {
                        "description": "Unable to delete collection due to validation error while processing request."
                    }
                }
            }
        },
        "/collections/{collection_id}/documents": {
            "post": {
                "tags": [
                    "Document Indexing"
                ],
                "summary": "Add multiple documents for indexing",
                "description": "Use this endpoint to ingest files which are then processed by the specified pipeline.\n        Three types of models are supported:\n        - DocumentUploadJson: this uploads `content`, encoded as base64 string if not plain text (e.g. image)\n        - DocumentUploadUrl: this provides a `url`, which the service will try download.\n            This is the recommended method for files on s3 buckets, as one can provide a presigned URL.\n        - DocumentUploadEmbedding: this provides `embedding`, which is pre-computed on the client side.\n\n        For example, to upload an image:\n        ```\n        endpoint = f\"{retriever_base}/collections/{collection_id}/documents\"\n\n        def upload_local(file: str, endpoint: str) -> Dict[str, Any]:\n            with open(file, \"rb\") as file:\n                payload = {\n                    \"content\": base64.b64encode(file.read()).decode(\"utf-8\"),\n                    \"mime-type\": \"image/jpeg\",\n                }\n            response = requests.post(endpoint, json=[payload])\n            return response.json()\n\n        def upload_remote(file: str, endpoint: str) -> Dict[str, Any]:\n            payload = {\n                \"url\": file,\n                \"mime-type\": \"image/jpeg\",\n            }\n            response = requests.post(endpoint, json=[payload])\n            return response.json()\n\n        def upload_embedding(emb: List[float], endpoint: str) -> Dict[str, Any]:\n            payload = {\n                \"embedding\": emb,\n                \"mime-type\": \"image/jpeg\",\n            }\n            response = requests.post(endpoint, json=[payload])\n            return response.json()\n        ```",
                "operationId": "add_documents",
                "parameters": [
                    {
                        "name": "collection_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "maxLength": 100,
                            "pattern": "^[a-zA-Z0-9_-]+$",
                            "description": "Identifier for the collection.",
                            "title": "Collection Id"
                        },
                        "description": "Identifier for the collection."
                    },
                    {
                        "name": "existence_check_mode",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "$ref": "#/components/schemas/ExistenceCheckMode",
                            "default": "must"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "array",
                                "items": {
                                    "anyOf": [
                                        {
                                            "$ref": "#/components/schemas/DocumentUploadJson"
                                        },
                                        {
                                            "$ref": "#/components/schemas/DocumentUploadUrl"
                                        },
                                        {
                                            "$ref": "#/components/schemas/DocumentUploadEmbedding"
                                        }
                                    ]
                                },
                                "title": "Documents",
                                "maxItems": "3200"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Document successfully added to the collection.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DocumentResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Collection does not exist."
                    },
                    "422": {
                        "description": "Unable to add document, invalid parameters provided."
                    }
                }
            },
            "delete": {
                "tags": [
                    "Document Indexing"
                ],
                "summary": "Removes list of documents from the collection",
                "operationId": "delete_documents_by_filter",
                "parameters": [
                    {
                        "name": "collection_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "maxLength": 100,
                            "pattern": "^[a-zA-Z0-9_-]+$",
                            "description": "Identifier for the collection.",
                            "title": "Collection Id"
                        },
                        "description": "Identifier for the collection."
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "additionalProperties": true,
                                "description": "Extra pre-filters, for example {\"field\": \"session_id\", \"operator\": \"in\", \"value\": [\"a\", \"b\"]}",
                                "examples": [
                                    {
                                        "field": "session_id",
                                        "operator": "in",
                                        "value": [
                                            "a",
                                            "b"
                                        ]
                                    }
                                ],
                                "default": {},
                                "title": "Filters"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Documents successfully deleted.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DeleteResponse"
                                }
                            }
                        }
                    },
                    "204": {
                        "description": "Documents successfully deleted, no content returned."
                    },
                    "404": {
                        "description": "Document or collection does not exist."
                    },
                    "422": {
                        "description": "Unable to delete document, invalid parameters provided."
                    }
                }
            }
        },
        "/collections/{collection_id}/documents/{document_id}": {
            "delete": {
                "tags": [
                    "Document Indexing"
                ],
                "summary": "Remove a document from the collection",
                "operationId": "delete_document",
                "parameters": [
                    {
                        "name": "document_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "maxLength": 100,
                            "pattern": "^[a-zA-Z0-9_-]+$",
                            "description": "Identifier for the document.",
                            "title": "Document Id"
                        },
                        "description": "Identifier for the document."
                    },
                    {
                        "name": "collection_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "maxLength": 100,
                            "pattern": "^[a-zA-Z0-9_-]+$",
                            "description": "Identifier for the collection.",
                            "title": "Collection Id"
                        },
                        "description": "Identifier for the collection."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Document successfully deleted.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DeleteResponse"
                                }
                            }
                        }
                    },
                    "204": {
                        "description": "Document successfully deleted, no content returned."
                    },
                    "404": {
                        "description": "Document or collection does not exist."
                    },
                    "422": {
                        "description": "Unable to delete document, invalid parameters provided."
                    }
                }
            }
        },
        "/linear_probe": {
            "post": {
                "tags": [
                    "LinearProbe"
                ],
                "summary": "[DEPRECATED] Train a linear probe.",
                "description": "The linear probe endpoint learns an optimal query.\n\nThe inputs are:\n1. grounding queries, which will be embedded by the appropriate pipeline (e.g. by some text or video embedders).\n2. lists of document IDs in various collections with binary labels, defining good (`True`) or bad (`False`) retrievals examples.\n\nA linear regression model with weights of same dimension as the embeddings will be initialized.\nThe embedded queries will be used as regularization for the model weights, while the labels\nwill be used to calculate the binary classification loss.\n\nThe optimized linear regression model's weights are equivalent to an optimized retrieval query.",
                "operationId": "linear_probe",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/LinearProbeRequest",
                                "description": ""
                            },
                            "example": {
                                "grounding_queries": [
                                    {
                                        "text": "picture of a cat"
                                    }
                                ],
                                "labels": [
                                    {
                                        "collection_name": "d51c9157-e6c5-46cf-9b29-1dd7a9a1febe",
                                        "labelled_documents": {
                                            "f0bdff82-4b90-4776-82dd-54f130861dfc": true,
                                            "0f2334a1-2a08-4e77-9c14-2e906dce6e4c": false
                                        }
                                    }
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Train a linear probe.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/LinearProbeResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid input (e.g., missing values)."
                    },
                    "422": {
                        "description": "Invalid parameters."
                    },
                    "404": {
                        "description": "Collection does not exist."
                    }
                }
            }
        },
        "/collections/{collection_id}/search": {
            "post": {
                "tags": [
                    "Retrieval"
                ],
                "summary": "Search within a collection",
                "description": "Search for documents in the specified collection.",
                "operationId": "search_collection",
                "parameters": [
                    {
                        "name": "collection_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "maxLength": 100,
                            "pattern": "^[a-zA-Z0-9_-]+$",
                            "description": "Identifier for the collection.",
                            "title": "Collection Id"
                        },
                        "description": "Identifier for the collection."
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SearchRequest",
                                "description": ""
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Search results across specified collection.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SearchResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid input (e.g., missing query, collections, or invalid top_k value)."
                    },
                    "422": {
                        "description": "Invalid search parameters."
                    },
                    "404": {
                        "description": "Collection does not exist."
                    }
                }
            }
        },
        "/retrieval": {
            "post": {
                "tags": [
                    "Retrieval"
                ],
                "summary": "Retrieve results from multiple collections",
                "operationId": "retrieval",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/RetrievalQuery"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "Search results across multiple collections.",
                        "content": {
                            "application/json": {
                                "schema": {}
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid input (e.g., missing query, collections, invalid params, or payload_keys value)."
                    },
                    "422": {
                        "description": "Invalid search parameters."
                    },
                    "404": {
                        "description": "Invalid collection specified"
                    }
                }
            }
        },
        "/search_refinement/train": {
            "post": {
                "tags": [
                    "SearchRefinement"
                ],
                "summary": "Train a model.",
                "description": "The search refinement endpoint learns an optimal query.\n\nThe inputs are:\n1. grounding queries, which will be embedded by the appropriate pipeline (e.g. by some text or video embedders).\n2. lists of document IDs in various collections with binary labels, defining good (`True`) or bad (`False`) retrievals examples.\n\nif model_type == SearchRefinementMode.LINEAR_PROBE:\n    A linear regression model with weights of same dimension as the embeddings will be initialized.\n    The embedded queries will be used as regularization for the model weights, while the labels\n    will be used to calculate the binary classification loss.\n    The optimized linear regression model's weights are equivalent to an optimized retrieval query.\n\nelif model_type == SearchRefinementMode.LINEAR_CLASSIFIER:\n    A linear regression model with weights of same dimension, along with a bias/intercept term will be initialized.\n    The labelled embeddings will be used to train a model with the regular L2 regularization.\n    This model can be used within the `filtering_models` haystack component.",
                "operationId": "train",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SearchRefinementRequest",
                                "description": ""
                            },
                            "example": {
                                "model_type": "linear_probe",
                                "grounding_queries": [
                                    {
                                        "text": "picture of a cat"
                                    }
                                ],
                                "labels": [
                                    {
                                        "collection_name": "d51c9157-e6c5-46cf-9b29-1dd7a9a1febe",
                                        "labelled_documents": {
                                            "f0bdff82-4b90-4776-82dd-54f130861dfc": true,
                                            "0f2334a1-2a08-4e77-9c14-2e906dce6e4c": false
                                        }
                                    }
                                ],
                                "regularization_strength": 0.05
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Train a model.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "$ref": "#/components/schemas/LinearProbeResponse"
                                        },
                                        {
                                            "$ref": "#/components/schemas/LinearClassifierResponse"
                                        }
                                    ],
                                    "title": "Response Train"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid input (e.g., missing values)."
                    },
                    "422": {
                        "description": "Invalid parameters."
                    },
                    "404": {
                        "description": "Collection does not exist."
                    },
                    "501": {
                        "description": "Model_type not implemented."
                    }
                }
            }
        },
        "/pipelines": {
            "get": {
                "tags": [
                    "Pipelines"
                ],
                "summary": "List pipelines",
                "description": "Returns a list of pipelines supported by the service.\n        Take note of the `enabled` and `missing` attributes in\n        the response. `enabled` will indicate whether or not a\n        pipeline is usable. If `enabled` is `false`, that means\n        that the service was not configured with the correct\n        set of ENV vars. The `missing` array will list off the\n        ENV vars that need to be passed into the service to\n        enable the pipeline.",
                "operationId": "get_pipelines",
                "responses": {
                    "200": {
                        "description": "Successful pipeline listing.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PipelinesResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/pipelines/draw/{name}": {
            "get": {
                "tags": [
                    "Pipelines"
                ],
                "summary": "Draw pipeline",
                "description": "Draws pipeline processing graph in index or query mode.",
                "operationId": "draw_pipeline",
                "parameters": [
                    {
                        "name": "name",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "title": "Name"
                        }
                    },
                    {
                        "name": "mode",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "$ref": "#/components/schemas/PipelineMode",
                            "default": "index"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Draw pipeline, either in index or query mode.",
                        "content": {
                            "application/json": {
                                "schema": {}
                            }
                        }
                    },
                    "404": {
                        "description": "Pipeline does not exist or is disabled."
                    },
                    "422": {
                        "description": "Validation Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HTTPValidationError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/admin/collections/{collection_id}/flush": {
            "post": {
                "tags": [
                    "Admin",
                    "Collections"
                ],
                "summary": "Flush a Milvus collection to make recent inserts durable and searchable immediately.",
                "description": "Force-flush the Milvus collection backing *collection_id*.\n\nThe call blocks until Milvus persists the sealed segment to its storage\nbackend (local disk or object storage) and reloads the collection to make\nthe new segment searchable.",
                "operationId": "flush_collection",
                "parameters": [
                    {
                        "name": "collection_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "maxLength": 100,
                            "pattern": "^[a-zA-Z0-9_-]+$",
                            "description": "Identifier for the collection.",
                            "title": "Collection Id"
                        },
                        "description": "Identifier for the collection."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful Response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/FlushResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HTTPValidationError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/insert-data": {
            "post": {
                "summary": "Insert Data",
                "description": "Initiate bulk insert of Parquet files into a Milvus collection.\n\nThis endpoint validates the Parquet schema against the collection schema and\nstarts asynchronous bulk insert jobs for the provided files.\n\nArgs:\n    request: InsertDataRequest containing collection name, parquet file paths,\n            and optional authentication credentials.\n\nReturns:\n    InsertDataResponse with status \"success\" and the job ID for tracking.\n\nRaises:\n    HTTPException:\n        - 404 if collection doesn't exist or files not found\n        - 400 if schema validation fails or pipeline is disabled\n        - 500 if Milvus fails to return a job ID",
                "operationId": "insert_data_insert_data_post",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/InsertDataRequest"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "202": {
                        "description": "Successful Response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/InsertDataResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HTTPValidationError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/job-status/{job_id}": {
            "get": {
                "tags": [
                    "Bulk Indexing"
                ],
                "summary": "Get status of a bulk-insert job (searches all pipelines)",
                "description": "Return the milvus `job_id`.",
                "operationId": "job_status_job_status__job_id__get",
                "parameters": [
                    {
                        "name": "job_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "title": "Job Id"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful Response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/JobStatusResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HTTPValidationError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/jobs": {
            "get": {
                "tags": [
                    "Bulk Indexing"
                ],
                "summary": "List recent bulk-insert jobs across *all* pipelines",
                "description": "List bulk insert jobs across all enabled pipelines.\n\nThis endpoint queries all Milvus stores across enabled pipelines to gather\na comprehensive list of bulk insert jobs.\n\nArgs:\n    limit: Optional maximum number of jobs to return.\n    collection_name: Optional filter to show jobs for a specific collection only.\n\nReturns:\n    List of JobDetail objects containing job information including status,\n    progress, collection name, and file paths.",
                "operationId": "list_jobs_jobs_get",
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "anyOf": [
                                {
                                    "type": "integer"
                                },
                                {
                                    "type": "null"
                                }
                            ],
                            "title": "Limit"
                        }
                    },
                    {
                        "name": "collection_name",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "anyOf": [
                                {
                                    "type": "string"
                                },
                                {
                                    "type": "null"
                                }
                            ],
                            "title": "Collection Name"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful Response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/JobDetail"
                                    },
                                    "title": "Response List Jobs Jobs Get"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HTTPValidationError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/metrics": {
            "get": {
                "tags": [
                    "Metrics"
                ],
                "summary": "Metrics",
                "description": "Endpoint that serves Prometheus metrics.",
                "operationId": "metrics_metrics_get",
                "responses": {
                    "200": {
                        "description": "Successful Response",
                        "content": {
                            "application/json": {
                                "schema": {}
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "Collection": {
                "properties": {
                    "pipeline": {
                        "type": "string",
                        "title": "Pipeline",
                        "description": "The pipeline of the collection."
                    },
                    "name": {
                        "type": "string",
                        "title": "Name",
                        "description": "A name for the collection. Intended for people."
                    },
                    "tags": {
                        "anyOf": [
                            {
                                "additionalProperties": true,
                                "type": "object"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Tags",
                        "description": "The key-value pair tags associated with the collection."
                    },
                    "init_params": {
                        "anyOf": [
                            {
                                "additionalProperties": true,
                                "type": "object"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Init Params",
                        "description": "The init params for collection."
                    },
                    "cameras": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Cameras",
                        "description": "Comma seperated list of camera sensors to index.",
                        "default": "camera_front_wide_120fov"
                    },
                    "id": {
                        "type": "string",
                        "title": "Id",
                        "description": "The ID of the collection."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "title": "Created At",
                        "description": "The date and time the collection was created."
                    }
                },
                "type": "object",
                "required": [
                    "pipeline",
                    "name",
                    "id",
                    "created_at"
                ],
                "title": "Collection",
                "description": "A collection of documents."
            },
            "CollectionCreate": {
                "properties": {
                    "pipeline": {
                        "type": "string",
                        "title": "Pipeline",
                        "description": "The pipeline of the collection."
                    },
                    "name": {
                        "type": "string",
                        "title": "Name",
                        "description": "A name for the collection. Intended for people."
                    },
                    "tags": {
                        "anyOf": [
                            {
                                "additionalProperties": true,
                                "type": "object"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Tags",
                        "description": "The key-value pair tags associated with the collection."
                    },
                    "init_params": {
                        "anyOf": [
                            {
                                "additionalProperties": true,
                                "type": "object"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Init Params",
                        "description": "The init params for collection."
                    },
                    "cameras": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Cameras",
                        "description": "Comma seperated list of camera sensors to index.",
                        "default": "camera_front_wide_120fov"
                    },
                    "collection_config": {
                        "additionalProperties": true,
                        "type": "object",
                        "title": "Collection Config",
                        "default": {}
                    },
                    "index_config": {
                        "additionalProperties": true,
                        "type": "object",
                        "title": "Index Config",
                        "default": {}
                    },
                    "metadata_config": {
                        "$ref": "#/components/schemas/MetadataConfig",
                        "default": {
                            "allow_dynamic_schema": true,
                            "fields": []
                        }
                    }
                },
                "type": "object",
                "required": [
                    "pipeline",
                    "name"
                ],
                "title": "CollectionCreate",
                "description": "Create a new collection with the given name and pipeline. for example\n\n{\n  \"pipeline\": \"patched_image_search_milvus\",\n  \"name\": \"custom_param_collection\",\n  \"collection_config\": {\n    \"num_partitions\": 10,\n    \"num_shards\": 2,\n    \"properties\": {\n      \"mmap.enabled\": true\n    }\n  },\n  \"index_config\": {\n    \"index_type\": \"IVF_SQ8\",\n    \"params\": {\n      \"params\": {\n        \"nlist\": 2048\n      },\n      \"mmap.enabled\": true\n    }\n  },\n  \"metadata_config\": {\n    \"allow_dynamic_schema\": True,\n    \"fields\": [\n        {\n            \"name\": \"session_id\",\n            \"dtype\": \"VARCHAR\",\n            \"max_length\": 36,\n            \"is_partition_key\": True,\n        },\n    ]\n  }\n}"
            },
            "CollectionInfoListResponse": {
                "properties": {
                    "collections": {
                        "items": {
                            "$ref": "#/components/schemas/CollectionInfoResponse"
                        },
                        "type": "array",
                        "title": "Collections",
                        "description": "List of Collections with info."
                    }
                },
                "type": "object",
                "required": [
                    "collections"
                ],
                "title": "CollectionInfoListResponse",
                "description": "A response containing list of collections and its info."
            },
            "CollectionInfoResponse": {
                "properties": {
                    "collection": {
                        "$ref": "#/components/schemas/Collection",
                        "description": "The collection."
                    },
                    "total_documents_count": {
                        "type": "integer",
                        "title": "Total Documents Count",
                        "description": "The total number of documents in the collection."
                    }
                },
                "type": "object",
                "required": [
                    "collection",
                    "total_documents_count"
                ],
                "title": "CollectionInfoResponse",
                "description": "A response containing collection info."
            },
            "CollectionListResponse": {
                "properties": {
                    "collections": {
                        "items": {
                            "$ref": "#/components/schemas/Collection"
                        },
                        "type": "array",
                        "title": "Collections",
                        "description": "The list of collections."
                    }
                },
                "type": "object",
                "required": [
                    "collections"
                ],
                "title": "CollectionListResponse",
                "description": "A response containing a list of collections."
            },
            "CollectionPatch": {
                "properties": {
                    "name": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Name",
                        "description": "A new name for the collection. Intended for people."
                    },
                    "tags": {
                        "anyOf": [
                            {
                                "additionalProperties": true,
                                "type": "object"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Tags",
                        "description": "The key-value pair tags associated with the collection."
                    }
                },
                "type": "object",
                "title": "CollectionPatch",
                "description": "A request to update the name of a collection."
            },
            "CollectionResponse": {
                "properties": {
                    "collection": {
                        "$ref": "#/components/schemas/Collection",
                        "description": "The collection."
                    }
                },
                "type": "object",
                "required": [
                    "collection"
                ],
                "title": "CollectionResponse",
                "description": "A response containing a collection."
            },
            "DataType": {
                "type": "string",
                "enum": [
                    "BOOL",
                    "INT8",
                    "INT16",
                    "INT32",
                    "INT64",
                    "FLOAT",
                    "DOUBLE",
                    "VARCHAR",
                    "JSON",
                    "ARRAY"
                ],
                "title": "DataType",
                "description": "Data type of metadata fields in collection."
            },
            "DeleteResponse": {
                "properties": {
                    "message": {
                        "type": "string",
                        "title": "Message",
                        "default": "Resource deleted successfully."
                    },
                    "id": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Id",
                        "description": "The ID of the deleted resource."
                    },
                    "deleted_at": {
                        "anyOf": [
                            {
                                "type": "string",
                                "format": "date-time"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Deleted At",
                        "description": "The timestamp when the resource was deleted."
                    }
                },
                "type": "object",
                "title": "DeleteResponse",
                "example": {
                    "deleted_at": "2023-04-01T14:30:00Z",
                    "id": "12345",
                    "message": "Resource deleted successfully."
                }
            },
            "Document": {
                "properties": {
                    "id": {
                        "type": "string",
                        "title": "Id",
                        "description": "The ID of the document."
                    },
                    "metadata": {
                        "anyOf": [
                            {
                                "additionalProperties": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "integer"
                                        },
                                        {
                                            "type": "number"
                                        },
                                        {
                                            "type": "boolean"
                                        }
                                    ]
                                },
                                "type": "object"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Metadata",
                        "description": "A dictionary of metadata about the document."
                    },
                    "indexed_at": {
                        "type": "string",
                        "format": "date-time",
                        "title": "Indexed At",
                        "description": "The date and time the document was indexed."
                    },
                    "content": {
                        "type": "string",
                        "title": "Content",
                        "description": "The content of the document."
                    },
                    "mime_type": {
                        "type": "string",
                        "title": "Mime Type",
                        "description": "Format of content."
                    }
                },
                "type": "object",
                "required": [
                    "id",
                    "indexed_at",
                    "content",
                    "mime_type"
                ],
                "title": "Document"
            },
            "DocumentResponse": {
                "properties": {
                    "documents": {
                        "items": {
                            "$ref": "#/components/schemas/Document"
                        },
                        "type": "array",
                        "title": "Documents",
                        "description": "List of created documents."
                    }
                },
                "type": "object",
                "required": [
                    "documents"
                ],
                "title": "DocumentResponse",
                "description": "A response containing a document."
            },
            "DocumentUploadEmbedding": {
                "properties": {
                    "id": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Id",
                        "description": "The identifier to use for the document."
                    },
                    "metadata": {
                        "anyOf": [
                            {
                                "additionalProperties": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "integer"
                                        },
                                        {
                                            "type": "number"
                                        },
                                        {
                                            "type": "boolean"
                                        }
                                    ]
                                },
                                "type": "object"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Metadata",
                        "description": "A dictionary of metadata about the document."
                    },
                    "embedding": {
                        "items": {
                            "type": "number"
                        },
                        "type": "array",
                        "title": "Embedding",
                        "description": "Precomputed embeddings for document"
                    },
                    "mime_type": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/MimeType"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": "application/octet-stream"
                    }
                },
                "type": "object",
                "required": [
                    "embedding"
                ],
                "title": "DocumentUploadEmbedding"
            },
            "DocumentUploadJson": {
                "properties": {
                    "id": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Id",
                        "description": "The identifier to use for the document."
                    },
                    "metadata": {
                        "anyOf": [
                            {
                                "additionalProperties": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "integer"
                                        },
                                        {
                                            "type": "number"
                                        },
                                        {
                                            "type": "boolean"
                                        }
                                    ]
                                },
                                "type": "object"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Metadata",
                        "description": "A dictionary of metadata about the document."
                    },
                    "content": {
                        "type": "string",
                        "title": "Content",
                        "description": "The content of the document. If this is a file, it must be base64 encoded. For plain text, the maximum.size is 5 MiB. For files, the maximum size is 50 MiB.For larger files, it is recommended to use `DocumentUploadUrl`."
                    },
                    "mime_type": {
                        "$ref": "#/components/schemas/MimeType",
                        "description": "The mime type of the content"
                    }
                },
                "type": "object",
                "required": [
                    "content",
                    "mime_type"
                ],
                "title": "DocumentUploadJson"
            },
            "DocumentUploadUrl": {
                "properties": {
                    "id": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Id",
                        "description": "The identifier to use for the document."
                    },
                    "metadata": {
                        "anyOf": [
                            {
                                "additionalProperties": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "integer"
                                        },
                                        {
                                            "type": "number"
                                        },
                                        {
                                            "type": "boolean"
                                        }
                                    ]
                                },
                                "type": "object"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Metadata",
                        "description": "A dictionary of metadata about the document."
                    },
                    "url": {
                        "type": "string",
                        "title": "Url",
                        "description": "URL to use for fetching binary content."
                    },
                    "mime_type": {
                        "$ref": "#/components/schemas/MimeType",
                        "description": "The mime type of the content"
                    }
                },
                "type": "object",
                "required": [
                    "url",
                    "mime_type"
                ],
                "title": "DocumentUploadUrl"
            },
            "EmbeddingQuery": {
                "properties": {
                    "embedding": {
                        "items": {
                            "type": "number"
                        },
                        "type": "array",
                        "title": "Embedding",
                        "description": "Vector to be used as directly. Will bypass embedding step on server-side."
                    }
                },
                "type": "object",
                "required": [
                    "embedding"
                ],
                "title": "EmbeddingQuery",
                "description": "Embedding input query."
            },
            "EpisodeQuery": {
                "properties": {
                    "episode": {
                        "type": "string",
                        "title": "Episode",
                        "description": "Episode zip b64 bytes as a utf-8 string to be parsed and embedded."
                    }
                },
                "type": "object",
                "required": [
                    "episode"
                ],
                "title": "EpisodeQuery",
                "description": "Episode input query."
            },
            "ExistenceCheckMode": {
                "type": "string",
                "enum": [
                    "must",
                    "with_timeout",
                    "ignore_existing",
                    "skip"
                ],
                "title": "ExistenceCheckMode"
            },
            "FlushResponse": {
                "properties": {
                    "id": {
                        "type": "string",
                        "title": "Id"
                    },
                    "flushed_at": {
                        "type": "string",
                        "format": "date-time",
                        "title": "Flushed At"
                    },
                    "message": {
                        "type": "string",
                        "title": "Message",
                        "default": "Collection flushed successfully."
                    }
                },
                "type": "object",
                "required": [
                    "id",
                    "flushed_at"
                ],
                "title": "FlushResponse",
                "description": "Response returned after a successful manual flush."
            },
            "HTTPValidationError": {
                "properties": {
                    "detail": {
                        "items": {
                            "$ref": "#/components/schemas/ValidationError"
                        },
                        "type": "array",
                        "title": "Detail"
                    }
                },
                "type": "object",
                "title": "HTTPValidationError"
            },
            "InsertDataRequest": {
                "properties": {
                    "collection_name": {
                        "type": "string",
                        "title": "Collection Name",
                        "description": "Target Milvus collection (ID or name)."
                    },
                    "parquet_paths": {
                        "items": {
                            "type": "string"
                        },
                        "type": "array",
                        "title": "Parquet Paths",
                        "description": "Parquet files to import (e.g. [\"s3://bucket/file.parquet\"])."
                    },
                    "access_key": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Access Key",
                        "description": "Access key for the file storage (e.g., S3 access key ID)."
                    },
                    "secret_key": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Secret Key",
                        "description": "Secret key for the file storage (e.g., S3 secret access key)."
                    },
                    "endpoint_url": {
                        "anyOf": [
                            {
                                "type": "string",
                                "maxLength": 2083,
                                "minLength": 1,
                                "format": "uri"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Endpoint Url",
                        "description": "Endpoint URL for S3-compatible storage (e.g., MinIO)."
                    }
                },
                "type": "object",
                "required": [
                    "collection_name",
                    "parquet_paths"
                ],
                "title": "InsertDataRequest",
                "description": "Request model for initiating a bulk insert job."
            },
            "InsertDataResponse": {
                "properties": {
                    "status": {
                        "type": "string",
                        "title": "Status",
                        "description": "Status of the job submission.",
                        "example": "accepted"
                    },
                    "message": {
                        "type": "string",
                        "title": "Message",
                        "description": "User-friendly message.",
                        "example": "Bulk data insertion job accepted and started."
                    },
                    "job_id": {
                        "type": "string",
                        "title": "Job Id",
                        "description": "The unique ID assigned to the bulk insert job by Milvus.",
                        "example": "12345"
                    }
                },
                "type": "object",
                "required": [
                    "status",
                    "message",
                    "job_id"
                ],
                "title": "InsertDataResponse",
                "description": "Response model after successfully submitting a bulk insert job."
            },
            "JobDetail": {
                "properties": {
                    "job_id": {
                        "type": "string",
                        "title": "Job Id",
                        "description": "The unique ID of the bulk insert job.",
                        "example": "12345"
                    },
                    "status": {
                        "type": "string",
                        "title": "Status",
                        "description": "Current status of the job.",
                        "example": "completed"
                    },
                    "details": {
                        "type": "string",
                        "title": "Details",
                        "description": "Additional details or failure reason, if any."
                    },
                    "progress": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Progress",
                        "description": "Percentage progress of the job, if available.",
                        "example": 100
                    },
                    "collection_name": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Collection Name",
                        "description": "The target collection name."
                    },
                    "row_count": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Row Count",
                        "description": "Number of rows imported."
                    },
                    "create_time_utc": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Create Time Utc",
                        "description": "Task creation timestamp (UTC milliseconds)."
                    },
                    "last_update_time_utc": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Last Update Time Utc",
                        "description": "Task last update timestamp (UTC milliseconds)."
                    },
                    "parquet_paths": {
                        "items": {
                            "type": "string"
                        },
                        "type": "array",
                        "title": "Parquet Paths",
                        "description": "List of parquet files associated with the task.",
                        "default": []
                    }
                },
                "type": "object",
                "required": [
                    "job_id",
                    "status",
                    "details"
                ],
                "title": "JobDetail",
                "description": "Detailed information about a single bulk insert task retrieved from Milvus."
            },
            "JobStatusResponse": {
                "properties": {
                    "job_id": {
                        "type": "string",
                        "title": "Job Id",
                        "description": "The unique ID of the bulk insert job.",
                        "example": "12345"
                    },
                    "status": {
                        "type": "string",
                        "title": "Status",
                        "description": "Current status of the job.",
                        "example": "completed"
                    },
                    "details": {
                        "type": "string",
                        "title": "Details",
                        "description": "Additional details or failure reason, if any."
                    },
                    "progress": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Progress",
                        "description": "Percentage progress of the job, if available.",
                        "example": 100
                    },
                    "collection_name": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Collection Name",
                        "description": "The target collection name."
                    }
                },
                "type": "object",
                "required": [
                    "job_id",
                    "status",
                    "details"
                ],
                "title": "JobStatusResponse",
                "description": "Response model for querying the status of a specific job."
            },
            "LabelledDocuments": {
                "properties": {
                    "collection_name": {
                        "type": "string",
                        "title": "Collection Name",
                        "description": "Name of collection"
                    },
                    "labelled_documents": {
                        "additionalProperties": {
                            "type": "boolean"
                        },
                        "type": "object",
                        "title": "Labelled Documents",
                        "description": "Labelled document IDs in collection, where `True` is a good retrieval, `False` is a bad retrieval"
                    }
                },
                "type": "object",
                "required": [
                    "collection_name",
                    "labelled_documents"
                ],
                "title": "LabelledDocuments",
                "description": "Labelled documents."
            },
            "LinearClassifierBase": {
                "properties": {
                    "coef": {
                        "items": {
                            "items": {
                                "type": "number"
                            },
                            "type": "array"
                        },
                        "type": "array",
                        "title": "Coef",
                        "description": "Coefs of a learned linear classifier"
                    },
                    "intercept": {
                        "items": {
                            "type": "number"
                        },
                        "type": "array",
                        "title": "Intercept",
                        "description": "Intercept/bias term of a learned linear classifier."
                    }
                },
                "type": "object",
                "required": [
                    "coef",
                    "intercept"
                ],
                "title": "LinearClassifierBase"
            },
            "LinearClassifierResponse": {
                "properties": {
                    "weights": {
                        "$ref": "#/components/schemas/LinearClassifierBase",
                        "description": "Coefficients and intercept"
                    },
                    "model": {
                        "type": "string",
                        "title": "Model",
                        "description": "Pickled LinearClassifier model b64 bytes as a utf-8 string to be parsed"
                    }
                },
                "type": "object",
                "required": [
                    "weights",
                    "model"
                ],
                "title": "LinearClassifierResponse"
            },
            "LinearProbeRequest": {
                "properties": {
                    "grounding_queries": {
                        "items": {
                            "anyOf": [
                                {
                                    "$ref": "#/components/schemas/TextQuery"
                                },
                                {
                                    "$ref": "#/components/schemas/VideoQuery"
                                },
                                {
                                    "$ref": "#/components/schemas/EpisodeQuery"
                                },
                                {
                                    "$ref": "#/components/schemas/EmbeddingQuery"
                                }
                            ]
                        },
                        "type": "array",
                        "title": "Grounding Queries",
                        "description": "Linear probe grounding queries."
                    },
                    "labels": {
                        "items": {
                            "$ref": "#/components/schemas/LabelledDocuments"
                        },
                        "type": "array",
                        "title": "Labels",
                        "description": "List of selected labelled data."
                    },
                    "regularization_strength": {
                        "type": "number",
                        "title": "Regularization Strength",
                        "description": "How close the learned probe embedding should be to the anchor.",
                        "default": 0.05
                    }
                },
                "type": "object",
                "required": [
                    "grounding_queries",
                    "labels"
                ],
                "title": "LinearProbeRequest"
            },
            "LinearProbeResponse": {
                "properties": {
                    "queries": {
                        "items": {
                            "$ref": "#/components/schemas/EmbeddingQuery"
                        },
                        "type": "array",
                        "title": "Queries",
                        "description": "Learnt embedding queries from linear probe training"
                    }
                },
                "type": "object",
                "required": [
                    "queries"
                ],
                "title": "LinearProbeResponse"
            },
            "MetadataConfig": {
                "properties": {
                    "allow_dynamic_schema": {
                        "type": "boolean",
                        "title": "Allow Dynamic Schema",
                        "default": true
                    },
                    "fields": {
                        "items": {
                            "$ref": "#/components/schemas/MetadataField"
                        },
                        "type": "array",
                        "title": "Fields",
                        "default": []
                    }
                },
                "type": "object",
                "title": "MetadataConfig",
                "description": "Schema of user metadata of collection, associated with the ingested embeddings.\n\nIf defaults used, no static fields are specified and a dynamic schema will be used.\nThis means all metadata is added into a JSON string.\n\nFor very large collections, it is recommended to specify the metadata fields statically,\nespecially if you want to pre-filter based on the metadata.\n\nIf one wants to use a metadata field as a partition key, it is necessary to specify this."
            },
            "MetadataField": {
                "properties": {
                    "name": {
                        "type": "string",
                        "title": "Name",
                        "description": "Name of metadata field."
                    },
                    "dtype": {
                        "$ref": "#/components/schemas/DataType",
                        "description": "Data type of metadata field."
                    },
                    "is_partition_key": {
                        "type": "boolean",
                        "title": "Is Partition Key",
                        "description": "Whether field is a partition key. Supports only VARCHAR and INT64.",
                        "default": false
                    },
                    "element_dtype": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/DataType"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "Element data type if dtype ARRAY."
                    },
                    "max_length": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Max Length",
                        "description": "Maximum length if dtype is VARCHAR. Between [1, 65535]."
                    },
                    "max_capacity": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Max Capacity",
                        "description": "Maximum size of array if dtype is ARRAY."
                    }
                },
                "type": "object",
                "required": [
                    "name",
                    "dtype"
                ],
                "title": "MetadataField",
                "description": "Metadata field attributes."
            },
            "MimeType": {
                "type": "string",
                "enum": [
                    "text/plain",
                    "application/pdf",
                    "image/jpeg",
                    "image/png",
                    "video/mp4",
                    "episode/zip",
                    "application/octet-stream"
                ],
                "title": "MimeType",
                "description": "A list of acceptable format types for uploading files."
            },
            "Pipeline": {
                "properties": {
                    "id": {
                        "type": "string",
                        "title": "Id",
                        "description": "The name of the pipeline."
                    },
                    "enabled": {
                        "type": "boolean",
                        "title": "Enabled",
                        "description": "Whether or not the pipeline is enabled."
                    },
                    "missing": {
                        "items": {
                            "type": "string"
                        },
                        "type": "array",
                        "title": "Missing",
                        "description": "Missing environmental variables needed to enable the pipeline."
                    },
                    "config": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "number"
                            },
                            {
                                "type": "string"
                            },
                            {
                                "type": "boolean"
                            },
                            {
                                "items": {
                                    "additionalProperties": true,
                                    "type": "object"
                                },
                                "type": "array"
                            },
                            {
                                "additionalProperties": true,
                                "type": "object"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Config",
                        "description": "The JSON components and configuration used to set up the pipeline"
                    }
                },
                "type": "object",
                "required": [
                    "id",
                    "enabled",
                    "missing",
                    "config"
                ],
                "title": "Pipeline"
            },
            "PipelineMode": {
                "type": "string",
                "enum": [
                    "index",
                    "query"
                ],
                "title": "PipelineMode"
            },
            "PipelinesResponse": {
                "properties": {
                    "pipelines": {
                        "items": {
                            "$ref": "#/components/schemas/Pipeline"
                        },
                        "type": "array",
                        "title": "Pipelines",
                        "description": "List of pipelines."
                    }
                },
                "type": "object",
                "required": [
                    "pipelines"
                ],
                "title": "PipelinesResponse",
                "description": "A list of all of the pipelines for the microservice."
            },
            "RadiusSearch": {
                "properties": {
                    "min_similarity": {
                        "type": "number",
                        "title": "Min Similarity",
                        "description": "Minimum similarity of nearest neighbors. N.B. cosine similarity is between -1 and +1, where +1 is most similar."
                    },
                    "search_params": {
                        "additionalProperties": true,
                        "type": "object",
                        "title": "Search Params",
                        "description": "Index specific search params, for example {\"nprobe\": 32} for IVF indices",
                        "default": {}
                    },
                    "filters": {
                        "additionalProperties": true,
                        "type": "object",
                        "title": "Filters",
                        "description": "Extra filters, see https://milvus.io/docs/boolean.md or https://docs.haystack.deepset.ai/docs/metadata-filtering for supported EBNF syntax examples",
                        "default": {}
                    },
                    "reconstruct": {
                        "type": "boolean",
                        "title": "Reconstruct",
                        "description": "Whether to return the document embedding.",
                        "default": false
                    }
                },
                "type": "object",
                "required": [
                    "min_similarity"
                ],
                "title": "RadiusSearch",
                "description": "Retrieve data above minimum similarity metric to queries."
            },
            "RetrievalQuery": {
                "properties": {
                    "collections": {
                        "items": {
                            "type": "string"
                        },
                        "type": "array",
                        "title": "Collections",
                        "description": "Unique names of collections to be queried."
                    },
                    "query": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/TextQuery"
                            },
                            {
                                "$ref": "#/components/schemas/VideoQuery"
                            },
                            {
                                "$ref": "#/components/schemas/EpisodeQuery"
                            },
                            {
                                "$ref": "#/components/schemas/SessionSegmentQuery"
                            },
                            {
                                "$ref": "#/components/schemas/SessionFrameQuery"
                            },
                            {
                                "$ref": "#/components/schemas/EmbeddingQuery"
                            },
                            {
                                "items": {
                                    "anyOf": [
                                        {
                                            "$ref": "#/components/schemas/TextQuery"
                                        },
                                        {
                                            "$ref": "#/components/schemas/VideoQuery"
                                        },
                                        {
                                            "$ref": "#/components/schemas/EpisodeQuery"
                                        },
                                        {
                                            "$ref": "#/components/schemas/SessionSegmentQuery"
                                        },
                                        {
                                            "$ref": "#/components/schemas/SessionFrameQuery"
                                        },
                                        {
                                            "$ref": "#/components/schemas/EmbeddingQuery"
                                        }
                                    ]
                                },
                                "type": "array"
                            }
                        ],
                        "title": "Query",
                        "description": "Either a `TextQuery` or `VideoQuery` or `EmbeddingQuery` or a batch of these."
                    },
                    "params": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/TopKSearch"
                            },
                            {
                                "$ref": "#/components/schemas/RadiusSearch"
                            }
                        ],
                        "title": "Params",
                        "description": "Either `TopKSearch` or `RadiusSearch`."
                    },
                    "payload_keys": {
                        "anyOf": [
                            {
                                "items": {
                                    "type": "string"
                                },
                                "type": "array"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Payload Keys",
                        "description": "Additional payload data requested.",
                        "default": []
                    },
                    "generate_asset_url": {
                        "anyOf": [
                            {
                                "type": "boolean"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Generate Asset Url",
                        "description": "Whether to generate asset URLs.",
                        "default": true
                    },
                    "rerank": {
                        "anyOf": [
                            {
                                "type": "boolean"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Rerank",
                        "description": "Whether to rerank results based on the pipeline.",
                        "default": true
                    }
                },
                "type": "object",
                "required": [
                    "collections",
                    "query",
                    "params"
                ],
                "title": "RetrievalQuery",
                "description": "Query data model for retrieval engine."
            },
            "RetrievedDocument": {
                "properties": {
                    "id": {
                        "type": "string",
                        "title": "Id",
                        "description": "The ID of the source document."
                    },
                    "metadata": {
                        "anyOf": [
                            {
                                "additionalProperties": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "integer"
                                        },
                                        {
                                            "type": "number"
                                        },
                                        {
                                            "type": "boolean"
                                        }
                                    ]
                                },
                                "type": "object"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Metadata",
                        "description": "The metadata of the source document."
                    },
                    "collection_id": {
                        "type": "string",
                        "title": "Collection Id",
                        "description": "The ID of the collection."
                    },
                    "asset_url": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Asset Url",
                        "description": "The URL of the asset associated with the document."
                    },
                    "score": {
                        "anyOf": [
                            {
                                "type": "number"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Score",
                        "description": "A score for this retrieved document."
                    },
                    "content": {
                        "type": "string",
                        "title": "Content",
                        "description": "The content of the retrieved document"
                    },
                    "mime_type": {
                        "type": "string",
                        "title": "Mime Type",
                        "description": "The original format of the source document"
                    },
                    "embedding": {
                        "anyOf": [
                            {
                                "items": {
                                    "type": "number"
                                },
                                "type": "array"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Embedding",
                        "description": "Optional reconstructed embedding vector."
                    }
                },
                "type": "object",
                "required": [
                    "id",
                    "collection_id",
                    "asset_url",
                    "content",
                    "mime_type"
                ],
                "title": "RetrievedDocument"
            },
            "SearchRefinementMode": {
                "type": "string",
                "enum": [
                    "linear_probe",
                    "linear_classifier"
                ],
                "title": "SearchRefinementMode"
            },
            "SearchRefinementRequest": {
                "properties": {
                    "model_type": {
                        "$ref": "#/components/schemas/SearchRefinementMode",
                        "description": "Choose a model to train for search refinement.",
                        "default": "linear_probe"
                    },
                    "grounding_queries": {
                        "items": {
                            "anyOf": [
                                {
                                    "$ref": "#/components/schemas/TextQuery"
                                },
                                {
                                    "$ref": "#/components/schemas/VideoQuery"
                                },
                                {
                                    "$ref": "#/components/schemas/EpisodeQuery"
                                },
                                {
                                    "$ref": "#/components/schemas/EmbeddingQuery"
                                }
                            ]
                        },
                        "type": "array",
                        "title": "Grounding Queries",
                        "description": "Search refinement grounding queries."
                    },
                    "labels": {
                        "items": {
                            "$ref": "#/components/schemas/LabelledDocuments"
                        },
                        "type": "array",
                        "title": "Labels",
                        "description": "List of selected labelled data."
                    },
                    "regularization_strength": {
                        "type": "number",
                        "title": "Regularization Strength",
                        "description": "How close the learned probe embedding should be to the anchor. Only valid for\n                    linear probe.",
                        "default": 0.05
                    }
                },
                "type": "object",
                "required": [
                    "grounding_queries",
                    "labels"
                ],
                "title": "SearchRefinementRequest"
            },
            "SearchRequest": {
                "properties": {
                    "query": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/TextQuery"
                            },
                            {
                                "$ref": "#/components/schemas/VideoQuery"
                            },
                            {
                                "$ref": "#/components/schemas/EpisodeQuery"
                            },
                            {
                                "$ref": "#/components/schemas/SessionSegmentQuery"
                            },
                            {
                                "$ref": "#/components/schemas/SessionFrameQuery"
                            },
                            {
                                "$ref": "#/components/schemas/EmbeddingQuery"
                            },
                            {
                                "items": {
                                    "anyOf": [
                                        {
                                            "$ref": "#/components/schemas/TextQuery"
                                        },
                                        {
                                            "$ref": "#/components/schemas/VideoQuery"
                                        },
                                        {
                                            "$ref": "#/components/schemas/EpisodeQuery"
                                        },
                                        {
                                            "$ref": "#/components/schemas/SessionSegmentQuery"
                                        },
                                        {
                                            "$ref": "#/components/schemas/SessionFrameQuery"
                                        },
                                        {
                                            "$ref": "#/components/schemas/EmbeddingQuery"
                                        }
                                    ]
                                },
                                "type": "array"
                            }
                        ],
                        "title": "Query",
                        "description": "Either a `TextQuery` or `VideoQuery` or `EmbeddingQuery` or a batch of these."
                    },
                    "top_k": {
                        "type": "integer",
                        "maximum": 16000.0,
                        "minimum": 1.0,
                        "title": "Top K",
                        "description": "The number of results to return. Max 16,000.",
                        "default": 10
                    },
                    "reconstruct": {
                        "type": "boolean",
                        "title": "Reconstruct",
                        "description": "Whether to return the document embedding.",
                        "default": false
                    },
                    "search_params": {
                        "additionalProperties": true,
                        "type": "object",
                        "title": "Search Params",
                        "description": "Index specific search params, for example {\"nprobe\": 32} for IVF indices",
                        "default": {}
                    },
                    "filters": {
                        "anyOf": [
                            {
                                "additionalProperties": true,
                                "type": "object"
                            },
                            {
                                "type": "string"
                            }
                        ],
                        "title": "Filters",
                        "description": "Extra filters, see https://milvus.io/docs/boolean.md for EBNF syntax examples",
                        "default": {}
                    },
                    "generate_asset_url": {
                        "anyOf": [
                            {
                                "type": "boolean"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Generate Asset Url",
                        "description": "Whether to generate asset URLs.",
                        "default": true
                    },
                    "clf": {
                        "additionalProperties": true,
                        "type": "object",
                        "title": "Clf",
                        "description": "Additional linear classifier to filter retrieved results.",
                        "default": {}
                    }
                },
                "type": "object",
                "required": [
                    "query"
                ],
                "title": "SearchRequest",
                "description": "A request to search for documents in a collection."
            },
            "SearchResponse": {
                "properties": {
                    "retrievals": {
                        "items": {
                            "$ref": "#/components/schemas/RetrievedDocument"
                        },
                        "type": "array",
                        "title": "Retrievals",
                        "description": "List of retrieved docs returned from the search."
                    }
                },
                "type": "object",
                "required": [
                    "retrievals"
                ],
                "title": "SearchResponse",
                "description": "A response containing a list of search results."
            },
            "SessionFrameDetails": {
                "properties": {
                    "session_id": {
                        "type": "string",
                        "title": "Session Id",
                        "description": "Session id of the frame."
                    },
                    "timestamp": {
                        "type": "string",
                        "title": "Timestamp",
                        "description": "Timestamp of the frame."
                    },
                    "camera": {
                        "type": "string",
                        "title": "Camera",
                        "description": "Camera sensor file to use."
                    }
                },
                "type": "object",
                "required": [
                    "session_id",
                    "timestamp",
                    "camera"
                ],
                "title": "SessionFrameDetails",
                "description": "Session Frame Details."
            },
            "SessionFrameQuery": {
                "properties": {
                    "session_frame": {
                        "$ref": "#/components/schemas/SessionFrameDetails",
                        "description": "Session frame details to search."
                    }
                },
                "type": "object",
                "required": [
                    "session_frame"
                ],
                "title": "SessionFrameQuery",
                "description": "Session Frame input query."
            },
            "SessionSegmentDetails": {
                "properties": {
                    "session_id": {
                        "type": "string",
                        "title": "Session Id",
                        "description": "Session id of the clip."
                    },
                    "start_timestamp": {
                        "type": "string",
                        "title": "Start Timestamp",
                        "description": "Starting timestamp of the clip."
                    },
                    "end_timestamp": {
                        "type": "string",
                        "title": "End Timestamp",
                        "description": "Ending timestamp of the clip."
                    },
                    "camera": {
                        "type": "string",
                        "title": "Camera",
                        "description": "Camera sensor file to use."
                    }
                },
                "type": "object",
                "required": [
                    "session_id",
                    "start_timestamp",
                    "end_timestamp",
                    "camera"
                ],
                "title": "SessionSegmentDetails",
                "description": "Session Segment Details."
            },
            "SessionSegmentQuery": {
                "properties": {
                    "session_segment": {
                        "$ref": "#/components/schemas/SessionSegmentDetails",
                        "description": "Session Segment details to search."
                    }
                },
                "type": "object",
                "required": [
                    "session_segment"
                ],
                "title": "SessionSegmentQuery",
                "description": "Clip/session segment input query."
            },
            "TextQuery": {
                "properties": {
                    "text": {
                        "type": "string",
                        "title": "Text",
                        "description": "The actual text to be tokenised and embedded."
                    }
                },
                "type": "object",
                "required": [
                    "text"
                ],
                "title": "TextQuery",
                "description": "Text input query."
            },
            "TopKSearch": {
                "properties": {
                    "nb_neighbors": {
                        "type": "integer",
                        "title": "Nb Neighbors",
                        "description": "Number of nearest neighbors."
                    },
                    "search_params": {
                        "additionalProperties": true,
                        "type": "object",
                        "title": "Search Params",
                        "description": "Index specific search params, for example {\"nprobe\": 32} for IVF indices",
                        "default": {}
                    },
                    "filters": {
                        "anyOf": [
                            {
                                "additionalProperties": true,
                                "type": "object"
                            },
                            {
                                "type": "string"
                            }
                        ],
                        "title": "Filters",
                        "description": "Extra filters, see https://milvus.io/docs/boolean.md or https://docs.haystack.deepset.ai/docs/metadata-filtering for supported EBNF syntax examples",
                        "default": {}
                    },
                    "reconstruct": {
                        "type": "boolean",
                        "title": "Reconstruct",
                        "description": "Whether to return the document embedding.",
                        "default": false
                    }
                },
                "type": "object",
                "required": [
                    "nb_neighbors"
                ],
                "title": "TopKSearch",
                "description": "Search for nearest neighbors to query.",
                "example": {
                    "filters": {},
                    "nb_neighbors": 8,
                    "reconstruct": false,
                    "search_params": {
                        "range_filter": 0.0
                    }
                }
            },
            "ValidationError": {
                "properties": {
                    "loc": {
                        "items": {
                            "anyOf": [
                                {
                                    "type": "string"
                                },
                                {
                                    "type": "integer"
                                }
                            ]
                        },
                        "type": "array",
                        "title": "Location"
                    },
                    "msg": {
                        "type": "string",
                        "title": "Message"
                    },
                    "type": {
                        "type": "string",
                        "title": "Error Type"
                    }
                },
                "type": "object",
                "required": [
                    "loc",
                    "msg",
                    "type"
                ],
                "title": "ValidationError"
            },
            "VideoQuery": {
                "properties": {
                    "video": {
                        "type": "string",
                        "title": "Video",
                        "description": "Video input as either: 1) base64 data URI (data:video/<format>;base64,<data>), 2) presigned URL data URI (data:video/<format>;presigned_url,<url>), or 3) raw presigned URL string."
                    }
                },
                "type": "object",
                "required": [
                    "video"
                ],
                "title": "VideoQuery",
                "description": "Video input query."
            }
        }
    },
    "tags": [
        {
            "name": "Collections",
            "description": "Operations related to collections."
        },
        {
            "name": "Document Indexing",
            "description": "Operations related to documents."
        },
        {
            "name": "Health",
            "description": "Operations related to health."
        },
        {
            "name": "Retrieval",
            "description": "Operations related to document retrieval."
        }
    ]
}
