from mka1 import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.llm.conversations.create_items(conversation_id="conv_abc123", items=[
{
"type": "message",
"role": "user",
"content": "What is the weather today?",
},
])
# 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"
}Create items in a conversation with the given ID.
from mka1 import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.llm.conversations.create_items(conversation_id="conv_abc123", items=[
{
"type": "message",
"role": "user",
"content": "What is the weather today?",
},
])
# 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"
}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>.
The ID of the conversation
Items to add to the conversation. Min 1, max 20 items at a time.
1 - 20 elementsInput message item: A message with role and content. Use this for user, assistant, system, or developer turns in structured inputs.
Show child attributes
Additional fields to include (TODO: not implemented yet)
OK
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.
Show child attributes
Whether there are more items
ID of the last item in the current page
Was this page helpful?