Skip to content

Why can the video API list more decimal places in usage than in the quote I show a customer?

Keep signed-off generation ceilings separate from accounting precision. AISwapLab's request schema limits `max_credits` to hundredths of a credit, while documented job and usage fields can report smaller increments. A formatted UI value is a view of the underlying record.

SHIP A RELIABLE INTEGRATIONAISwapLab team · Editorial methodPublished 2 min read
Open API documentationExplore 67 Image SkillsPrivate keys · Explicit credit approval

Represent each value appropriately

Preserve the returned precision for reconciliation and validate the actual ceiling sent to the API. Display the current quote and the relevant credit version.

Test the displayed totals

Aggregate the underlying values before formatting an accounting total. Avoid inferring the reserved amount from rounded UI rows if the API offers the recorded values.

Example

Two stored entries of 0.124 display as 0.12 each. Their raw sum rounds to 0.25 when presented as an aggregate.

Pass condition

The user sees the approved two-decimal ceiling and the ledger can explain the rounded totals from precise source values.

Sources

One task. A recoverable workflow.

Check the contract, approve the quote and retain the job.

Open API documentation