Get Started

# Credit Usage

> Understanding how credits are calculated across Anesya document workflows.


Credits are the billing unit used for document processing.

The current public credit rates are listed below.

Important rule:

* credits are always calculated from the **number of pages in the document**


## Current credit rates

Current public rates:

| Operation | Credits per page |
|  --- | --- |
| Parsing | `2` |
| Extract | `3` |
| Split | `2` |
| Classify | `1` |


## Credit formula

The formula is simple:


```text
credits = number_of_pages_in_document × credit_rate_for_operation
```

Examples:

* a 1-page parsing costs `1 × 2 = 2` credits
* a 3-page extract costs `3 × 3 = 9` credits
* a 10-page split costs `10 × 2 = 20` credits
* a 5-page classify costs `5 × 1 = 5` credits


## By workflow

### Documents

The `documents` resource is used to upload, store, list, retrieve, and download source files.

Document upload and storage do not consume credits.

Credits apply to processing operations such as parsing, extract, split, and classify, not to document storage itself.

### Parsing

Rate:

* `2` credits per page


Formula:


```text
parsing_credits = page_count × 2
```

Examples:

* 2 pages -> `4` credits
* 8 pages -> `16` credits
* 25 pages -> `50` credits


### Extract

Rate:

* `3` credits per page


Formula:


```text
extract_credits = page_count × 3
```

Examples:

* 2 pages -> `6` credits
* 8 pages -> `24` credits
* 25 pages -> `75` credits


### Split

Rate:

* `2` credits per page


Formula:


```text
split_credits = page_count × 2
```

### Classify

Rate:

* `1` credit per page


Formula:


```text
classify_credits = page_count × 1
```

## Example calculations

Here are common examples for business documents.

| Document size | Parsing | Extract | Split | Classify |
|  --- | --- | --- | --- | --- |
| 1 page | `2` | `3` | `2` | `1` |
| 3 pages | `6` | `9` | `6` | `3` |
| 5 pages | `10` | `15` | `10` | `5` |
| 10 pages | `20` | `30` | `20` | `10` |
| 20 pages | `40` | `60` | `40` | `20` |


## How to estimate credits before processing

To estimate usage, determine:

1. the number of pages in the document
2. the operation you are going to run
3. the matching public rate


Then apply the formula.

Example:

* document has `7` pages
* operation is `extract`
* extract rate is `3`


So:


```text
7 × 3 = 21 credits
```

## Credit optimization tips

### 1. Reduce the number of processed pages

Since credits scale directly with page count, the most effective optimization is to process fewer pages.

If you only need part of a PDF, trim it during document upload with:

* `pdf_page_start`
* `pdf_page_end`


See [Documents](/tutorials/documents).

### 2. Use the cheapest operation that solves the problem

If you only need classification, use classify instead of extract.

If you only need OCR and markdown, use parsing instead of extract.

If you only need structured output, use extract directly.

### 3. Avoid processing the same oversized source repeatedly

If a file will be reused, upload it once, keep the document ID, and decide carefully which downstream operation is actually needed each time.

### 4. Trim before downstream workflows

A shorter stored document means:

* lower parsing credits
* lower extract credits
* lower split credits
* lower classify credits


## Monitoring usage

API responses can expose usage information on processing resources.

Example shape:


```json
{
  "usage": {
    "num_pages": 3,
    "credits": 9
  }
}
```

When usage is returned, it lets you compare:

* the page count that was processed
* the credits charged for that operation


## Common questions

### Is credit usage always page-based?

Yes. Credit usage is calculated from the number of document pages.

### Does document upload itself consume credits?

No. Credits apply to processing operations such as parsing, extract, split, and classify.

### What is the most expensive operation in the current rates?

Extract, at `3` credits per page.

### What is the cheapest operation in the current rates?

Classify, at `1` credit per page.

## Related guides

* [Documents](/tutorials/documents)
* [Parsing](/tutorials/parsing)
* [Extract](/tutorials/extract)
* [API quickstart](/tutorials/quickstart)
* [API reference](/api/schema)