Attach a file to a vector store
Index an uploaded file in a vector store.
/vector_stores/{vector_store_id}/filesIndex an uploaded file in a vector store.
The call returns once indexing has finished, so status is already completed or failed. A file that cannot be read comes back with status: "failed" and a last_error. Olive splits the file along its own structure, so each chunk keeps the headings above it.
Attach one file at a time. Attaching several files to one store in parallel loses files, and the file batch endpoints are not available: they answer 403.
A large file can take longer than the API waits. The call then answers 504 while indexing carries on. List the store's files to check, and do not attach the file again until you have.
Attaches share one budget with uploads and downloads: 20 per hour and 200 per day, with a burst of 10. A store or file that does not exist, or that belongs to another account, answers as not found.
Authorization
BearerAuth Your Avey API key, sent as Authorization: Bearer <key>. This is the header the OpenAI SDKs already send, so pass the key as the client's ordinary api_key and no further configuration is needed.
In: header
Path Parameters
The id of a vector store, as returned in its id.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
The body of a request that attaches a file to a vector store.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl https://api.avey.ai/llm/vector_stores/vs_6f1c2a9d8e7b4c35a0d1e2f3b4c5d6e7/files \ -H "Authorization: Bearer $AVEY_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "file_id": "file-Cn3MSNn72ENTiiq11Qda4A" }'{ "id": "file-Cn3MSNn72ENTiiq11Qda4A", "object": "vector_store.file", "vector_store_id": "vs_6f1c2a9d8e7b4c35a0d1e2f3b4c5d6e7", "created_at": 1769904000, "usage_bytes": 20480, "status": "completed", "last_error": null}