Submit And Conditionally Cancel
A 4-step recipe with fal. We can help you get access.
Recipe · 4 steps
Submit And Conditionally Cancel
with fal · Artificial Intelligence Management
Works with AI assistants
Submit a job and cancel it if it is still running, otherwise return its result.
- Submit the inference request and capture the request_id for later status and cancellation calls.
- Read the current status of the submitted request once to decide whether to cancel it or fetch its result.
- Cancel the in-queue or in-progress request to return its reserved GPU capacity to the pool.
- Retrieve the final inference output when the job had already completed by the time it was checked.
What you'll need to have ready
- modelOwner: Owning organization of the model (e.g. "fal-ai").
- modelName: Model identifier (e.g. "kling-2.5/text-to-video").
- input: Model-specific JSON input (prompt, image_url, seed, etc.).
For your developer
Arazzo workflow fal-ai:submit-and-cancel, 4 operations: submitRequest → getRequestStatus → cancelRequest → getRequestResult. Specs on APIs.io.