<!-- 0Gkit docs — COMPUTE_BUDGET_EXCEEDED
     Source: https://docs.0gkit.com/errors/COMPUTE_BUDGET_EXCEEDED
     LLM-friendly Markdown twin of the page. -->

# COMPUTE_BUDGET_EXCEEDED

**Inference cost exceeded budget**

## What happened

The estimated cost of the inference call exceeded the configured budget cap. The estimate uses ~chars/4 tokens × per-token rate.

## How to fix

Either raise the budget, shorten the prompt, or lower `maxOutputTokens`. Always estimate first with `Compute.estimate(...)`.

## Example

```ts
const est = await compute.estimate({ messages, maxOutputTokens: 256 });
if (est.fee > budget) throw new Error("too expensive");
```

## Reference

- Namespace: `COMPUTE`
- Help URL: `https://0gkit.com/errors/COMPUTE_BUDGET_EXCEEDED`
- See also: [all error codes](/errors)
