invalid_order_status — order status does not allow this
What happened
No chunks were queued. Bulk retry POST /orders/{order}/items/retry-failed returned 422 {"success": false, "message": "…", "reason": "invalid_order_status"}. Cancelling an order (POST /orders/{order}/cancel) and retrying an order (POST /orders/{order}/retry) return the same reason with code 400.
Why
Bulk retry accepts an order only in the partially_completed status. completed and result_delivered have nothing to retry. failed, cancelled, and compensated have no held amount left. Orders in created, pending, and in_progress are still running and have no result yet. Cancellation accepts orders in created, pending, and partially_completed. Order retry accepts completed and result_delivered.
What to do right now
Check the order status before the call. Other bulk retry refusals differ by reason. 409 stitch_in_progress means the order is being stitched: wait and retry. 422 generative_not_supported means the task has no chunk retry, as with sfx and music. 422 nothing_to_retry means there are no failed chunks.
Which request to send next
GET /orders/{order} returns the current status. If the order is already completed but you are not happy with the result, use POST /orders/{order}/retry. It creates a new order with the same parameters and is billed again.
Where to go next
This page for AI
API version 1.0.0