# Usage and warnings

Report what the winning provider supplies, while keeping unknown costs unknown.

Canonical: https://searchsdk.dev/docs/reliability/usage
Markdown: https://searchsdk.dev/docs/reliability/usage.md

<a id="usage"></a>

## Usage is reported, not estimated

> **TypeScript reference**
> The API names, code and policy behavior in this article describe the TypeScript SDK. See [your language guide](https://searchsdk.dev/docs/sdks) for its supported surface and limits.

| Adapter | Normalized usage |
| --- | --- |
| Context.dev | `credits` from key_metadata.credits_consumed. |
| Exa | `usd` from costDollars.total. |
| Tavily | `credits` from usage.credits. |
| TinyFish / Brave | `null` when not reported. |

Explicit zero usage is preserved. Missing usage becomes `null`. Winning-response usage excludes failed-attempt charges and is not the total cost of a fallback chain.

A reused response retains the original provider's usage, retrieval timestamps, and attempts. Check `response.reuse`: cache or in-flight sharing is not a new provider call, and its retained usage is not a fresh charge.

<a id="count"></a>

## Output count is not a billing unit

Context requests at least ten native results and can trim to a smaller SDK ceiling. TinyFish requests one first page without a native count parameter. Never infer provider charges from `results.length` or treat unknown usage as zero.

<a id="warnings"></a>

## Warnings use stable codes

- `fallback_used`: a later provider succeeded after an earlier failure.
- `provider_warning`: a provider-specific warning condition, such as Context partial results or Exa warning metadata.

Raw provider warning text is not forwarded through normalized warnings. A warning does not imply that a malformed consumed result was accepted; schema validation still applies.
