---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/context/thrift/contracts/interfaces/Estimable.md
description: >-
  Anything that can estimate its own rendered token cost under a named encoding
  — the structural shape the battery expects from a `Tokenizable`-like value
  (system prompt, standing instruction, message content, thought content).
  Mirrors core's `Tokenizable` public surface, minimally.
---

# Interface: Estimable

Defined in: [src/batteries/context/thrift/contracts.ts:67](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/context/thrift/contracts.ts#L67)

Anything that can estimate its own rendered token cost under a named encoding — the structural
shape the battery expects from a `Tokenizable`-like value (system prompt, standing instruction,
message content, thought content). Mirrors core's `Tokenizable` public surface, minimally.

## Methods

### estimateTokens()

```ts
estimateTokens(encoding: string, ctx?: unknown): number;
```

Defined in: [src/batteries/context/thrift/contracts.ts:72](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/context/thrift/contracts.ts#L72)

Estimate this value's rendered token cost under `encoding`, optionally resolved against a live
dispatch context (see [EstimateTokensFn](../type-aliases/EstimateTokensFn.md) for why `ctx` matters for dynamic content).

#### Parameters

| Parameter  | Type      |
| ---------- | --------- |
| `encoding` | `string`  |
| `ctx?`     | `unknown` |

#### Returns

`number`
