> Section "Billing" of the AthanLab Developer API documentation (API version 1.0.0). On the web: https://athanlab.com/docs#billing. Whole documentation as Markdown: https://athanlab.com/docs.md # Billing The API spends the same character balance as the AthanLab app: your Max plan's monthly allowance first, then any Athan Tokens (characters you buy in the AthanLab app). One character through the API is one character in the app. `GET /usage` shows both. ## What is charged | Event | Characters | | --- | --- | | Accepted job | The length of its text in UTF-16 code units (see [Size and retention](https://athanlab.com/docs#size-limits)), charged when the job is accepted | | Failed job | Refunded in full, automatically | | Cancelled job | The generated share stays charged. The rest is refunded. | | Delivery to AthanInbox | The length of all its chapters, charged when it is accepted. A chapter that fails is refunded automatically (see [AthanInbox](https://athanlab.com/docs#athaninbox)). | | Delivery deleted while it is being made | Chapters already made stay charged, and the chapter in progress only for its generated share. The rest is refunded. | | Dry run, idempotent replay or rejected request | Nothing | | Numbers written out as words | Nothing extra (see [Numbers](https://athanlab.com/docs#number-modes)) | | Not enough characters | Nothing: creating the job or delivery returns [402 insufficient_characters](https://athanlab.com/docs#errors-insufficient_characters) | ## Per-key budgets You can give any key an optional monthly character budget on the [Developer API page](https://athanlab.com/dashboard/api). It is counted per UTC calendar month. Past it, creating a job or a delivery with that key returns [429 key_budget_exceeded](https://athanlab.com/docs#errors-key_budget_exceeded) and nothing is charged. For agents, see [A key for each agent](https://athanlab.com/docs#agent-keys). ## Paying for Max Pay with KBZPay rather than a card? Email [support@athanlab.com](mailto:support@athanlab.com?subject=AthanLab%20Developer%20API) and we set up a Max subscription for you. For what your keys can still do after your plan ends, see [When your Max plan ends](https://athanlab.com/docs#access) under Get access.