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": {}
}
Create a vector store file by attaching a File to a vector store.
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": {}
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
The ID of the vector store for which to create a File.
"vs_abc123"
OK
A list of files attached to a vector store.
Was this page helpful?