Skip to content

Get Full Session

client.beta.chat.retrieve(stringsessionID, ChatRetrieveParams { organization_id, project_id } query?, RequestOptionsoptions?): ChatRetrieveResponse { events, last_updated_at, session_id, 3 more }
GET/api/v1/chat/{session_id}

Retrieve a full session by ID, including its event history.

ParametersExpand Collapse
sessionID: string
query: ChatRetrieveParams { organization_id, project_id }
organization_id?: string | null
project_id?: string | null
ReturnsExpand Collapse
ChatRetrieveResponse { events, last_updated_at, session_id, 3 more }

Full chat session including its complete event history.

events: Array<ThinkingDeltaEvent { content, type } | TextDeltaEvent { content, type } | ThinkingEvent { content, type } | 5 more>

Ordered list of events that make up the conversation history.

One of the following:
ThinkingDeltaEvent { content, type }
content: string
type?: "thinking_delta"
TextDeltaEvent { content, type }
content: string
type?: "text_delta"
ThinkingEvent { content, type }
content: string
type?: "thinking"
TextEvent { content, type }
content: string
type?: "text"
ToolCallEvent { arguments, call_id, name, type }
arguments: Record<string, unknown>
call_id: string
name: string
type?: "tool_call"
ToolResultEvent { call_id, name, result, 2 more }
call_id: string
name: string
result: unknown
image_attachment?: ImageAttachment | null

Coordinates for lazily resolving a page screenshot presigned URL.

attachment_name: string
source_id: string
type?: "tool_result"
StopEvent { error, is_error, usage, type }
error: string | null
is_error: boolean
usage: Usage { duration_ms, total_input_tokens, total_output_tokens, turns }
duration_ms?: number
total_input_tokens?: number | null
total_output_tokens?: number | null
turns?: number
type?: "stop"
UserInputEvent { content, type }
content: string
type?: "user_input"
last_updated_at: string

ISO-format timestamp showing when the session was last updated.

session_id: string

Unique session identifier.

generated_title?: string | null

Auto-generated title derived from the first user message.

index_ids?: Array<string> | null

Indexes this session is bound to. Null on unbound sessions.

job_metadata?: JobMetadata | null

Token usage and status from the most recent run. Null if the session has not been run yet.

duration_ms?: number
error?: string | null
export_config_ids?: Array<string> | null
is_error?: boolean
total_input_tokens?: number | null
total_output_tokens?: number | null
turns?: number

Get Full Session

import LlamaCloud from '@llamaindex/llama-cloud';

const client = new LlamaCloud({
  apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted
});

const chat = await client.beta.chat.retrieve('session_id');

console.log(chat.session_id);
{
  "events": [
    {
      "content": "content",
      "type": "thinking_delta"
    }
  ],
  "last_updated_at": "2026-04-22T12:34:41.342245",
  "session_id": "ses-abc123",
  "generated_title": "What were the main findings in Q3?...",
  "index_ids": [
    "idx-abc123",
    "idx-def456"
  ],
  "job_metadata": {
    "duration_ms": 0,
    "error": "error",
    "export_config_ids": [
      "string"
    ],
    "is_error": true,
    "total_input_tokens": 0,
    "total_output_tokens": 0,
    "turns": 0
  }
}
Returns Examples
{
  "events": [
    {
      "content": "content",
      "type": "thinking_delta"
    }
  ],
  "last_updated_at": "2026-04-22T12:34:41.342245",
  "session_id": "ses-abc123",
  "generated_title": "What were the main findings in Q3?...",
  "index_ids": [
    "idx-abc123",
    "idx-def456"
  ],
  "job_metadata": {
    "duration_ms": 0,
    "error": "error",
    "export_config_ids": [
      "string"
    ],
    "is_error": true,
    "total_input_tokens": 0,
    "total_output_tokens": 0,
    "turns": 0
  }
}