> ## 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.

# Creates a vector store.



## OpenAPI

````yaml api-reference/openai-v1.yaml post /vector_stores
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:
    post:
      tags:
        - Vector Stores
      summary: Creates a vector store.
      operationId: createVectorStore
      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
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OpenAI.CreateVectorStoreRequest'
      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.VectorStoreObject'
        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.CreateVectorStoreRequest:
      type: object
      properties:
        file_ids:
          type: array
          items:
            type: string
          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.
        name:
          type: string
          description: The name of the vector store.
        expires_after:
          $ref: '#/components/schemas/OpenAI.VectorStoreExpirationAfter'
        chunking_strategy:
          anyOf:
            - $ref: '#/components/schemas/OpenAI.AutoChunkingStrategyRequestParam'
            - $ref: '#/components/schemas/OpenAI.StaticChunkingStrategyRequestParam'
          description: >-
            The chunking strategy used to chunk the file(s). If not set, will
            use the `auto` strategy. Only applicable if `file_ids` is non-empty.
        metadata:
          type: object
          additionalProperties:
            type: string
          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.
          x-oaiTypeLabel: map
    OpenAI.VectorStoreObject:
      type: object
      required:
        - id
        - object
        - created_at
        - name
        - usage_bytes
        - file_counts
        - status
        - last_active_at
        - metadata
      properties:
        id:
          type: string
          description: The identifier, which can be referenced in API endpoints.
        object:
          type: string
          enum:
            - vector_store
          description: The object type, which is always `vector_store`.
        created_at:
          type: integer
          format: unixtime
          description: >-
            The Unix timestamp (in seconds) for when the vector store was
            created.
        name:
          type: string
          description: The name of the vector store.
        usage_bytes:
          type: integer
          format: int32
          description: The total number of bytes used by the files in the vector store.
        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 successfully 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 were cancelled.
            total:
              type: integer
              format: int32
              description: The total number of files.
          required:
            - in_progress
            - completed
            - failed
            - cancelled
            - total
        status:
          type: string
          enum:
            - expired
            - in_progress
            - completed
          description: >-
            The status of the vector store, which can be either `expired`,
            `in_progress`, or `completed`. A status of `completed` indicates
            that the vector store is ready for use.
        expires_after:
          $ref: '#/components/schemas/OpenAI.VectorStoreExpirationAfter'
        expires_at:
          type: integer
          format: unixtime
          nullable: true
          description: >-
            The Unix timestamp (in seconds) for when the vector store will
            expire.
        last_active_at:
          type: integer
          format: unixtime
          nullable: true
          description: >-
            The Unix timestamp (in seconds) for when the vector store was last
            active.
        metadata:
          type: object
          additionalProperties:
            type: string
          nullable: true
          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.
          x-oaiTypeLabel: map
      description: >-
        A vector store is a collection of processed files can be used by the
        `file_search` tool.
    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.VectorStoreExpirationAfter:
      type: object
      required:
        - anchor
        - days
      properties:
        anchor:
          type: string
          enum:
            - last_active_at
          description: >-
            Anchor timestamp after which the expiration policy applies.
            Supported anchors: `last_active_at`.
        days:
          type: integer
          format: int32
          minimum: 1
          maximum: 365
          description: >-
            The number of days after the anchor time that the vector store will
            expire.
      description: The expiration policy for a vector store.
    OpenAI.AutoChunkingStrategyRequestParam:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - auto
          description: Always `auto`.
      allOf:
        - $ref: '#/components/schemas/OpenAI.ChunkingStrategyRequestParam'
      description: >-
        The default strategy. This strategy currently uses a
        `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`.
    OpenAI.StaticChunkingStrategyRequestParam:
      type: object
      required:
        - type
        - static
      properties:
        type:
          type: string
          enum:
            - static
          description: Always `static`.
        static:
          $ref: '#/components/schemas/OpenAI.StaticChunkingStrategy'
      allOf:
        - $ref: '#/components/schemas/OpenAI.ChunkingStrategyRequestParam'
      description: >-
        Customize your own chunking strategy by setting chunk size and chunk
        overlap.
    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.StaticChunkingStrategy:
      type: object
      required:
        - max_chunk_size_tokens
        - chunk_overlap_tokens
      properties:
        max_chunk_size_tokens:
          type: integer
          format: int32
          minimum: 100
          maximum: 4096
          description: >-
            The maximum number of tokens in each chunk. The default value is
            `800`. The minimum value is `100` and the maximum value is `4096`.
        chunk_overlap_tokens:
          type: integer
          format: int32
          description: >-
            The number of tokens that overlap between chunks. The default value
            is `400`.


            Note that the overlap must not exceed half of
            `max_chunk_size_tokens`.
  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: ''

````