Workflow Runs
10 min
introduction a run represents a workflow run you can easily create new runs, cancel any active run and retrieve a run details from the /runs resource create a run to create a run make an authenticated post request to /runs body json payload parameter required type description workflow yes json a comfy api workflow json name no string optional workflow run name if none provided the run name will be set to the default name api run yyyy mm dd hh\ mm\ ss example request curl curl x post https //api floyo ai/runs \\ h "authorization bearer \<your api key>" \\ h "accept application/json" \ \ json '{ "name" "floyo api demo run", "workflow" { workflow api json } }' example responses status 200 workflow run requested successfully { "id" "run vtgqfqzfotmivzrp", "object" "run", "name" "floyo api demo run" } cancel a run to cancel an active run you must make an authenticated post request to /runs/\ runid/cancel a run can be cancelled only if its current status is either in queued or processing example request curl curl x post https //api floyo ai/runs/\<run id>/cancel \ h "authorization bearer \<your api key>" \ h "accept application/json"` example response status 200 run successfully cancelled { "id" "run c7d3esgnvhj1a6ts", "object" "run", "message" "run cancelled" } status 409 run was cancelled, has finished or failed { "id" "run c7d3esgnvhj1a6ts", "status" "cancelled", "object" "run", "error" "run is already finished", "message" "run was cancelled by the user" } status 404 run not found { "error" "run not found" } retrieve a run retrieve a run to get it's current status completed workflow runs will include flotime and partner (3rd party) api nodes usage information to retrieve a run make an authenticated get request to /runs/\ runid query parameters parameter required value default description example expand no outputs presigned url n/a expand a the run response by including, for each output, a time limited, pre signed url to the file /files/\<file id>?expand=outputs presigned url presigned url expires in no number 300 seconds (5 minutes) the presigned url expiration time in second between 30 and 604800 (1 week) the floyo api will return a validation error if expand=outpus presigned url is not specified /files/\<file id>?expand=outputs presigned url\&presigned url expires in=600 response attribute type description id string unique id of the run, e g run vtgqfqzfotmivzrp status string run status can be either queued , processing , cancelled , failed , done object run returned object type, always run name string name of the run flotime ms integer amount of flotime used by the run, in milliseconds requested at string iso8601 timestamp when the run was requested outputs array array of output files (see files docid 9dvdmpooxgp3thr hxh v ) example request curl curl x get https //api floyo ai/runs/\<run id>?expand=outputs presigned url \\ h "authorization bearer \<your api key>" \\ h "accept application/json" example response status 200 run is processing { "id" "run kxvbdqqlgece2xe6", "object" "run", "name" "your run name", "requested at" "2026 04 27t18 12 02 155+00 00", "status" "processing" } status 200 run finished successfully { "id" "run vtgqfqzfotmivzrp", "object" "run", "name" "floyo api demo run", "flotime ms" 6402, "requested at" "2026 04 26t13 55 03 334+00 00", "status" "done", "outputs" \[ { "id" "file ns8kprtb8ljjataa", "file name" "comfyui 00994 png", "size bytes" 350983, "mime type" "image/png", "created at" "2026 04 21t13 55 32 431054+00 00", "input path" "(as input)#outputs/comfyui 00994 png" } ] } status 200 run finished successfully with expanded outputs presigned urls { "id" "run vtgqfqzfotmivzrp", "object" "run", "name" "floyo api demo run", "flotime ms" 6402, "requested at" "2026 04 26t13 55 03 334+00 00", "status" "done", "outputs" \[ { "id" "file ns8kprtb8ljjataa", "file name" "comfyui 00994 png", "size bytes" 350983, "mime type" "image/png", "created at" "2026 04 21t13 55 32 431054+00 00", "input path" "(as input)#outputs/comfyui 00994 png", "presigned url" "https //cdn floyo ai/file ns8kprtb8ljjataa?token=eyjhbgcioijiuzi1niisinr5cci6ikpxvcisimtpzci6inyxin0 eyjmawxlx2lkijoizmlszv9ouzhlufj0yjhmsmphdefbiiwiywtfawqioijqnxjncmnuncisimp0asi6imrhmzgzmtq1ltu3mtutnddjyy1iztc3lwu4zmqyotczodu0nyisimlzcyi6imzsb3lvlwfwasisimf1zci6imzsb3lvlwnkbiisinn1yii6imzpbgvfywnjzxnziiwiawf0ijoxnzc3mzewotg4lcjuymyioje3nzczmta5odgsimv4cci6mtc3nzm3mdk4oh0 6ixooiulm tbuvj5tcy6w eawhovrpvii4 5wshuism" } ] }
