POST
/
vector_stores
curl --request POST \
  --url https://api.openai.com/v1/vector_stores \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "file_ids": [
    "<string>"
  ],
  "name": "<string>",
  "expires_after": {
    "anchor": "last_active_at",
    "days": 183
  },
  "chunking_strategy": {
    "type": "auto"
  },
  "metadata": {}
}'
{
  "id": "<string>",
  "object": "vector_store",
  "created_at": 123,
  "name": "<string>",
  "usage_bytes": 123,
  "file_counts": {
    "in_progress": 123,
    "completed": 123,
    "failed": 123,
    "cancelled": 123,
    "total": 123
  },
  "status": "expired",
  "expires_after": {
    "anchor": "last_active_at",
    "days": 183
  },
  "expires_at": 123,
  "last_active_at": 123,
  "metadata": {}
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Response

200 - application/json

OK

A vector store is a collection of processed files can be used by the file_search tool.