curl --request POST \
--url https://your-deployment-api-url.pod.flowscale.ai/api/v1/runs \
--header 'Content-Type: multipart/form-data' \
--header 'X-API-KEY: <api-key>' \
--form custom_field_1=your_value_here \
--form custom_field_2=7.5 \
--form custom_field_3=20 \
--form custom_file_upload='@example-file' \
--form additionalProperties.4='@example-file'import requests
url = "https://your-deployment-api-url.pod.flowscale.ai/api/v1/runs"
files = {
"custom_file_upload": ("example-file", open("example-file", "rb")),
"additionalProperties.4": ("example-file", open("example-file", "rb"))
}
payload = {
"custom_field_1": "your_value_here",
"custom_field_2": "7.5",
"custom_field_3": "20"
}
headers = {"X-API-KEY": "<api-key>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('custom_field_1', 'your_value_here');
form.append('custom_field_2', '7.5');
form.append('custom_field_3', '20');
form.append('custom_file_upload', '<string>');
form.append('additionalProperties.4', '{
"fileName": "example-file"
}');
const options = {method: 'POST', headers: {'X-API-KEY': '<api-key>'}};
options.body = form;
fetch('https://your-deployment-api-url.pod.flowscale.ai/api/v1/runs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://your-deployment-api-url.pod.flowscale.ai/api/v1/runs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"custom_field_1\"\r\n\r\nyour_value_here\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"custom_field_2\"\r\n\r\n7.5\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"custom_field_3\"\r\n\r\n20\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"custom_file_upload\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"additionalProperties.4\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://your-deployment-api-url.pod.flowscale.ai/api/v1/runs"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"custom_field_1\"\r\n\r\nyour_value_here\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"custom_field_2\"\r\n\r\n7.5\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"custom_field_3\"\r\n\r\n20\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"custom_file_upload\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"additionalProperties.4\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://your-deployment-api-url.pod.flowscale.ai/api/v1/runs")
.header("X-API-KEY", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"custom_field_1\"\r\n\r\nyour_value_here\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"custom_field_2\"\r\n\r\n7.5\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"custom_field_3\"\r\n\r\n20\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"custom_file_upload\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"additionalProperties.4\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-deployment-api-url.pod.flowscale.ai/api/v1/runs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"custom_field_1\"\r\n\r\nyour_value_here\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"custom_field_2\"\r\n\r\n7.5\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"custom_field_3\"\r\n\r\n20\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"custom_file_upload\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"additionalProperties.4\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"status": "<string>",
"data": [
{
"run_id": "<string>",
"workflow_id": "<string>"
}
],
"errors": "<string>",
"meta": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Execute Workflow
Executes a specified workflow by processing dynamic form data with field names and types determined by the deployed ComfyUI workflow. Each workflow defines its own unique input parameters based on the nodes it contains.
Important: The exact parameter names and types vary for each workflow_id and deployment URL. To discover the required parameters for your workflow:
- Check your workflow’s API Deployment Dashboard
- Refer to your ComfyUI workflow’s input nodes
The workflow is executed on an available ComfyUI instance within the cluster based on queue size limits.
curl --request POST \
--url https://your-deployment-api-url.pod.flowscale.ai/api/v1/runs \
--header 'Content-Type: multipart/form-data' \
--header 'X-API-KEY: <api-key>' \
--form custom_field_1=your_value_here \
--form custom_field_2=7.5 \
--form custom_field_3=20 \
--form custom_file_upload='@example-file' \
--form additionalProperties.4='@example-file'import requests
url = "https://your-deployment-api-url.pod.flowscale.ai/api/v1/runs"
files = {
"custom_file_upload": ("example-file", open("example-file", "rb")),
"additionalProperties.4": ("example-file", open("example-file", "rb"))
}
payload = {
"custom_field_1": "your_value_here",
"custom_field_2": "7.5",
"custom_field_3": "20"
}
headers = {"X-API-KEY": "<api-key>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('custom_field_1', 'your_value_here');
form.append('custom_field_2', '7.5');
form.append('custom_field_3', '20');
form.append('custom_file_upload', '<string>');
form.append('additionalProperties.4', '{
"fileName": "example-file"
}');
const options = {method: 'POST', headers: {'X-API-KEY': '<api-key>'}};
options.body = form;
fetch('https://your-deployment-api-url.pod.flowscale.ai/api/v1/runs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://your-deployment-api-url.pod.flowscale.ai/api/v1/runs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"custom_field_1\"\r\n\r\nyour_value_here\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"custom_field_2\"\r\n\r\n7.5\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"custom_field_3\"\r\n\r\n20\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"custom_file_upload\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"additionalProperties.4\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://your-deployment-api-url.pod.flowscale.ai/api/v1/runs"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"custom_field_1\"\r\n\r\nyour_value_here\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"custom_field_2\"\r\n\r\n7.5\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"custom_field_3\"\r\n\r\n20\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"custom_file_upload\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"additionalProperties.4\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://your-deployment-api-url.pod.flowscale.ai/api/v1/runs")
.header("X-API-KEY", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"custom_field_1\"\r\n\r\nyour_value_here\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"custom_field_2\"\r\n\r\n7.5\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"custom_field_3\"\r\n\r\n20\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"custom_file_upload\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"additionalProperties.4\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-deployment-api-url.pod.flowscale.ai/api/v1/runs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"custom_field_1\"\r\n\r\nyour_value_here\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"custom_field_2\"\r\n\r\n7.5\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"custom_field_3\"\r\n\r\n20\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"custom_file_upload\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"additionalProperties.4\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"status": "<string>",
"data": [
{
"run_id": "<string>",
"workflow_id": "<string>"
}
],
"errors": "<string>",
"meta": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Body
⚠️ IMPORTANT: The field names shown below are placeholders. You must replace them with the actual parameter names required by your specific workflow.
To find your workflow's parameter names:
- API Docs: Check your deployment's auto-generated API Deployment Dashboard
- ComfyUI Workflow: Look at the input nodes in your workflow
Note: Different workflows have completely different parameter names and types.
Replace 'custom_field_1' with your actual parameter name. Example: 'prompt', 'style', 'model_name'
"your_value_here"
Replace 'custom_field_2' with your numeric parameter name. Example: 'strength', 'cfg_scale', 'temperature'
7.5
Replace 'custom_field_3' with your integer parameter name. Example: 'steps', 'seed', 'width', 'height'
20
Replace 'custom_file_upload' with your file parameter name. Example: 'input_image', 'reference_image', 'mask'