{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/azure-ai-foundry/json-schema/azure-ai-foundry-vector-store-file-schema.json",
  "title": "VectorStoreFile",
  "description": "Description of a file attached to a vector store.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_superseded/azure-ai-foundry-vector-stores-api-openapi.yml#/components/schemas/VectorStoreFile",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The identifier, which can be referenced in API endpoints."
    },
    "object": {
      "type": "string",
      "description": "The object type, which is always `vector_store.file`.",
      "enum": [
        "vector_store.file"
      ],
      "x-ms-enum": {
        "modelAsString": false
      }
    },
    "usage_bytes": {
      "type": "integer",
      "format": "int32",
      "description": "The total vector store usage in bytes. Note that this may be different from the original file\nsize.",
      "x-ms-client-name": "usageBytes"
    },
    "created_at": {
      "type": "integer",
      "format": "unixtime",
      "description": "The Unix timestamp (in seconds) for when the vector store file was created.",
      "x-ms-client-name": "createdAt"
    },
    "vector_store_id": {
      "type": "string",
      "description": "The ID of the vector store that the file is attached to.",
      "x-ms-client-name": "vectorStoreId"
    },
    "status": {
      "$ref": "#/$defs/VectorStoreFileStatus",
      "description": "The status of the vector store file, which can be either `in_progress`, `completed`, `cancelled`, or `failed`. The status `completed` indicates that the vector store file is ready for use."
    },
    "last_error": {
      "$ref": "#/$defs/VectorStoreFileError",
      "description": "The last error associated with this vector store file. Will be `null` if there are no errors.",
      "x-ms-client-name": "lastError"
    },
    "chunking_strategy": {
      "$ref": "#/$defs/VectorStoreChunkingStrategyResponse",
      "description": "The strategy used to chunk the file.",
      "x-ms-client-name": "chunkingStrategy"
    }
  },
  "required": [
    "id",
    "object",
    "usage_bytes",
    "created_at",
    "vector_store_id",
    "status",
    "last_error",
    "chunking_strategy"
  ],
  "$defs": {
    "VectorStoreChunkingStrategyResponse": {
      "type": "object",
      "description": "An abstract representation of a vector store chunking strategy configuration.",
      "properties": {
        "type": {
          "$ref": "#/$defs/VectorStoreChunkingStrategyResponseType",
          "description": "The object type."
        }
      },
      "required": [
        "type"
      ]
    },
    "VectorStoreChunkingStrategyResponseType": {
      "type": "string",
      "description": "Type of chunking strategy",
      "enum": [
        "other",
        "static"
      ],
      "x-ms-enum": {
        "name": "VectorStoreChunkingStrategyResponseType",
        "modelAsString": true,
        "values": [
          {
            "name": "other",
            "value": "other"
          },
          {
            "name": "static",
            "value": "static"
          }
        ]
      }
    },
    "VectorStoreFileError": {
      "type": "object",
      "description": "Details on the error that may have occurred while processing a file for this vector store",
      "properties": {
        "code": {
          "$ref": "#/$defs/VectorStoreFileErrorCode",
          "description": "One of `server_error` or `rate_limit_exceeded`."
        },
        "message": {
          "type": "string",
          "description": "A human-readable description of the error."
        }
      },
      "required": [
        "code",
        "message"
      ]
    },
    "VectorStoreFileErrorCode": {
      "type": "string",
      "description": "Error code variants for vector store file processing",
      "enum": [
        "server_error",
        "invalid_file",
        "unsupported_file"
      ],
      "x-ms-enum": {
        "name": "VectorStoreFileErrorCode",
        "modelAsString": true,
        "values": [
          {
            "name": "serverError",
            "value": "server_error",
            "description": "An server error occurred."
          },
          {
            "name": "invalidFile",
            "value": "invalid_file",
            "description": "The file is not valid."
          },
          {
            "name": "unsupportedFile",
            "value": "unsupported_file",
            "description": "The file is of unsupported type."
          }
        ]
      }
    },
    "VectorStoreFileStatus": {
      "type": "string",
      "description": "Vector store file status",
      "enum": [
        "in_progress",
        "completed",
        "failed",
        "cancelled"
      ],
      "x-ms-enum": {
        "name": "VectorStoreFileStatus",
        "modelAsString": true,
        "values": [
          {
            "name": "inProgress",
            "value": "in_progress",
            "description": "The file is currently being processed."
          },
          {
            "name": "completed",
            "value": "completed",
            "description": "The file has been successfully processed."
          },
          {
            "name": "failed",
            "value": "failed",
            "description": "The file has failed to process."
          },
          {
            "name": "cancelled",
            "value": "cancelled",
            "description": "The file was cancelled."
          }
        ]
      }
    }
  }
}