{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-gemini/json-schema/google-gemini-upload-to-file-search-store-request-schema.json",
  "title": "UploadToFileSearchStoreRequest",
  "description": "Request for `UploadToFileSearchStore`.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/google-gemini-media-api-openapi.yml#/components/schemas/UploadToFileSearchStoreRequest",
  "properties": {
    "customMetadata": {
      "type": "array",
      "description": "Custom metadata to be associated with the data.",
      "items": {
        "$ref": "#/$defs/CustomMetadata"
      }
    },
    "mimeType": {
      "description": "Optional. MIME type of the data. If not provided, it will be inferred from the uploaded content.",
      "type": "string"
    },
    "chunkingConfig": {
      "$ref": "#/$defs/ChunkingConfig",
      "description": "Optional. Config for telling the service how to chunk the data. If not provided, the service will use default parameters."
    },
    "displayName": {
      "type": "string",
      "description": "Optional. Display name of the created document."
    }
  },
  "type": "object",
  "$defs": {
    "ChunkingConfig": {
      "type": "object",
      "properties": {
        "whiteSpaceConfig": {
          "$ref": "#/$defs/WhiteSpaceConfig",
          "description": "White space chunking configuration."
        }
      },
      "description": "Parameters for telling the service how to chunk the file. inspired by google3/cloud/ai/platform/extension/lib/retrieval/config/chunker_config.proto"
    },
    "CustomMetadata": {
      "type": "object",
      "properties": {
        "stringValue": {
          "type": "string",
          "description": "The string value of the metadata to store."
        },
        "stringListValue": {
          "$ref": "#/$defs/StringList",
          "description": "The StringList value of the metadata to store."
        },
        "key": {
          "description": "Required. The key of the metadata to store.",
          "type": "string"
        },
        "numericValue": {
          "format": "float",
          "type": "number",
          "description": "The numeric value of the metadata to store."
        }
      },
      "description": "User provided metadata stored as key-value pairs."
    },
    "StringList": {
      "properties": {
        "values": {
          "items": {
            "type": "string"
          },
          "description": "The string values of the metadata to store.",
          "type": "array"
        }
      },
      "type": "object",
      "description": "User provided string values assigned to a single metadata key."
    },
    "WhiteSpaceConfig": {
      "description": "Configuration for a white space chunking algorithm [white space delimited].",
      "properties": {
        "maxOverlapTokens": {
          "format": "int32",
          "type": "integer",
          "description": "Maximum number of overlapping tokens between two adjacent chunks."
        },
        "maxTokensPerChunk": {
          "type": "integer",
          "format": "int32",
          "description": "Maximum number of tokens per chunk. Tokens are defined as words for this chunking algorithm. Note: we are defining tokens as words split by whitespace as opposed to the output of a tokenizer. The context window of the latest gemini embedding model as of 2025-04-17 is currently 8192 tokens. We assume that the average word is 5 characters. Therefore, we set the upper limit to 2**9, which is 512 words, or 2560 tokens, assuming worst case a character per token. This is a conservative estimate meant to prevent context window overflow."
        }
      },
      "type": "object"
    }
  }
}