Export session transcript
Export complete session transcript with all messages, tool calls, reasoning, and metadata as JSON
Export complete session transcript with all messages, tool calls, reasoning, and metadata as JSON
from mix_python_sdk import Mixwith Mix() as mix: res = mix.sessions.export_session(id="<id>") # Handle response print(res)
{
"assistantMessageCount": 0,
"completionTokens": 0,
"cost": 0.1,
"createdAt": "2019-08-24T14:15:22Z",
"id": "string",
"messages": [
{
"content": "string",
"createdAt": "2019-08-24T14:15:22Z",
"finishReason": "string",
"id": "string",
"model": "string",
"reasoning": "string",
"reasoningDuration": 0,
"role": "string",
"toolCalls": [
{
"finished": true,
"id": "string",
"input": "string",
"inputJson": {},
"isError": true,
"metadata": "string",
"name": "string",
"result": "string",
"type": "string"
}
],
"updatedAt": "2019-08-24T14:15:22Z"
}
],
"promptTokens": 0,
"title": "string",
"toolCallCount": 0,
"updatedAt": "2019-08-24T14:15:22Z",
"userMessageCount": 0
}
{
"error": {
"code": 0,
"message": "string",
"type": "bad_request"
}
}
{
"error": {
"code": 0,
"message": "string",
"type": "bad_request"
}
}