Skip to main content
GET
/
api
/
v1
/
llm
/
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.files.list({
    after: "file-abc123",
    limit: 100,
    purpose: "assistants",
  });

  console.log(result);
}

run();
{
  "object": "list",
  "data": [
    {
      "id": "file-abc123",
      "object": "file",
      "bytes": 125000,
      "created_at": 1704067200,
      "filename": "product-manual.pdf",
      "purpose": "assistants",
      "status": "processed"
    }
  ],
  "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.

Query Parameters

after
string
Example:

"file-abc123"

limit
integer
default:10000
Required range: 1 <= x <= 10000
Example:

100

order
enum<string>
default:desc
Available options:
asc,
desc
Example:

"desc"

purpose
enum<string>
Available options:
assistants,
batch,
fine-tune,
vision,
user_data,
evals
Example:

"assistants"

Response

200 - application/json

OK

object
any
required
data
object[]
required
has_more
boolean
required
first_id
string
last_id
string