---
title: "Create a vector store (OpenAI-compatible)."
method: POST
path: "/v1/vector_stores"
tags: ["VectorIO"]
---

# Create a vector store (OpenAI-compatible).

`POST /v1/vector_stores`

Create a vector store (OpenAI-compatible).

## Request body

- OpenAICreateVectorStoreRequestWithExtraBody — Request to create a vector store with extra_body support.
  - `name` string, nullable
  - `description` string, nullable
  - `file_ids` string[], nullable
  - `expires_after` VectorStoreExpirationAfter — Expiration policy for a vector store.
    - `anchor` 'last_active_at', required — Anchor timestamp after which the expiration policy applies.
    - `days` integer, required — The number of days after the anchor time that the vector store will expire.
  - `chunking_strategy` union
    - VectorStoreChunkingStrategyAuto — Automatic chunking strategy for vector store files.
      - `type` 'auto'
    - VectorStoreChunkingStrategyStatic — Static chunking strategy with configurable parameters.
      - `type` 'static'
      - `static` VectorStoreChunkingStrategyStaticConfig, required — Configuration for static chunking strategy.
        - `chunk_overlap_tokens` integer
        - `max_chunk_size_tokens` integer
    - VectorStoreChunkingStrategyContextual — Contextual chunking strategy that uses an LLM to situate chunks within the document.
      - `type` 'contextual' — Strategy type identifier.
      - `contextual` VectorStoreChunkingStrategyContextualConfig, required — Configuration for contextual chunking that uses an LLM to situate chunks within the document.
        - `model_id` string, nullable — LLM model for generating context. Falls back to VectorStoresConfig.contextual_retrieval_params.model if not provided.
        - `context_prompt` string — Prompt template for contextual retrieval. Uses WHOLE_DOCUMENT and CHUNK_CONTENT placeholders wrapped in double curly braces.
        - `max_chunk_size_tokens` integer — Maximum tokens per chunk. Suggested ~700 to allow room for prepended context.
        - `chunk_overlap_tokens` integer — Tokens to overlap between adjacent chunks. Must be less than max_chunk_size_tokens.
        - `timeout_seconds` integer, nullable — Timeout per LLM call in seconds. Falls back to config default if not provided.
        - `max_concurrency` integer, nullable — Maximum concurrent LLM calls. Falls back to config default if not provided.
  - `metadata` object, nullable

## Response `200`

The created vector store.

- VectorStoreObject — OpenAI Vector Store object.
  - `id` string, required
  - `object` 'vector_store'
  - `created_at` integer, required
  - `name` string
  - `usage_bytes` integer
  - `file_counts` VectorStoreFileCounts, required — File processing status counts for a vector store.
    - `completed` integer, required
    - `cancelled` integer, required
    - `failed` integer, required
    - `in_progress` integer, required
    - `total` integer, required
  - `status` 'expired' | 'in_progress' | 'completed', required
  - `expires_after` VectorStoreExpirationAfter — Expiration policy for a vector store.
    - `anchor` 'last_active_at', required — Anchor timestamp after which the expiration policy applies.
    - `days` integer, required — The number of days after the anchor time that the vector store will expire.
  - `expires_at` integer, nullable
  - `last_active_at` integer, nullable
  - `metadata` object, nullable

## Other responses

- `400` — The request was invalid or malformed
- `429` — The client has sent too many requests in a given amount of time
- `500` — The server encountered an unexpected error
- `default` — An error occurred

---

[API](https://skmtc.net/ogx-ai/apis/ogx-specification-stable-experimental-apis.md) · [All operations](https://skmtc.net/ogx-ai/apis/ogx-specification-stable-experimental-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ogx-ai/ogx-specification-stable-experimental-apis/revisions/f3f783962256/schema)
