Skip to main content
GET
/
api
/
v1
/
llm
/
conversations
/
{conversation_id}
/
items
Python (SDK)
from mka1 import SDK


with SDK(
    bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:

    res = sdk.llm.conversations.list_items(conversation_id="conv_abc123", after="item_abc123", include=[
        "content",
        "metadata",
    ], limit=50, order="desc")

    # Handle response
    print(res)
{
  "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

Gateway auth: send Authorization: Bearer <mka1-api-key>. For multi-user server-side integrations, you can also send X-On-Behalf-Of: <external-user-id>.

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
(Input message item · object | Output message item · object | File search call item · object | Computer call item · object | Computer call output item · object | Web search call item · object | Function call item · object | Function call output item · object | Reasoning item · object | Image generation call item · object | Code interpreter call item · object | Local shell call item · object | Local shell call output item · object | Shell call item · object | Shell call output item · object | MCP list tools item · object | MCP approval request item · object | MCP approval response item · object | MCP call item · object | Custom tool call item · object | Custom tool call output item · object | Item reference item · object)[]
required

A list of conversation items.

Input message item: A message with role and content. Use this for user, assistant, system, or developer turns in structured inputs.

has_more
boolean
required

Whether there are more items

last_id
string
required

ID of the last item in the current page

object
any