Skip to content

How are current USD API prices converted into whole image credits?

The current API accepts a credit ceiling with up to two decimals in v4 ledger units. Accounting records may carry finer precision. One website credit equals 45 v4 ledger credits. The pricing page displays estimated website credits, while API request and response values use the documented ledger denomination.

UNDERSTAND API CREDITS AND COSTSAISwapLab team · Editorial methodUpdated 2 min read
Open API documentationExplore 67 Image SkillsPrivate keys · Explicit credit approval
Article workflow: Read the quote version; Use the current list conversion; Keep historical records intact.
Workflow diagram: Read the quote version → Use the current list conversion → Keep historical records intact. Read the article for evidence and limits.

Wallet precision and price conversion are different

Request validation, current quote rounding and retention of historical ledger precision serve distinct purposes. Keep those values and the version together on every order.

What to do next

  1. 01

    Read the quote version

    Check credit_version and the returned quote for the selected model, operation and size. Current quotes are v4; do not infer units from an older screenshot.

  2. 02

    Use the current list conversion

    Read the pricing and OpenAPI response in their own units. For display, divide the quoted v4 ledger credits by 45. Preserve the actual returned values for reconciliation.

  3. 03

    Keep historical records intact

    Store the actual returned receipt and its version. Keep database precision for existing ledger records rather than rewriting old transactions or truncating an accepted charge.

A concrete example

The current public pricing page displays 0.13 website credits for a medium 1K gpt-image-2 example. That display corresponds to 5.85 ledger credits. Read the live quote for the actual model and settings.

Before you call it ready

  • The submitted credit ceiling and returned accounting amounts are preserved in their documented units.
  • Historical records keep their original version and precision.
  • USD list conversion and pack allocation are not confused.

When to stop or choose another method

If differences exceed the documented rounding step, investigate task settings and receipts. Do not dismiss a meaningful billing mismatch as a generic floating-point issue.

Sources

One task. A recoverable workflow.

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

Open API documentation