Retrying an avatar create: same Idempotency-Key, one $0.95 charge
If an avatar create call times out, retry with the same Idempotency-Key. Sume returns the original job and does not bill a second $0.95 creation.
When an avatar create request times out or drops, retry the submit with the same Idempotency-Key and the same body. Sume's Jobs and results page says the retry returns the original job and does not bill a second one. Avatar creation is a flat $0.95 per avatar, so a blind retry with a fresh key could create and charge for a second avatar.
The rule from the docs
The docs tell you not to submit a new paid job for the same intent once you have a job id, and to continue with GET status_url. Retrying the submit itself is the one safe repeat, and it requires the same key.
- Same key, same body: the original job comes back.
- New key for the same intent: treat it as a new job.
- Same key, different body: refused; see the 409 post.
A key scheme that survives restarts
Build the key from your own data, for example avatar-<brand>-<handle>-v1, and store it before the call. If your worker restarts after the call left but before the reply arrived, it can resend the identical request and get the same job back.
Then poll
Read status_url from the response, poll until completed, then fetch the result for the avatar handle. See Create new avatar for the request shapes and the compatibility aliases.
Sources
Related posts
More in Developers
- Check balance before bulk transcription: 402 and admission preview
A 402 insufficient_credits arrives before any provider work. Read GET /v1/balance and POST /v1/generation/admission-preview first and size the run.
- Batch of 100 image covers on Sume: waves by plan, from Free to Scale
A 100-image batch fits one wave on Scale (120 accepted) but needs 5 waves on Pro (24 accepted). Capacity by plan, wave_size_hint and the 429 queue_full rule.
- Port a Bedrock image call to Sume /v1/images in Python
Moving from boto3 invoke_model for Nova Canvas or Titan to Sume's REST call: the request mapping, the response shape, the status codes, and the swap code.
- Build a Sume Idempotency-Key from an order id: changed body result
The same key and body replays the original Sume job. A different body with the same key is a 409. Pick keys that make both outcomes safe, in runnable Python.
Written by Sume