Skip to main content
GET
/
orgs
/
{org_id}
/
projects
/
{project_id}
/
compose
/
sessions
cURL
curl --request GET \
  --url https://api.timbal.ai/orgs/{org_id}/projects/{project_id}/compose/sessions \
  --header 'Authorization: Bearer <token>'
[
  {
    "cache_creation_tokens": 123,
    "cache_read_tokens": 123,
    "cost_usd": 123,
    "created_at": "2023-11-07T05:31:56Z",
    "id": "<string>",
    "input_tokens": 123,
    "iteration_count": 123,
    "last_active_at": "2023-11-07T05:31:56Z",
    "model_usage": "<unknown>",
    "output_tokens": 123,
    "project_id": "<string>",
    "rev": "<string>",
    "status": "<string>",
    "tool_call_count": 123,
    "turn_count": 123,
    "uid": "<string>",
    "user_id": "<string>",
    "model": "<string>"
  }
]

Authorizations

Authorization
string
header
required

Timbal API key. Obtain your API key from the Timbal platform settings. See Authentication for more information.

Path Parameters

org_id
string
required
project_id
string
required

Query Parameters

user_id
string | null

Filter sessions by user ID

Response

200 - application/json

Sessions listed successfully

cache_creation_tokens
integer<int64>
required

Total cache creation tokens

cache_read_tokens
integer<int64>
required

Total cache read tokens

cost_usd
number<double>
required

Accumulated cost in USD

created_at
string<date-time>
required
id
string
required
input_tokens
integer<int64>
required

Total input tokens across all turns

iteration_count
integer<int32>
required

Total LLM calls (including mid-turn iterations)

last_active_at
string<date-time>
required
model_usage
any
required

Per-model token and cost breakdown

output_tokens
integer<int64>
required

Total output tokens across all turns

project_id
string
required
rev
string
required

Git branch the session is scoped to

status
string
required

Session status: "active" or "idle"

tool_call_count
integer<int32>
required

Total tool_use blocks across all calls

turn_count
integer<int32>
required

Number of user prompts sent

uid
string
required
user_id
string
required
model
string | null

Model used in this session