import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.responses.list({
after: "resp_abc123",
before: "resp_xyz789",
limit: 25,
});
console.log(result);
}
run();{
"object": "list",
"data": [
{
"id": "resp_abc123",
"object": "response",
"created_at": 1735689600,
"status": "completed",
"error": null,
"incomplete_details": null,
"background": false,
"instructions": null,
"max_output_tokens": null,
"max_tool_calls": 30,
"metadata": {
"status": "reviewed",
"reviewer": "john_doe"
},
"model": "meetkai:functionary-urdu-mini-pak",
"output": [
{
"type": "message",
"id": "msg_abc123",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "The capital of France is Paris.",
"annotations": []
}
],
"status": "completed"
}
],
"output_text": "The capital of France is Paris.",
"parallel_tool_calls": true,
"previous_response_id": null,
"reasoning": {
"effort": null,
"summary": null
},
"service_tier": "auto",
"store": true,
"text": {
"format": {
"type": "text"
},
"verbosity": "medium"
},
"tool_choice": "auto",
"tools": [],
"truncation": "auto",
"usage": {
"input_tokens": 8,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens": 7,
"output_tokens_details": {
"reasoning_tokens": 0
},
"total_tokens": 15
},
"user": null
}
],
"first_id": "resp_abc123",
"last_id": "resp_abc123",
"has_more": false
}Retrieves a paginated list of all agent responses 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.responses.list({
after: "resp_abc123",
before: "resp_xyz789",
limit: 25,
});
console.log(result);
}
run();{
"object": "list",
"data": [
{
"id": "resp_abc123",
"object": "response",
"created_at": 1735689600,
"status": "completed",
"error": null,
"incomplete_details": null,
"background": false,
"instructions": null,
"max_output_tokens": null,
"max_tool_calls": 30,
"metadata": {
"status": "reviewed",
"reviewer": "john_doe"
},
"model": "meetkai:functionary-urdu-mini-pak",
"output": [
{
"type": "message",
"id": "msg_abc123",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "The capital of France is Paris.",
"annotations": []
}
],
"status": "completed"
}
],
"output_text": "The capital of France is Paris.",
"parallel_tool_calls": true,
"previous_response_id": null,
"reasoning": {
"effort": null,
"summary": null
},
"service_tier": "auto",
"store": true,
"text": {
"format": {
"type": "text"
},
"verbosity": "medium"
},
"tool_choice": "auto",
"tools": [],
"truncation": "auto",
"usage": {
"input_tokens": 8,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens": 7,
"output_tokens_details": {
"reasoning_tokens": 0
},
"total_tokens": 15
},
"user": null
}
],
"first_id": "resp_abc123",
"last_id": "resp_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 response ID to use as a cursor for pagination. Returns responses that come after this ID in the list. Used for cursor-based pagination to fetch subsequent pages.
"resp_abc123"
A response ID to use as a cursor for pagination. Returns responses that come before this ID in the list. Used for cursor-based pagination to fetch previous pages.
"resp_xyz789"
The maximum number of responses to return per page. Must be between 1 and 100. Defaults to 20 items.
1 <= x <= 10025
The order to return the responses in by creation date. 'asc' returns oldest responses first, 'desc' returns newest responses first. Defaults to 'desc' (newest first).
asc, desc "desc"
Paginated list of responses for the authenticated user.
Paginated list object containing responses with cursor-based pagination metadata.
The object type, always 'list' for paginated list responses.
Array of response objects. Each response contains its status, model, input/output, tool usage logs, metadata, and completion information.
Show child attributes
Indicates whether there are more responses available beyond the current page. True if additional pages exist, false otherwise.
The ID of the first response in the current page. Used as a reference point for pagination.
The ID of the last response in the current page. Used as a cursor for fetching the next page.
Was this page helpful?