---
title: "Get Message Cost"
method: GET
path: "/api/chats/{chat_id}/messages/{message_id}/cost"
tags: ["chats"]
---

# Get Message Cost

`GET /api/chats/{chat_id}/messages/{message_id}/cost`

## Request

- Base URL: `https://app.thinqos.com` (the document declares no server; this is the origin it was published from)
- URL: `https://app.thinqos.com/api/chats/{chat_id}/messages/{message_id}/cost`
- Auth: none declared

Return per-model-run cost breakdown for an assistant message.

## Path parameters

- `chat_id` string, uuid, required
- `message_id` string, uuid, required

## Headers

- `x-impersonate-identity-id` string, nullable

## Response `200`

Successful Response

- MessageCostBreakdown
  - `message_id` string, uuid, required
  - `lines` CostLine[], required
    - `capability` string, required
    - `model` string, required
    - `provider` string, required
    - `input_tokens` integer, nullable, required
    - `output_tokens` integer, nullable, required
    - `cache_read_tokens` integer, nullable
    - `cache_creation_tokens` integer, nullable
    - `cost_usd` number, nullable, required
    - `cost_usd_charged` number, nullable
    - `duration_ms` integer, nullable, required
    - `turn_id` string, nullable
  - `scope` 'message' | 'turn' | 'inferred_from_tool_traces', required
  - `total_usd` number, required
  - `total_provider_usd` number, required
  - `total_charged_usd` number, nullable, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/thinqos/apis/thinqos-api.md) · [All operations](https://skmtc.dev/thinqos/apis/thinqos-api/llms.txt) · [OpenAPI document](https://skmtc.dev/thinqos/apis/thinqos-api/revisions/5387b4ded614?raw)
