Saltar al contenido principal
POST
/
api
/
v1
/
llm
/
conversations
Python (SDK)
from mka1 import SDK


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

    res = sdk.llm.conversations.create(metadata={
        "session_id": "sess_abc123",
        "user_type": "premium",
    })

    # Handle response
    print(res)
{
  "id": "conv_abc123",
  "object": "conversation",
  "created_at": 1704067200,
  "metadata": {
    "session_id": "sess_abc123",
    "user_type": "premium"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.mka1.com/llms.txt

Use this file to discover all available pages before exploring further.

Autorizaciones

Authorization
string
header
requerido

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

Encabezados

X-On-Behalf-Of
string

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

Cuerpo

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)[]

Elementos iniciales para incluir en el contexto de la conversación. Máximo 20 elementos a la vez.

Maximum array length: 20

Elemento del mensaje de entrada: Un mensaje con rol y contenido. Utiliza esto para turnos de usuario, asistente, sistema o desarrollador en entradas estructuradas.

metadata
object

Respuesta

200 - application/json

Está bien

id
string
requerido

El ID único de la conversación.

object
any
requerido

El tipo de objeto, siempre 'conversación'

created_at
number
requerido

Marca de tiempo Unix de cuando se creó la conversación

deleted_at
number | null
requerido

Marca de tiempo de Unix de cuando la conversación fue eliminada suavemente, o nulo si no fue eliminada.

metadata
object
identity
string

Identidad del propietario de la conversación. Ya sea un hash SHA256 o un userId:externalUserId en bruto, dependiendo del MODO_IDENTIDAD.