Update vector store file attributes
POSThttps:/api.openai.com/v1/vector_stores/{vector_store_id}/files/{file_id}
Update attributes on a vector store file.
Path parameters
vector_store_id
string
Required
The ID of the vector store the file belongs to.file_id
string
Required
The ID of the file to update attributes.
Request body
attributes
object or null
Required
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters, booleans, or numbers.
Response
The updated vector store file object.
Example request
1 curl https://api.openai.com/v1/vector_stores/{vector_store_id}/files/{file_id} \2 -H "Authorization: Bearer $OPENAI_API_KEY" \3 -H "Content-Type: application/json" \4 -d '{"attributes": {"key1": "value1", "key2": 2}}'
Example response
1 {2 "id": "file-abc123",3 "object": "vector_store.file",4 "usage_bytes": 1234,5 "created_at": 1699061776,6 "vector_store_id": "vs_abcd",7 "status": "completed",8 "last_error": null,9 "chunking_strategy": {...},10 "attributes": {"key1": "value1", "key2": 2}11 }
Built with