Create vector store file
POST/vector_stores/{vector_store_id}/files
Create a vector store file by attaching a File to a vector store.
Path Parameters
vector_store_id: string
Body ParametersJSON
file_id: string
A File ID that the vector store should use. Useful for tools like file_search that can access files.
Returns
Create vector store file
curl https://api.openai.com/v1/vector_stores/$VECTOR_STORE_ID/files \
-H 'Content-Type: application/json' \
-H 'OpenAI-Beta: assistants=v2' \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{
"file_id": "file_id"
}'{
"id": "id",
"created_at": 0,
"last_error": {
"code": "server_error",
"message": "message"
},
"object": "vector_store.file",
"status": "in_progress",
"usage_bytes": 0,
"vector_store_id": "vector_store_id",
"attributes": {
"foo": "string"
},
"chunking_strategy": {
"static": {
"chunk_overlap_tokens": 0,
"max_chunk_size_tokens": 100
},
"type": "static"
}
}Returns Examples
{
"id": "id",
"created_at": 0,
"last_error": {
"code": "server_error",
"message": "message"
},
"object": "vector_store.file",
"status": "in_progress",
"usage_bytes": 0,
"vector_store_id": "vector_store_id",
"attributes": {
"foo": "string"
},
"chunking_strategy": {
"static": {
"chunk_overlap_tokens": 0,
"max_chunk_size_tokens": 100
},
"type": "static"
}
}