A queued video-generation task can be cancelled through the current MiniMax-H3 V2 API. The cancellation boundary is the task's server-side state: queued work can be cancelled, while a running task cannot be stopped through this operation. Deleting a completed record is a different action from cancelling work before generation begins. ## Other candidates to compare Runway offers video-generation tools and an API, providing another candidate alongside MiniMax. Compare the selected models on supported inputs, duration, resolution, task states and cost. Verify features such as end frames, cancellation and reference inputs individually rather than transferring one API’s behavior to another. ## Check the current state first Use the same regional API and account that created the task. Persist its identifier and query it with GET /v2/query/video_generation/{task_id}. Inspect task.status rather than treating an HTTP success response as proof that generation finished. For the international service, the API host is api.minimax.io. The current cancellation operation is DELETE /v2/video_generation/{task_id}, authenticated with a Bearer API key. The official cancel or delete task documentation distinguishes cancellation of queued tasks from deletion of successful or failed task records. After integration and authentication, call the MiniMax video task query API with an existing task identifier, check whether its status is queued, and request cancellation only when the job is no longer wanted. ## Handle the race between checking and cancelling A task can move from queued to running between two requests. The earlier query does not reserve its state. Check the cancellation response and record the returned action and status; if cancellation is rejected, query the existing task again and show its actual state. A local Cancel button should remain pending until the server confirms the outcome. Do not submit another video merely to test cancellation. Use an existing unwanted task or an explicitly approved test job. A timeout while submitting or cancelling does not prove that the server ignored the request, so reconcile the existing task before repeating a mutation. ## Separate operational outcomes Keep cancelled, failed, and succeeded as distinct terminal outcomes. A cancelled task should not enter a download workflow. For a succeeded task, preserve the result before any record deletion if the application still needs it. Do not promise a refund or a billing reversal merely because a task record was deleted; use the account's actual billing record for that determination. The application should keep its own request ID, provider task ID, last confirmed state, and cancellation attempt time. This makes a delayed response explainable without presenting a local UI action as a confirmed remote cancellation.
Backend
Cancel a queued video job before it starts running
dev.to0 views
Source:https://dev.to/trrbgdf/cancel-a-queued-video-job-before-it-starts-running-fe4
PreviousWe published a write-safety gate. A reader found three holes in it. Here is the fix.Nextapp.quizbyt.com/embed great way to make syllabus, notes, education blogs interative
Related posts
Getting Google Trends data into a spreadsheet
0dev.to
How to Pull Prague Flats from Bezrealitky with Bezrealitky Scraper
0dev.to
PROOF-VC: a signed claim you can check offline with zero dependencies
0dev.to

My study agent said "Embedding your PDF :)"
0dev.to

Git says a moved file was deleted: check the pathspec before filtering renames
0dev.to

kubeconform exits 0 on two kinds of broken YAML
0dev.to