Create vector store file
Create a vector store file by attaching a File to a vector store.
Path parameters
-
The ID of the vector store for which to create a File.
POST
/vector_stores/{vector_store_id}/files
curl \
-X POST https://api.openai.com/v1/vector_stores/vs_abc123/files \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"file_id":"string","chunking_strategy":{"type":"auto"}}'
Request example
{
"file_id": "string",
"chunking_strategy": {
"type": "auto"
}
}
Response examples (200)
{
"id": "string",
"object": "vector_store.file",
"usage_bytes": 42,
"created_at": 42,
"vector_store_id": "string",
"status": "in_progress",
"last_error": {
"code": "internal_error",
"message": "string"
},
"chunking_strategy": {
"type": "static",
"static": {
"max_chunk_size_tokens": 42,
"chunk_overlap_tokens": 42
}
}
}