@dominic60183
Dominik LubańskiDeveloper▲5
Full Stack & AI Developer, AIvanta
47m ago · Audio & video · Warsaw

One failed video render shouldn't cost your customer twice.

Here's an edge case worth testing in any AI video SaaS.
A customer starts a video generation job. The provider accepts it, but your API request times out before returning the job ID.

The frontend shows an error. The customer clicks Generate again.
Now you've potentially got two renders running and two charges for the same video.

I'd handle this with a persistent render job ID and an idempotency key created before calling the provider.

The backend should track queued -> processing -> completed/failed, reconcile provider callbacks, and only finalize usage charges against a known job state.

Retries should resume or reconcile the original operation, not automatically start another expensive render.
And if the provider doesn't support idempotency, that's a reconciliation problem you need to design around, not something a retry loop can magically fix.

AI video products live or die on reliability just as much as generation quality.

How are you handling uncertain provider responses and billing reconciliation?

Comments

No comments yet
Start the conversation.
Log in to join the thread.