> ## Documentation Index
> Fetch the complete documentation index at: https://docs.integrateledger.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Features and credits

> Price every metered action in one currency, credits, so plans and packs work across all of them.

Every metered action in your app is a **feature** with a `creditCost`: how many credits one successful use spends. Plans and packs grant credits, not uses, so one balance covers every feature, and you can price an expensive action higher without a new plan.

```ts ledger.config.ts theme={"system"}
features: [
	feature({ id: "generate_image", name: "Generate an image", creditCost: 1 }),
	feature({ id: "generate_image_hd", name: "Generate an HD image", creditCost: 4 }),
	feature({ id: "export_pdf", name: "Export a PDF", creditCost: 3 }),
],
```

```json ledger.catalog.json theme={"system"}
"features": [
  { "id": "generate_image", "name": "Generate an image", "creditCost": 1 },
  { "id": "generate_image_hd", "name": "Generate an HD image", "creditCost": 4 },
  { "id": "export_pdf", "name": "Export a PDF", "creditCost": 3 }
]
```

A Pro plan with 1,000 credits then covers 1,000 images, 250 HD images, or any mix. Your backend passes the feature `id` to [`check` and `track`](https://docs.integrateledger.com/getting-started/gating).

## Choosing costs

* **Start from your own cost.** If an HD image costs you four times a standard one, make it 4 credits. Set plan credits so the plan's price covers a heavy month.
* **Keep costs whole numbers.** `creditCost` is a whole number above 0. For cheap actions, make a credit worth less: 10 credits per message rather than 0.1.
* **Changing a cost applies from then on.** Usage already tracked keeps the cost it was charged at, and a feature change doesn't create a plan version.

Removing a feature from the file archives it: `check` and `track` return `404 feature_not_found` for it, and its recorded usage stays.

> [!NOTE]
>
> **Other ways.** Features can also be managed in the dashboard under **Features**, or with the [feature endpoints](https://docs.integrateledger.com/api-reference/features/create.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.