from mka1 import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.llm.vector_stores.list_files(vector_store_id="vs_abc123", limit=20, order="desc", after="file-abc123", filter_="completed")
# Handle response
print(res){
"object": "list",
"data": [
{
"id": "file-abc123",
"object": "vector_store.file",
"usage_bytes": 256000,
"created_at": 1704067200,
"vector_store_id": "vs_abc123",
"status": "completed",
"last_error": null,
"chunking_strategy": {
"type": "auto"
},
"attributes": {
"category": "manual",
"version": "2.0"
}
}
],
"first_id": "file-abc123",
"last_id": "file-abc123",
"has_more": false
}Retrieves a paginated list of all files in a specific vector store.
from mka1 import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.llm.vector_stores.list_files(vector_store_id="vs_abc123", limit=20, order="desc", after="file-abc123", filter_="completed")
# Handle response
print(res){
"object": "list",
"data": [
{
"id": "file-abc123",
"object": "vector_store.file",
"usage_bytes": 256000,
"created_at": 1704067200,
"vector_store_id": "vs_abc123",
"status": "completed",
"last_error": null,
"chunking_strategy": {
"type": "auto"
},
"attributes": {
"category": "manual",
"version": "2.0"
}
}
],
"first_id": "file-abc123",
"last_id": "file-abc123",
"has_more": false
}Gateway auth: send Authorization: Bearer <mka1-api-key>. For multi-user server-side integrations, you can also send X-On-Behalf-Of: <external-user-id>.
The ID of the vector store that the files belong to.
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.
Filter by file status. One of in_progress, completed, failed, cancelled.
in_progress, completed, failed, cancelled OK
A list of vector store files.
The object type, which is always 'list'.
Array of vector store file 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?