Skip to main content
GET
/
api
/
v1
/
llm
/
vector_stores
/
{vector_store_id}
/
files
Typescript (SDK)
import { SDK } from "@meetkai/mka1";

const sdk = new SDK({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await sdk.llm.vectorStores.listFiles({
    vectorStoreId: "vs_abc123",
    after: "file-abc123",
    filter: "completed",
  });

  console.log(result);
}

run();
{
  "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
}

Authorizations

Authorization
string
header
required

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.

Headers

X-On-Behalf-Of
string

Optional external user identifier for multi-user server-side integrations. Use this when acting on behalf of one of your end users.

Path Parameters

vector_store_id
string
required

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

Query Parameters

limit
integer
default:20

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

Required range: 1 <= x <= 100
order
enum<string>
default:desc

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

Available options:
asc,
desc
after
string

A cursor for use in pagination. An object ID that defines your place in the list for fetching the next page.

before
string

A cursor for use in pagination. An object ID that defines your place in the list for fetching the previous page.

filter
enum<string>

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

Available options:
in_progress,
completed,
failed,
cancelled

Response

200 - application/json

OK

A list of vector store files.

object
any
required

The object type, which is always 'list'.

data
object[]
required

Array of vector store file objects.

first_id
string
required

The ID of the first object in the list.

last_id
string
required

The ID of the last object in the list.

has_more
boolean
required

Whether there are more objects available.