Skip to content

How often should I poll an image or video generation job?

Poll existing jobs at a moderate, bounded interval rather than every animation frame. AISwapLab limits authenticated requests to 30 per minute per key, and catalog, usage and download requests share that authentication path. A ten-second interval is a reasonable example starting point for a small integration, not a promised completion time or universal optimum.

RECOVER AND DELIVER API JOBSAISwapLab team · Editorial methodUpdated 2 min read
Open API documentationExplore 67 Image SkillsPrivate keys · Explicit credit approval
Article workflow: Use the returned route; Stop unnecessary checks; Back off on limits.
Workflow diagram: Use the returned route → Stop unnecessary checks → Back off on limits. Read the article for evidence and limits.

Budget polling across all active tasks

Two jobs polled once per second can exhaust the key's allowance before your app makes other useful requests. Repeated polling does not accelerate generation. The status route can advance an existing task's reconciliation, but it does not submit a new generation. Keep one backend poller per job and distribute safe state to clients. Compute a request budget across all workers sharing the key; a ten-second example for two jobs is twelve polls per minute, not a claim that the result completes within ten seconds.

What to do next

  1. 01

    Use the returned route

    Persist poll_url with the job ID and request it through your authenticated backend. Avoid constructing a new generation POST as a substitute for asking about the existing job.

  2. 02

    Stop unnecessary checks

    End normal polling at completed or failed. For unknown, keep the task visible and use a cautious recovery path instead of treating it as a completed failure to retry automatically.

  3. 03

    Back off on limits

    Respect Retry-After when a 429 response is received. Coordinate other workers sharing the key so they do not immediately consume the next request window together.

A concrete example

Illustrative schedule: one worker polls two jobs every ten seconds and caches their safe statuses for the browser. Several open tabs read that cache instead of each running another independent poller against AISwapLab.

Illustrative request-budget check

WorkloadPoll requests per minuteOther considerations
Two jobs, each every ten seconds12Leaves room within the current per-key limit for other authenticated work
Two jobs, each every second120Already exceeds the documented 30/minute/key path
Several tabs viewing one jobUse one backend poller and cached safe stateTabs should not multiply upstream polling

Before you call it ready

  • Polling has an explicit interval and end condition.
  • All requests sharing the key are considered.
  • A 429 does not cause another generation.

When to stop or choose another method

If the polling budget is exhausted, reduce redundant checks and wait. Creating more credentials solely to evade a service limit is not a sound recovery strategy.

Sources

One task. A recoverable workflow.

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

Open API documentation