Skip to content

Why did a job fail for balance after a quote said I had enough credits?

A quote reports a point-in-time estimate and balance; it does not reserve funds. Another studio or API task can spend from the same wallet before your creation request is accepted. Handle a later 402 without treating the quote as a payment guarantee, and preserve the user's intended task instead of repeatedly resubmitting it.

UNDERSTAND API CREDITS AND COSTSAISwapLab team · Editorial methodUpdated 2 min read
Open API documentationExplore 67 Image SkillsPrivate keys · Explicit credit approval
Article workflow: Keep quote and submission times; Inspect current usage; Offer a clear next step.
Workflow diagram: Keep quote and submission times → Inspect current usage → Offer a clear next step. Read the article for evidence and limits.

Preflight reduces surprises but is not a lock

This matters when multiple users, workers or keys operate through one account. Per-key caps restrict permission but do not allocate separate funded pools. An application-side queue and budget ledger can reduce overcommitment, yet the service's creation-time checks remain authoritative for actual acceptance.

What to do next

  1. 01

    Keep quote and submission times

    Record when approval occurred and when creation was attempted. This helps distinguish changed settings from another task's concurrent spending without exposing private user content.

  2. 02

    Inspect current usage

    Read the shared balance and known accepted tasks. Do not attribute every difference to the failed request, especially when text reservations may later settle or other jobs are active.

  3. 03

    Offer a clear next step

    Keep the draft and explain the actual funding restriction. If purchasing is unavailable, do not route the user to an unofficial payment or silently enlarge other spending controls.

A concrete example

Illustrative race: two workers each quote a task that fits the same remaining balance. The first is accepted; the second is rejected because its quote never held credits. The second task remains pending locally rather than spawning repeated attempts.

Before you call it ready

  • A quote is labeled point-in-time.
  • Shared-wallet activity is considered.
  • Rejected work is not called an accepted generation.

When to stop or choose another method

If your product needs guaranteed per-user budgets, implement deliberate internal allocation and admission controls. Do not present independent API keys as isolated funded accounts.

Sources

One task. A recoverable workflow.

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

Open API documentation