Skip to content

How do I prevent two editors approving the same paid video API job at the same time?

Create one durable approval record for the intended output and give all workers the same request identifier. A browser button lock only protects that browser tab.

SHIP A RELIABLE INTEGRATIONAISwapLab team · Editorial methodPublished 2 min read
Open API documentationExplore 67 Image SkillsPrivate keys · Explicit credit approval

Preserve the approved payload

Save model, source IDs, settings and the approved ceiling in the record. Claim the record with an atomic update before any worker submits it.

Reuse the original key for the same attempt

After a timeout or a worker restart, recover by the documented idempotent replay with the exact same request. A different file or requested output deserves a separate approval.

Test in your own queue

Run a simulated double click and a worker crash after send. Inspect whether both paths resolve to one provider job ID.

Pass condition

Two simultaneous approvers can create only one durable attempt for the same approved output.

Sources

One task. A recoverable workflow.

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

Open API documentation