Mix LogoMix

Send a message to session

Send a user message to a specific session for AI processing

Send a user message to a specific session for AI processing

POST
/api/sessions/{id}/messages

Path Parameters

idstring

Session ID

plan_mode?boolean

Whether the message is in planning mode

Defaultfalse
textstring

The text content of the message

Response Body

from mix_python_sdk import Mixwith Mix() as mix:    res = mix.messages.send(id="<id>", text="<value>", plan_mode=False)    # Handle response    print(res)
{
  "assistantResponse": "string",
  "id": "string",
  "reasoning": "string",
  "reasoningDuration": 0,
  "role": "string",
  "sessionId": "string",
  "toolCalls": [
    {
      "finished": true,
      "id": "string",
      "input": "string",
      "isError": true,
      "name": "bash",
      "result": "string",
      "type": "string"
    }
  ],
  "userInput": "string"
}
{
  "error": {
    "code": 0,
    "message": "string",
    "type": "bad_request"
  }
}
{
  "error": {
    "code": 0,
    "message": "string",
    "type": "bad_request"
  }
}