> ## Documentation Index
> Fetch the complete documentation index at: https://azure-foundry.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a vector store file batch.



## OpenAPI

````yaml api-reference/openai-v1.yaml post /vector_stores/{vector_store_id}/file_batches
openapi: 3.0.0
info:
  title: Azure AI Foundry Models Service
  license:
    name: MIT
    url: https://github.com/openai/openai-openapi/blob/master/LICENSE
  version: v1
servers:
  - url: '{endpoint}/openai/v1'
    description: Azure AI Foundry Models APIs
    variables:
      endpoint:
        default: ''
        description: >-
          A supported Azure AI Foundry Models APIs endpoint, including protocol
          and hostname.

          For example:

          https://westus.api.cognitive.microsoft.com).
security:
  - ApiKeyAuth: []
  - ApiKeyAuth_: []
  - OAuth2Auth:
      - https://cognitiveservices.azure.com/.default
tags:
  - name: Chat
  - name: Embeddings
  - name: Evals
  - name: Files
  - name: Fine-tuning
  - name: Models
  - name: Responses
  - name: Vector Stores
paths:
  /vector_stores/{vector_store_id}/file_batches:
    post:
      tags:
        - Vector Stores
      summary: Create a vector store file batch.
      operationId: createVectorStoreFileBatch
      parameters:
        - name: api-version
          in: query
          required: false
          description: >-
            The explicit Azure AI Foundry Models API version to use for this
            request.

            `v1` if not otherwise specified.
          schema:
            $ref: '#/components/schemas/AzureAIFoundryModelsApiVersion'
            default: v1
        - name: vector_store_id
          in: path
          required: true
          description: The ID of the vector store for which to create a file batch.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OpenAI.CreateVectorStoreFileBatchRequest'
      responses:
        '200':
          description: The request has succeeded.
          headers:
            apim-request-id:
              required: false
              description: A request ID used for troubleshooting purposes.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAI.VectorStoreFileBatchObject'
        default:
          description: An unexpected error response.
          headers:
            apim-request-id:
              required: false
              description: A request ID used for troubleshooting purposes.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AzureErrorResponse'
components:
  schemas:
    AzureAIFoundryModelsApiVersion:
      type: string
      enum:
        - v1
        - preview
    OpenAI.CreateVectorStoreFileBatchRequest:
      type: object
      required:
        - file_ids
      properties:
        file_ids:
          type: array
          items:
            type: string
          minItems: 1
          maxItems: 500
          description: >-
            A list of [File](/docs/api-reference/files) IDs that the vector
            store should use. Useful for tools like `file_search` that can
            access files.
        chunking_strategy:
          $ref: '#/components/schemas/OpenAI.ChunkingStrategyRequestParam'
        attributes:
          type: object
          allOf:
            - $ref: '#/components/schemas/OpenAI.VectorStoreFileAttributes'
          nullable: true
    OpenAI.VectorStoreFileBatchObject:
      type: object
      required:
        - id
        - object
        - created_at
        - vector_store_id
        - status
        - file_counts
      properties:
        id:
          type: string
          description: The identifier, which can be referenced in API endpoints.
        object:
          type: string
          enum:
            - vector_store.files_batch
          description: The object type, which is always `vector_store.file_batch`.
        created_at:
          type: integer
          format: unixtime
          description: >-
            The Unix timestamp (in seconds) for when the vector store files
            batch was created.
        vector_store_id:
          type: string
          description: >-
            The ID of the [vector
            store](/docs/api-reference/vector-stores/object) that the
            [File](/docs/api-reference/files) is attached to.
        status:
          type: string
          enum:
            - in_progress
            - completed
            - cancelled
            - failed
          description: >-
            The status of the vector store files batch, which can be either
            `in_progress`, `completed`, `cancelled` or `failed`.
        file_counts:
          type: object
          properties:
            in_progress:
              type: integer
              format: int32
              description: The number of files that are currently being processed.
            completed:
              type: integer
              format: int32
              description: The number of files that have been processed.
            failed:
              type: integer
              format: int32
              description: The number of files that have failed to process.
            cancelled:
              type: integer
              format: int32
              description: The number of files that where cancelled.
            total:
              type: integer
              format: int32
              description: The total number of files.
          required:
            - in_progress
            - completed
            - failed
            - cancelled
            - total
      description: A batch of files attached to a vector store.
    AzureErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: The distinct, machine-generated identifier for the error.
            message:
              type: string
              description: A human-readable message associated with the error.
            param:
              type: string
              description: >-
                If applicable, the request input parameter associated with the
                error
            type:
              type: string
              enum:
                - error
              description: The object type, always 'error.'
            inner_error: {}
          description: The error details.
    OpenAI.ChunkingStrategyRequestParam:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - auto
            - static
          description: The type of chunking strategy.
      discriminator:
        propertyName: type
        mapping:
          static: '#/components/schemas/OpenAI.StaticChunkingStrategyRequestParam'
      description: >-
        The chunking strategy used to chunk the file(s). If not set, will use
        the `auto` strategy.
    OpenAI.VectorStoreFileAttributes:
      type: object
      additionalProperties:
        anyOf:
          - type: string
          - type: boolean
          - type: integer
            format: int32
          - type: number
            format: float
      description: >-
        Set of 16 key-value pairs that can be attached to an object. This can be

        useful for storing additional information about the object in a
        structured

        format, and querying for objects via API or the dashboard. Keys are
        strings

        with a maximum length of 64 characters. Values are strings with a
        maximum

        length of 512 characters, booleans, or numbers.
      x-oaiTypeLabel: map
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: api-key
    ApiKeyAuth_:
      type: apiKey
      in: header
      name: authorization
    OAuth2Auth:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
          scopes:
            https://cognitiveservices.azure.com/.default: ''

````