Create Session
POST/api/v1/chat
Create a chat session, optionally bound to indexes (locked after the first message).
Create Session
curl https://api.cloud.llamaindex.ai/api/v1/chat \
-X POST \
-H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"{
"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
{
"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
}
}