---
title: "Get credit balance"
method: POST
path: "/api/v1/tools/get_credit_balance"
---

# Get credit balance

`POST /api/v1/tools/get_credit_balance`

## Request

- Base URL: `https://www.trezalabs.com`
- URL: `https://www.trezalabs.com/api/v1/tools/get_credit_balance`
- Auth: HTTP bearer

Current prepaid credit balance, plan usage, and purchasable credit packs for this account. Use it to budget before starting runs. When the balance is low, hand the returned topUpUrl to a signed-in human; if the response carries an x402 block, a wallet-holding agent can pay that endpoint to top itself up with no human involved. That block also carries x402.video when this deployment sells single clips: one payment renders and returns one video without touching the balance, which is the cheaper path for a one-off.

## Request body

- object

## Response `200`

The tool's result.

- object

## Other responses

- `400`: The arguments were refused. `error` says why.
- `401`: No API key, or one that is not valid.
- `402`: The credit balance does not cover this run.
- `403`: The API key lacks a permission this tool needs.
- `404`: No such tool, or the pipeline, run or asset is not on this account.
- `429`: Too many runs started or in progress. Wait, then try again.

---

[API](https://skmtc.dev/trezalabs/apis/treza-pipelines-api.md) · [All operations](https://skmtc.dev/trezalabs/apis/treza-pipelines-api/llms.txt) · [OpenAPI document](https://skmtc.dev/trezalabs/apis/treza-pipelines-api/revisions/a76574c1731b?raw)
