---
title: "Get token counts for session"
method: GET
path: "/session/{session_id}/token_counts"
tags: ["session"]
---

# Get token counts for session

`GET /session/{session_id}/token_counts`

Get total token counts for all text and tool-call parts in a session

## Path parameters

- `session_id` string, uuid, required

## Response `200`

OK

- object
  - `code` integer
  - `error` string
  - `msg` string
  - `data` HandlerTokenCountsResp
    - `total_tokens` integer

## Changes

> 50 revisions in range; 1 could not be searched.

- **2025-11-26** `e5038038f3cc` — 1 info
  - endpoint added
- **2025-11-12** `a1c1bcb0e2ee` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/memodb-io/apis/acontext-api/changes/session/:session_id/token_counts/get.md)

---

[API](https://skmtc.dev/memodb-io/apis/acontext-api.md) · [All operations](https://skmtc.dev/memodb-io/apis/acontext-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/memodb-io/acontext-api/revisions/c8775333b1ed/schema)
