---
title: "POST /vector_stores"
method: POST
path: "/vector_stores"
---

# POST /vector_stores

`POST /vector_stores`

Creates a vector store.

## Query parameters

- `api-version` string, required

## Request body

- VectorStoreOptions — Request object for creating a vector store.
  - `file_ids` string[] — A list of file IDs that the vector store should use. Useful for tools like `file_search` that can access files.
  - `name` string — The name of the vector store.
  - `configuration` VectorStoreConfiguration — Vector storage configuration is the list of data sources, used when multiple files can be used for the enterprise file search.
    - `data_sources` VectorStoreDataSource[], required — Data sources
      - `uri` string, required — Asset URI.
      - `type` 'uri_asset' | 'id_asset', required — Type of vector storage asset. Asset type may be a uri_asset, in this case it should contain asset URI ID, in the case of id_asset it should contain the data ID.
  - `expires_after` VectorStoreExpirationPolicy — The expiration policy for a vector store.
    - `anchor` 'last_active_at', required — Describes the relationship between the days and the expiration of this vector store
    - `days` integer, required — The anchor timestamp after which the expiration policy applies.
  - `chunking_strategy` VectorStoreChunkingStrategyRequest — An abstract representation of a vector store chunking strategy configuration.
    - `type` 'auto' | 'static', required — Type of chunking strategy
  - `metadata` object, nullable — A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length.

## Response `200`

The request has succeeded.

- VectorStore — A vector store is a collection of processed files can be used by the `file_search` tool.
  - `id` string, required — The identifier, which can be referenced in API endpoints.
  - `object` 'vector_store', required — The object type, which is always `vector_store`
  - `created_at` integer, required — The Unix timestamp (in seconds) for when the vector store was created.
  - `name` string, required — The name of the vector store.
  - `usage_bytes` integer, required — The total number of bytes used by the files in the vector store.
  - `file_counts` VectorStoreFileCount, required — Counts of files processed or being processed by this vector store grouped by status.
    - `in_progress` integer, required — The number of files that are currently being processed.
    - `completed` integer, required — The number of files that have been successfully processed.
    - `failed` integer, required — The number of files that have failed to process.
    - `cancelled` integer, required — The number of files that were cancelled.
    - `total` integer, required — The total number of files.
  - `status` 'expired' | 'in_progress' | 'completed', required — Vector store possible status
  - `expires_after` VectorStoreExpirationPolicy — The expiration policy for a vector store.
    - `anchor` 'last_active_at', required — Describes the relationship between the days and the expiration of this vector store
    - `days` integer, required — The anchor timestamp after which the expiration policy applies.
  - `expires_at` integer, nullable — The Unix timestamp (in seconds) for when the vector store will expire.
  - `last_active_at` integer, nullable, required — The Unix timestamp (in seconds) for when the vector store was last active.
  - `metadata` object, nullable, required — A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length.

## Other responses

- `default` — An unexpected error response.

---

[API](https://skmtc.net/azure/apis/ai-azure-ai-agents.md) · [All operations](https://skmtc.net/azure/apis/ai-azure-ai-agents/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/ai-azure-ai-agents/versions/de4a99f09829/schema)
