Pular para o conteúdo principal
POST
Python (SDK)

Autorizações

Authorization
string
header
obrigatório

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

Cabeçalhos

X-On-Behalf-Of
string

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

Parâmetros de caminho

conversation_id
string
obrigatório

O ID da conversa

Corpo

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)[]
obrigatório

Itens para adicionar à conversa. Mínimo 1, máximo 20 itens por vez.

Required array length: 1 - 20 elements

Item de mensagem de entrada: Uma mensagem com papel e conteúdo. Use isso para turnos de usuário, assistente, sistema ou desenvolvedor em entradas estruturadas.

include
string[]

Campos adicionais a serem incluídos (TODO: ainda não implementado)

Resposta

200 - application/json

OK

data
(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)[]
obrigatório

A list of conversation items.

Item de mensagem de entrada: Uma mensagem com papel e conteúdo. Use isso para turnos de usuário, assistente, sistema ou desenvolvedor em entradas estruturadas.

has_more
boolean
obrigatório

Whether there are more items

last_id
string
obrigatório

ID of the last item in the current page

object
any