Preview regenerate too early: 409 avatar_video_preview_busy, no charge
Calling regenerate on an avatar video preview that is still queued or processing returns 409 avatar_video_preview_busy and refunds the reservation. What to do.
The scenario
You create a preview with POST /v1/avatar-video-previews and the first frame looks wrong. You call POST /v1/avatar-video-previews/:id/regenerate straight away, but the first preview job has not finished. The API answers 409 with code avatar_video_preview_busy.
What the response and the books look like
The message reads: Avatar video preview is still generating. Wait for it to finish before regenerating. The body gives the avatar_video_preview_id, a request_id for the failed regenerate job and a status_url. The next-action hint is to poll status.
The regenerate job is marked failed. When the call was not an idempotency replay, the code refunds the usage reservation with reason avatar_video_preview_busy, so a rejected early click does not cost you.
Fix: wait on the first job, then regenerate
Poll the job behind the preview until it is completed, then call regenerate. Use a new Idempotency-Key for the regenerate call.
curl https://api.sume.com/v1/jobs/$PREVIEW_JOB_ID/status \
-H "Authorization: Bearer $SUME_API_KEY"Related states
- Preview stills do not depend on the quality tier, so regenerating a still is the cheap way to fix a bad first frame before the paid video.
- Generating the final video before the preview completes is a different 409, avatar_video_preview_not_ready.
- Poll with backoff and stop on completed, failed or canceled.
Sources
Related posts
More in Developers
- product_image 400: must be a fetchable public image URL
Sume avatar video rejects a product_image or scene image that is not a direct public image. What the 400 says, and why share links and HTML pages fail.
- Avatar Video Scene Durations: Fields Must Agree and the 2.8 Rule
How Sume sets a text scene's length: ceil(words / 2.8), the 0.001-second agreement rule across duration fields, and worked examples of 14 and 15 words.
- Avatar voice not ready: 409 avatar_not_ready, voice_not_ready
A video request can fail with 409 avatar_not_ready because the avatar's voice is not ready. How this differs from a plain not-ready avatar, and the retry hint.
- Pick the best of 4 AI image takes automatically with Pillow
Request n=4 from one Sume image call, score each take by edge contrast with Pillow ImageStat, keep the winner, and see what the four takes cost.
Written by Sume