Skip to content

Returns a list of vector store files.

GET
/vector_stores/{vector_store_id}/files

Authorizations

Parameters

Path Parameters

vector_store_id
required
string

The ID of the vector store that the files belong to.

Query Parameters

limit
integer
default: 20

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.

order
string
default: desc
Allowed values: asc desc

Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.

after
string

A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.

before
string

A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.

filter
string
Allowed values: in_progress completed failed cancelled

Filter by file status. One of in_progress, completed, failed, cancelled.

Responses

200

OK

object
object
required
string
list
data
required
Array<object>

A list of files attached to a vector store.

object
id
required

The identifier, which can be referenced in API endpoints.

string
object
required

The object type, which is always vector_store.file.

string
Allowed values: vector_store.file
usage_bytes
required

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

integer
created_at
required

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

integer
vector_store_id
required

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

string
status
required

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.

string
Allowed values: in_progress completed cancelled failed
last_error
required

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

object
code
required

One of server_error or rate_limit_exceeded.

string
Allowed values: server_error unsupported_file invalid_file
message
required

A human-readable description of the error.

string
chunking_strategy
One of:
object
type
required

Always static.

string
Allowed values: static
static
required
object
max_chunk_size_tokens
required

The maximum number of tokens in each chunk. The default value is 800. The minimum value is 100 and the maximum value is 4096.

integer
>= 100 <= 4096
chunk_overlap_tokens
required

The number of tokens that overlap between chunks. The default value is 400.

Note that the overlap must not exceed half of max_chunk_size_tokens.

integer
first_id
required
string
file-abc123
last_id
required
string
file-abc456
has_more
required
boolean