Vector Store Files API
Vector store files are files that you can attach to a vector store.
Note
The OCI Vector Store Files APII uses the same format as the OpenAI Vector Store Files API with the OCI OpenAI-compatible endpoint. For syntax and request details, see the OpenAI Vector Store Files API documentation.
The OCI Vector Store Files APII uses the same format as the OpenAI Vector Store Files API with the OCI OpenAI-compatible endpoint. For syntax and request details, see the OpenAI Vector Store Files API documentation.
Supported API Endpoint
| Base URL | Endpoint Path | Authentication |
|---|---|---|
https://inference.generativeai.${region}.oci.oraclecloud.com/openai/v1 |
/vector_stores/{id}/files |
API key or IAM session |
Replace ${region} with a supported OCI region such as us-chicago-1.
Although the request format is OpenAI-compatible, authentication uses OCI credentials, requests are routed through OCI Generative AI inference endpoints, and resources and execution remain in OCI.
Authentication
You can access OCI OpenAI-compatible endpoints in two ways:
Use API keys for testing and early development. Use IAM-based authentication for production workloads and OCI-managed environments.
Creating a Vector Store File
POST /vector_stores/{vector_store_id}/files
- Reference
-
Example:
# create vector store file vector_store_file = client.vector_stores.files.create( vector_store_id="xxx", file_id="xxx" ) print(vector_store_file)
Listing Vector Store Files
GET /vector_stores/{vector_store_id}/files
- Reference
-
Example:
# list vector store files vector_store_files = client.vector_stores.files.list( vector_store_id="xxx" ) print(vector_store_files)
Retrieving Vector Store File Information
GET /vector_stores/{vector_store_id}/files/{file_id}
- Reference
-
Example:
# retrieve vector store file vector_store_file = client.vector_stores.files.retrieve( vector_store_id="xxx", file_id="xxx" ) print(vector_store_file)
Deleting a Vector Store File
DELETE /vector_stores/{vector_store_id}/files/{file_id}
- Reference
-
Example:
# delete a vector store file deleted_vector_store_file = client.vector_stores.files.delete( vector_store_id="xxx", file_id="xxx" ) print(deleted_vector_store_file)