Build your integration
Markdown ↗

Balance & pricing

Estimate a request, understand its cost and check your balance.

API generations use your existing Fusara balance and the same model pricing as the workspace. All public cost amounts are decimal strings in common_fuz, the Fuz unit used by Fusara.

Estimate before you generate

Send the same model and settings you intend to generate with:

curl 'https://fusara.ai/api/v3/run/estimate' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "model": "qwen-image21-create",
  "prompt": "A white ceramic lamp on a pale lavender background, soft studio light."
}'

An example response:

json
{
  "cost": {
    "unit": "common_fuz",
    "expected": "40.0000"
  }
}

This amount is illustrative; use the live response for your settings. The estimate does not create a run or reserve generation balance. It evaluates the same model defaults and price inputs as generation, including quality presets, version, resolution, count and duration where supported.

You can estimate from settings before filling in a required prompt or source input. If pricing depends on source media, supply that media for an accurate estimate. An estimate that imports URL media can create a temporary media record even though it does not start generation.

Settings-only estimates are available without an API key. Estimates using account-owned media or private resources require authentication. There is no quote ID or price-confirmation field to copy into the subsequent run request.

Check your balance

curl 'https://fusara.ai/api/v3/balance' \
  -H "Authorization: Bearer $FUSARA_API_KEY"
json
{
  "unit": "common_fuz",
  "balance": "1200.0000",
  "reserved": "160.0000",
  "available": "1040.0000"
}
Field Meaning
balance Current balance before subtracting active reservations.
reserved Amount reserved for work already accepted.
available Balance available after reservations: balance - reserved.

Use available when displaying spendable balance. Preserve the returned value, even if it is negative. Another request can spend or reserve balance between your balance check and a new submission; a check does not guarantee admission.

Amounts are strings to preserve decimal precision. Use decimal arithmetic or an appropriate fixed-point representation for accounting, rather than floating-point equality comparisons.

Understand the final charge

An accepted run includes:

Example response
{
  "id": 123456,
  "status": "succeeded",
  "cost": {
    "unit": "common_fuz",
    "expected": "40.0000",
    "status": "pending"
  },
  "outputs": [
    {
      "type": "image",
      "media_id": 901,
      "url": "https://media.example/result.png",
      "url_expires_at": "2026-10-25T12:00:00Z"
    }
  ]
}

expected is the estimate captured for that accepted run. status: "pending" means the final charge is not settled; missing charged does not mean zero.

Once settled, the cost contains status: "settled" and charged, including an explicit "0.0000" when nothing was charged. A completed generation can temporarily have pending billing. Treat the generation's status and cost.status independently.

Read the returned charge rather than deriving it solely from success or failure: partial results and settlement can affect the final amount. A successful pre-execution cancellation settles at zero.

If you supplied a webhook, a later settlement can send an updated run to the same endpoint. See billing updates and duplicates. You do not need to poll for a result already delivered by webhook.

Avoid accidental duplicate charges

Use one idempotency key per intended generation when your application retries submissions. Replaying the original accepted request retrieves the existing run and its captured cost; it does not create another generation or reprice that run.

If a submission returns 402 insufficient_balance, add funds in Fusara before trying again. If an API request times out, follow recovery guidance before submitting another run.