OpenAI API

Retrieves a vector store file.

get
https://api.openai.com/v1/vector_stores/{vector_store_id}/files/{file_id}

Path Parameters

vector_store_idstringrequired

The ID of the vector store that the file belongs to.

Example:vs_abc123

file_idstringrequired

The ID of the file being retrieved.

Example:file-abc123

Response

200 application/json

OK

Vector store files

A list of files attached to a vector store.

idstringrequired

The identifier, which can be referenced in API endpoints.

objectstringrequired

The object type, which is always vector_store.file.

Allowed values:vector_store.file

usage_bytesintegerrequired

The total vector store usage in bytes. Note that this may be different from the original file size.

created_atintegerrequired

The Unix timestamp (in seconds) for when the vector store file was created.

vector_store_idstringrequired

The ID of the vector store that the File is attached to.

statusstringrequired

The status of the vector store file, which can be either in_progress, completed, cancelled, or failed. The status completed indicates that the vector store file is ready for use.

Allowed values:in_progresscompletedcancelledfailed

last_errorobject | nullrequired

The last error associated with this vector store file. Will be null if there are no errors.

Show Child Parameters
chunking_strategyOne Of
object

The strategy used to chunk the file.

Static Chunking Strategyobject
* Additional properties are NOT allowed.
Show Child Parameters
get/vector_stores/{vector_store_id}/files/{file_id}
 
200 application/json

Delete a vector store file. This will remove the file from the vector store but the file itself will not be deleted. To delete the file, use the [delete file](/docs/api-reference/files/delete) endpoint.

delete
https://api.openai.com/v1/vector_stores/{vector_store_id}/files/{file_id}

Path Parameters

vector_store_idstringrequired

The ID of the vector store that the file belongs to.

file_idstringrequired

The ID of the file to delete.

Response

200 application/json

OK

DeleteVectorStoreFileResponse

idstringrequired
deletedbooleanrequired
objectstringrequired

Allowed values:vector_store.file.deleted

delete/vector_stores/{vector_store_id}/files/{file_id}
 
200 application/json

AddUploadPartRequest

object
* Additional properties are NOT allowed.
datastring(binary)required

The chunk of bytes for this Part.

Example

AdminApiKey

object
objectstring

Example:organization.admin_api_key

idstring

Example:key_abc

namestring

Example:Administration Key

redacted_valuestring

Example:sk-admin...def

valuestring

Example:sk-admin-1234abcd

created_atinteger(int64)

Example:1711471533

ownerobject
Show Child Parameters
Example

ApiKeyList

object
objectstring

Example:list

dataarray[object]
Show Child Parameters
has_moreboolean
first_idstring

Example:key_abc

last_idstring

Example:key_xyz

Example