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
}Returns a list of files that have been uploaded.
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
}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.
"file-abc123"
1 <= x <= 10000100
asc, desc "desc"
assistants, batch, fine-tune, vision, user_data, evals "assistants"
Was this page helpful?