Skip to content

Does a successful API response mean my image or video is finished?

No. Read both the HTTP response and the returned object. A 202 can identify durable accepted or uncertain work that still needs observation. A 200 can be an idempotent replay of an unfinished job, while confirmed non-streaming chat can return a completion. For media, wait for completed and a content_url, retrieve the private file and then review its actual quality.

START WITH THE APIAISwapLab team · Editorial methodUpdated 3 min read
Open API documentationExplore 67 Image SkillsPrivate keys · Explicit credit approval
Article workflow: Parse and retain the durable response; Follow the existing lifecycle; Validate delivery and user acceptance.
Workflow diagram: Parse and retain the durable response → Follow the existing lifecycle → Validate delivery and user acceptance. Read the article for evidence and limits.

Represent acceptance, processing, delivery and approval as different milestones

A generic green badge for any 2xx response hides important states. The job schema includes queued, submitting, running, unknown, saving, completed and failed. Unknown is an unconfirmed outcome, not an instruction to create replacement work. Saving is delivery preparation, not proof that the user's file is ready. Even completed establishes technical result handling rather than likeness, accurate text or stable motion. Keep those distinctions in your application and its support record.

What to do next

  1. 01

    Parse and retain the durable response

    Record the returned object kind, job ID and poll_url where provided, associated with the approved application task. A response code alone is not enough to choose the UI. Preserve an uncertain chat job too; do not display it as a confirmed blank answer or discard it because no completion text arrived immediately.

  2. 02

    Follow the existing lifecycle

    Observe the documented job route on a bounded schedule and keep errors separate from the last confirmed state. Retain unknown outcomes for reconciliation; follow the documented support route when no provider outcome can be established. Do not create a new idempotency key because a task has not reached completed yet.

  3. 03

    Validate delivery and user acceptance

    When media is completed and a content route exists, retrieve it with the required authentication and validate the expected artifact. Then let the user inspect the actual still or entire clip. For a confirmed text completion, review returned content and usage without inferring unsupported browsing, tool use or factual correctness.

A concrete example

Illustrative replay: a lost creation response leads the client to recover with the same request identity. It receives HTTP 200 and the original job with status=running. The correct display remains processing, not finished. Later completed provides a content route, whose downloaded video still requires identity and motion review. A different 200 response containing a confirmed chat completion follows the text-review path instead of being forced into a media-job parser.

Observed state and next action

ObservationWhat to do
202 job or 200 job replaySave ID; read actual job state
running / savingObserve existing work
unknownPreserve uncertainty; reconcile outcome
completed + content_urlPrivately download and review
200 confirmed chat completionReview text and measured usage

Before you call it ready

  • HTTP code, object kind and job state are stored separately.
  • Unknown work keeps its original identity.
  • File availability and creative or factual acceptance are verified after technical completion.

When to stop or choose another method

Stop labeling all successful HTTP responses finished. If the client cannot represent an unfinished or uncertain job, repair that lifecycle handling before enabling paid creation for users.

Sources

One task. A recoverable workflow.

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

Open API documentation