import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.conversations.getItem({
conversationId: "conv_abc123",
itemId: "item_abc123",
});
console.log(result);
}
run();{
"id": "item_abc123",
"response_id": "resp_abc123",
"type": "message",
"role": "user",
"content": "What is the weather today?"
}Get a single item from a conversation with the given IDs.
import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.conversations.getItem({
conversationId: "conv_abc123",
itemId: "item_abc123",
});
console.log(result);
}
run();{
"id": "item_abc123",
"response_id": "resp_abc123",
"type": "message",
"role": "user",
"content": "What is the weather today?"
}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.
The ID of the conversation
The ID of the item
OK
A message input item with a role and content. Represents a single turn in the conversation from a user, assistant, system, or developer.
The role of the message sender (user, assistant, system, or developer).
user, assistant, system, developer The message content. Can be a simple text string or an array of multimodal content items (text, images, files, audio).
The unique ID of the message.
The item type identifier. Always 'message' for message items.
The processing status of this message. Optional - indicates if the message is in_progress, completed, or incomplete.
in_progress, completed, incomplete The ID of the response that created this item, if any.
Was this page helpful?