Skip to main content
POST
Python (SDK)

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>.

Headers

X-On-Behalf-Of
string

Optional external end-user identifier forwarded by the API gateway.

Body

application/json
items
(Input message item · object | Output message item · object | Output audio 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 | Compaction item · object)[]

Initial items to include in the conversation context. Max 20 items at a time.

Maximum array length: 20

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

metadata
object

Set of 16 key-value pairs for storing additional information.

Response

200 - application/json

OK

id
string
required

The unique ID of the conversation

object
any
required

The object type, always 'conversation'

created_at
number
required

Unix timestamp of when the conversation was created

deleted_at
number | null
required

Unix timestamp of when the conversation was soft-deleted, or null if not deleted.

metadata
object | null

Set of 16 key-value pairs. Keys max 64 chars, values max 512 chars.

identity
string

Identity of the conversation owner. Either a SHA256 hash or raw userId:externalUserId depending on IDENTITY_MODE.