Billing and usage
How ApiLux charges for each model kind, and when you are not charged.
Billing units
Balance is denominated in credits, 1 credit = 1 VND, always integers. Each model kind has its own unit — see billing_unit in GET /models.
| Kind | Unit | How it is measured |
|---|---|---|
| TEXT | 1,000,000 tokens | Total input + output tokens as reported by the provider. |
| IMAGE | per image | The number of images actually returned, not the n you asked for. |
| VIDEO | per second | The duration_seconds you requested, charged at job creation. |
Every successful request costs at least 1 credit, even when rounding would give 0.
Video: when you are charged and refunded
- You are charged at job creation, by the seconds you requested.
- Polling never charges again, no matter how many times you poll.
- A
failedjob is refunded in full, automatically and exactly once. - If the provider rejects the job, you are refunded within that same request.
If the rendered video is longer than the seconds you requested, we do not bill the difference in this version. The real duration is still recorded in
actual_duration_seconds.When you are not charged
- The request is rejected for auth, model or validation reasons — we never called the provider.
- The provider errored or timed out (
upstream_error,upstream_timeout). - A video job failed — refunded automatically.
There is no idempotency key yet. If you retry after a network timeout but the original request actually succeeded, you will be charged for two separate requests. For video, poll the job ID you already received instead of resending.
Reviewing usage
Each successful request writes a usage record with the model, the quantity in its unit and the credits charged. Review them in the dashboard under Usage and Wallet. There is no API-key endpoint for reading usage yet.