POST
/
vector_stores
/
{vector_store_id}
/
files
curl --request POST \
  --url https://api.openai.com/v1/vector_stores/{vector_store_id}/files \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "file_id": "<string>",
  "chunking_strategy": {
    "type": "auto"
  },
  "attributes": {}
}'
{
  "id": "<string>",
  "object": "vector_store.file",
  "usage_bytes": 123,
  "created_at": 123,
  "vector_store_id": "<string>",
  "status": "in_progress",
  "last_error": {
    "code": "server_error",
    "message": "<string>"
  },
  "chunking_strategy": {
    "type": "static",
    "static": {
      "max_chunk_size_tokens": 2098,
      "chunk_overlap_tokens": 123
    }
  },
  "attributes": {}
}

Authorizations

Authorization
string
header
required

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

Path Parameters

vector_store_id
string
required

The ID of the vector store for which to create a File.

Example:

"vs_abc123"

Body

application/json

Response

200 - application/json

OK

A list of files attached to a vector store.