NAME
OpenAPI::Client::OpenAI::Path::vector_stores - Documentation for the /vector_stores path.
OPERATIONS
GET /vector_stores
listVectorStores
$client->list_vector_stores({
body => { ... },
});
Returns a list of vector stores.
Path/query parameters
limit(in query, optional, integer) - A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.Default: 20
order(in query, optional, string) - Sort order by thecreated_attimestamp of the objects.ascfor ascending order anddescfor descending order.Allowed values: asc, desc
Default: desc
after(in query, optional, string) - A cursor for use in pagination.afteris 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(in query, optional, string) - A cursor for use in pagination.beforeis 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.
Responses
200 - OK
Content-Type: application/json
Example:
{
"data" : [
"{\n \"id\": \"vs_123\",\n \"object\": \"vector_store\",\n \"created_at\": 1698107661,\n \"usage_bytes\": 123456,\n \"last_active_at\": 1698107661,\n \"name\": \"my_vector_store\",\n \"status\": \"completed\",\n \"file_counts\": {\n \"in_progress\": 0,\n \"completed\": 100,\n \"cancelled\": 0,\n \"failed\": 0,\n \"total\": 100\n },\n \"last_used_at\": 1698107661\n}\n"
],
"first_id" : "vs_abc123",
"has_more" : false,
"last_id" : "vs_abc456",
"object" : "list"
}
POST /vector_stores
createVectorStore
$client->create_vector_store({
body => { ... },
});
Create a vector store.
Responses
200 - OK
Content-Type: application/json
Example:
{
"created_at" : 1698107661,
"file_counts" : {
"cancelled" : 0,
"completed" : 100,
"failed" : 0,
"in_progress" : 0,
"total" : 100
},
"id" : "vs_123",
"last_active_at" : 1698107661,
"last_used_at" : 1698107661,
"name" : "my_vector_store",
"object" : "vector_store",
"status" : "completed",
"usage_bytes" : 123456
}
SCHEMAS
CreateVectorStoreRequest
Properties:
chunking_strategy(object) - The chunking strategy used to chunk the file(s). If not set, will use theautostrategy. Only applicable iffile_idsis non-empty.description(string) - A description for the vector store. Can be used to describe the vector store's purpose.expires_after(VectorStoreExpirationAfter)See "VectorStoreExpirationAfter" below for shape.
file_ids(array of string) - A list of File IDs that the vector store should use. Useful for tools likefile_searchthat can access files.metadata(Metadata)See "Metadata" below for shape.
name(string) - The name of the vector store.
ListVectorStoresResponse
Properties:
data(array of VectorStoreObject, required)first_id(string, required)has_more(boolean, required)last_id(string, required)object(string, required)
Metadata
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.
Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
VectorStoreExpirationAfter
Properties:
anchor(string, required) - Anchor timestamp after which the expiration policy applies. Supported anchors:last_active_at.Allowed values: last_active_at
days(integer, required) - The number of days after the anchor time that the vector store will expire.
VectorStoreObject
Properties:
created_at(integer, required) - The Unix timestamp (in seconds) for when the vector store was created.expires_after(VectorStoreExpirationAfter)See "VectorStoreExpirationAfter" below for shape.
expires_at(anyOf)file_counts(object, required)id(string, required) - The identifier, which can be referenced in API endpoints.last_active_at(anyOf, required)metadata(Metadata, required)See "Metadata" below for shape.
name(string, required) - The name of the vector store.object(string, required) - The object type, which is alwaysvector_store.Allowed values: vector_store
status(string, required) - The status of the vector store, which can be eitherexpired,in_progress, orcompleted. A status ofcompletedindicates that the vector store is ready for use.Allowed values: expired, in_progress, completed
usage_bytes(integer, required) - The total number of bytes used by the files in the vector store.
SEE ALSO
COPYRIGHT AND LICENSE
Copyright (C) 2023-2026 by Nelson Ferraz
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.14.0 or, at your option, any later version of Perl 5 you may have available.