Search + K

Command Palette

Search for a command to run...

Sign In

Returns a list of vector store files.

GET /vector_stores/{vector_store_id}/files
Copy endpoint
https://api.openai.com/v1

Parameters

path Path Parameters

Name Type
vector_store_id required

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

string

query Query Parameters

Name Type
limit

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

number
order

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

"asc" | "desc"
after

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.

string
before

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, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.

string
filter

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

"in_progress" | "completed" | "failed" | "cancelled"

Responses

200 application/json

OK

interface ListVectorStoreFilesResponse {
object: string;
data: VectorStoreFileObject

A list of files attached to a vector store.

interface VectorStoreFileObject {
id: string;
object: "vector_store.file";
usage_bytes: number;
created_at: number;
vector_store_id: string;
status: "in_progress" | "completed" | "cancelled" | "failed";
last_error: { code: "server_error" | "unsupported_file" | "invalid_file";message: string; } | null;
chunking_strategy?: StaticChunkingStrategyResponseParam & {} | OtherChunkingStrategyResponseParam & {};
attributes?: VectorStoreFileAttributes;
}
[]
;
first_id: string;
last_id: string;
has_more: boolean;
}