Mix LogoMix

List all sessions

Retrieve a list of all available sessions with their metadata

Retrieve a list of all available sessions with their metadata

GET
/api/sessions

Response Body

from mix_python_sdk import Mixwith Mix() as mix:    res = mix.sessions.list()    # Handle response    print(res)
[
  {
    "assistantMessageCount": 0,
    "completionTokens": 0,
    "cost": 0.1,
    "createdAt": "2019-08-24T14:15:22Z",
    "firstUserMessage": "string",
    "id": "string",
    "promptTokens": 0,
    "title": "string",
    "toolCallCount": 0,
    "userMessageCount": 0
  }
]
{
  "error": {
    "code": 0,
    "message": "string",
    "type": "bad_request"
  }
}
{
  "error": {
    "code": 0,
    "message": "string",
    "type": "bad_request"
  }
}