List vector stores
vector_stores.list(VectorStoreListParams**kwargs ) -> SyncCursorPage[VectorStore]
GET
/vector_storesReturns a list of vector stores.
Parameters
after: Optional[str]
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: Optional[str]
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.
List vector stores
from openai import OpenAI
client = OpenAI()
vector_stores = client.vector_stores.list()
print(vector_stores)
Response example
{
"object": "list",
"data": [
{
"id": "vs_abc123",
"object": "vector_store",
"created_at": 1699061776,
"name": "Support FAQ",
"description": "Contains commonly asked questions and answers, organized by topic.",
"file_counts": {
"in_progress": 0,
"completed": 3,
"failed": 0,
"cancelled": 0,
"total": 3
},
"usage_bytes": 139920,
"status": "completed",
"last_active_at": null,
"metadata": {}
},
{
"id": "vs_abc456",
"object": "vector_store",
"created_at": 1699061776,
"name": "Support FAQ v2",
"file_counts": {
"in_progress": 0,
"completed": 3,
"failed": 0,
"cancelled": 0,
"total": 3
},
"usage_bytes": 139920,
"status": "completed",
"last_active_at": null,
"metadata": {}
}
],
"first_id": "vs_abc123",
"last_id": "vs_abc456",
"has_more": false
}
Returns Examples
Response example
{
"object": "list",
"data": [
{
"id": "vs_abc123",
"object": "vector_store",
"created_at": 1699061776,
"name": "Support FAQ",
"description": "Contains commonly asked questions and answers, organized by topic.",
"file_counts": {
"in_progress": 0,
"completed": 3,
"failed": 0,
"cancelled": 0,
"total": 3
},
"usage_bytes": 139920,
"status": "completed",
"last_active_at": null,
"metadata": {}
},
{
"id": "vs_abc456",
"object": "vector_store",
"created_at": 1699061776,
"name": "Support FAQ v2",
"file_counts": {
"in_progress": 0,
"completed": 3,
"failed": 0,
"cancelled": 0,
"total": 3
},
"usage_bytes": 139920,
"status": "completed",
"last_active_at": null,
"metadata": {}
}
],
"first_id": "vs_abc123",
"last_id": "vs_abc456",
"has_more": false
}