Skip to main content
GET
/
api
/
v1
/
llm
/
conversations
/
{conversation_id}
/
items
Typescript (SDK)
import { SDK } from "@meetkai/mka1";

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

async function run() {
  const result = await sdk.llm.conversations.listItems({
    conversationId: "conv_abc123",
    after: "item_abc123",
    include: [
      "content",
      "metadata",
    ],
    limit: 50,
    order: "desc",
  });

  console.log(result);
}

run();
{
  "object": "list",
  "data": [
    {
      "id": "item_abc123",
      "response_id": "resp_abc123",
      "type": "message",
      "role": "user",
      "content": "What is the weather today?"
    }
  ],
  "has_more": false,
  "last_id": "item_abc123"
}

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

conversation_id
string
required

The ID of the conversation

Query Parameters

after
string

Item ID to list items after (pagination cursor)

Example:

"item_abc123"

include
string[]

Additional fields to include (TODO: not implemented yet)

Example:
["content", "metadata"]
limit
integer
default:20

Max number of items to return (1-100, default 20)

Required range: 1 <= x <= 100
Example:

50

order
enum<string>
default:asc

The order to return the input items in. Default is asc.

Available options:
asc,
desc
Example:

"desc"

Response

200 - application/json

OK

data
object[]
required

A list of conversation items.

A message input item with a role and content. Represents a single turn in the conversation from a user, assistant, system, or developer.

has_more
boolean
required

Whether there are more items

last_id
string
required

ID of the last item in the current page

object
any