Skip to content

The generation completed but my download failed. Should I generate again?

Retry the authenticated download of the existing completed job before considering a new generation. A network interruption while retrieving /jobs/{id}/content does not mean the model failed or the result needs to be recreated. Preserve the job ID, inspect the response status and resume or repeat delivery without sending another creation POST.

RECOVER AND DELIVER API JOBSAISwapLab team · Editorial methodUpdated 2 min read
Open API documentationExplore 67 Image SkillsPrivate keys · Explicit credit approval
Article workflow: Confirm the existing state; Validate the download response; Recover transfer deliberately.
Workflow diagram: Confirm the existing state → Validate the download response → Recover transfer deliberately. Read the article for evidence and limits.

Generation and delivery have different retry costs

The same stored output can be retrieved when the request is authorized and the completed job still exposes its content route. Your application should track remote completion separately from local file persistence. A failed disk write, interrupted connection or HTML error saved as MP4 belongs to delivery investigation, not automatically another paid creative attempt. Do not import another provider's link-expiry or retention duration into this route; use the actual AISwapLab response and contract.

What to do next

  1. 01

    Confirm the existing state

    Poll the known job and check completed plus content_url. If the state is still saving or unknown, resolve that state before treating the problem as a finished-file transfer.

  2. 02

    Validate the download response

    Check HTTP status, Content-Type and non-empty bytes. Use a temporary local filename, then finalize it only after a complete validated transfer.

  3. 03

    Recover transfer deliberately

    Repeat the GET or use a supported byte range when appropriate. Keep retry count bounded and preserve the same job record so the UI does not create an accidental replacement task.

A concrete example

Illustrative failure: a 4K image finishes, but the customer's laptop loses Wi-Fi halfway through saving. The backend redownloads that job's content and verifies the file; it does not request a second 4K image.

Retry the existing artifact

Observed delivery problemSame-job recoveryStop condition
Interrupted network or local disk writeRetrieve the existing owned completed content into a staging fileRetry budget exhausted or repeated storage fault
401/403 or unexpected contentInvestigate credential/permission and response typeDo not accept an error body as media
Completed status but result unavailablePreserve job and safe response for supportDo not mask the missing artifact with a new generation

Before you call it ready

  • The original job remains the source of truth.
  • Only delivery is retried.
  • Error bodies are not accepted as media files.

When to stop or choose another method

If the stored result is unavailable despite completed status, report the existing job and safe error. Repeated generation can conceal the delivery fault while adding unnecessary charges.

Sources

One task. A recoverable workflow.

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

Open API documentation