Skip to content

What progress indicator can my app show when the API has no completion percentage?

Show the latest documented stage and an indeterminate activity indicator when no measured percentage is available. AISwapLab jobs expose named states, not a documented percent-complete field. Your application can explain waiting and saving, but should not turn elapsed time into a claimed generation percentage.

DESIGN A CLEAR API PRODUCT EXPERIENCEAISwapLab team · Editorial methodPublished 2 min read
Open API documentationExplore 67 Image SkillsPrivate keys · Explicit credit approval
Article workflow: Map only observed stages; Separate time from completion; Keep recovery actions clear.
Workflow diagram: Map only observed stages → Separate time from completion → Keep recovery actions clear. Read the article for evidence and limits.

A stage is useful evidence

Users need to know whether their action was accepted and whether they can leave the page. An invented progress bar that stalls at 99 percent creates an expectation the API cannot substantiate. A stage label plus a durable task link is more informative.

What to do next

  1. 01

    Map only observed stages

    Use queued, submitting, running, unknown, saving, completed and failed as inputs to your display mapping. Keep unknown explicitly uncertain and avoid ordering it as a fixed numerical step toward completion.

  2. 02

    Separate time from completion

    You may display elapsed time since submission, labeled as elapsed time. Do not convert it into a percentage or promised remaining duration unless your own measured estimator has an honest uncertainty range and appropriate scope.

  3. 03

    Keep recovery actions clear

    Offer a task link or return-later instruction while active work continues. Enable the result action after confirmed completion, and avoid labeling a page-close control as cancellation of the remote generation.

A concrete example

Illustrative example: a task changes from running to saving. The UI says Saving result privately and continues an indeterminate indicator. It does not claim 95 percent, and the download button appears only when content is available.

Before you call it ready

  • No percentage appears without a measurement.
  • Unknown has distinct explanatory copy.
  • Elapsed time never becomes a completion promise.

When to stop or choose another method

Stop showing a deterministic countdown when the contract supplies no completion estimate; retain the observed stage and last-check time.

Sources

One task. A recoverable workflow.

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

Open API documentation