import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.vectorStores.list({
after: "vs_abc123",
});
console.log(result);
}
run();{
"object": "list",
"data": [
{
"id": "vs_abc123",
"object": "vector_store",
"created_at": 1704067200,
"name": "Product Documentation",
"usage_bytes": 1024000,
"embedding_model": "openai:text-embedding-3-small",
"embedding_dimensions": 1536,
"file_counts": {
"in_progress": 0,
"completed": 5,
"failed": 0,
"cancelled": 0,
"total": 5
},
"status": "completed",
"last_active_at": 1704153600,
"last_used_at": 1704153600,
"metadata": {
"department": "engineering"
},
"description": "Vector store for product manuals and docs",
"expires_at": null
}
],
"first_id": "vs_abc123",
"last_id": "vs_abc123",
"has_more": false
}Retrieves a paginated list of all vector stores for the authenticated user.
import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.vectorStores.list({
after: "vs_abc123",
});
console.log(result);
}
run();{
"object": "list",
"data": [
{
"id": "vs_abc123",
"object": "vector_store",
"created_at": 1704067200,
"name": "Product Documentation",
"usage_bytes": 1024000,
"embedding_model": "openai:text-embedding-3-small",
"embedding_dimensions": 1536,
"file_counts": {
"in_progress": 0,
"completed": 5,
"failed": 0,
"cancelled": 0,
"total": 5
},
"status": "completed",
"last_active_at": 1704153600,
"last_used_at": 1704153600,
"metadata": {
"department": "engineering"
},
"description": "Vector store for product manuals and docs",
"expires_at": null
}
],
"first_id": "vs_abc123",
"last_id": "vs_abc123",
"has_more": false
}Authenticate with your MKA1 API key at the API gateway: Authorization: Bearer <mka1-api-key>. For multi-user server-side integrations, also send X-On-Behalf-Of to identify the end user making the request.
Optional external user identifier for multi-user server-side integrations. Use this when acting on behalf of one of your end users.
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.
1 <= x <= 100Sort order by the created_at timestamp of the objects. 'asc' for ascending order and 'desc' for descending order.
asc, desc A cursor for use in pagination. An object ID that defines your place in the list for fetching the next page.
A cursor for use in pagination. An object ID that defines your place in the list for fetching the previous page.
OK
A list of vector stores.
The object type, which is always 'list'.
Array of vector store objects.
Show child attributes
The ID of the first object in the list.
The ID of the last object in the list.
Whether there are more objects available.
Was this page helpful?