---
title: Pricing units
description: Name your own credits or tokens and set prices in them.
domain: pricingunit
status: shipped
visibility: public
last_verified: 2026-07-11
order: 20
---
A pricing unit is a named credit or token you invent: "API credits", "compute tokens", "message units". You can set a price in that unit instead of directly in a currency, and the amount is converted to real money when the invoice is made.

## What a unit has

A pricing unit carries:

- A **name**, like "API credits".
- A **symbol**, a short display token up to eight characters.
- A **code**, a stable key.
- **Decimals**, how precise the unit is, from 0 to 6 places. Whole credits use 0; fractional tokens use more.

The code and the decimals are fixed once the unit is created, because changing them would change what already-priced amounts mean.

## Pricing in a unit

Set a price in a pricing unit and it computes in that unit's space. When the invoice is generated, the unit amount is converted to the customer's currency once, at the end, so summing many small unit charges never drifts. This pairs naturally with [usage and metering](/guide/usage/meters) and [dynamic pricing](/guide/pricing-models/dynamic) for AI and token-based billing.

## Units and wallets

A pricing unit is also what a credits [wallet](/guide/wallets/wallets) is denominated in. A customer buys a balance of "API credits", and prices set in that unit draw the balance down. The unit ties the price and the wallet together: they speak the same currency of credits.

## In the API

Create a pricing unit with `POST /v1/pricing-units`, and list, fetch, update, archive, or unarchive them through the rest of the `/v1/pricing-units` routes. See the [API reference](/reference).

## Edge cases

- **Code and decimals are fixed after creation.** To change them, make a new unit.
- **Conversion to money happens once, at billing.** The price lives in the unit until then, so precision is kept.
- **A unit is your own invention.** It is whatever credit or token makes sense for your product.
