ApiLux

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.

KindUnitHow it is measured
TEXT1,000,000 tokensTotal input + output tokens as reported by the provider.
IMAGEper imageThe number of images actually returned, not the n you asked for.
VIDEOper secondThe 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

  1. 01You are charged at job creation, by the seconds you requested.
  2. 02Polling never charges again, no matter how many times you poll.
  3. 03A failed job is refunded in full, automatically and exactly once.
  4. 04If 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

  1. 01The request is rejected for auth, model or validation reasons — we never called the provider.
  2. 02The provider errored or timed out (upstream_error, upstream_timeout).
  3. 03A 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.