Get started
Idempotency
Was this page helpful?
Retry a timed-out generation request without starting or charging for a duplicate job.
Idempotency-Key header
Send a unique value of 1–128 characters with every POST /api/v1/generate-media request. Use an order ID or another stable business identifier.
Safe retry
If a connection times out, resend the exact body with the same key. The API returns the original job instead of starting another one.
curl -X POST "https://reviral.ai/api/v1/generate-media" \
-H "Authorization: Bearer $REVIRAL_API_KEY" \
-H "Idempotency-Key: first-video" \
-H "Content-Type: application/json" \
--data '{"model":"seedance-2","prompt":"A slow camera move across a quiet lake at sunrise","durationSec":5,"resolution":"720p","aspectRatio":"16:9","maxCredits":106}'Conflict behavior
Reusing a key with a different request body returns HTTP 409 idempotency_key_reuse. Generate a new key only when the intended request is genuinely different.