curl --request PUT \
--url https://api.eachlabs.ai/v1/workflows/{workflowID}/versions/{versionID} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"version_id": "v2",
"definition": {
"version": "v2",
"steps": [
{
"step_id": "generate_text",
"type": "model",
"model": "openai-chatgpt-5",
"params": {
"system_prompt": "You are a helpful assistant",
"user_prompt": "{{inputs.prompt}}"
}
},
{
"step_id": "generate_image",
"type": "model",
"model": "flux-dev",
"params": {
"prompt": "{{generate_text.output}}",
"num_images": 2
},
"fallback": {
"enabled": true,
"model": "flux-1-1-pro",
"params": {
"prompt": "{{generate_text.output}}",
"guidance_scale": 7.5
}
}
}
],
"input_schema": {},
"metadata": {}
},
"output_mapping": {
"image": "$.generate_image.output"
},
"published": true,
"locked": true,
"production": true,
"allowed_to_share": true
}
'import requests
url = "https://api.eachlabs.ai/v1/workflows/{workflowID}/versions/{versionID}"
payload = {
"version_id": "v2",
"definition": {
"version": "v2",
"steps": [
{
"step_id": "generate_text",
"type": "model",
"model": "openai-chatgpt-5",
"params": {
"system_prompt": "You are a helpful assistant",
"user_prompt": "{{inputs.prompt}}"
}
},
{
"step_id": "generate_image",
"type": "model",
"model": "flux-dev",
"params": {
"prompt": "{{generate_text.output}}",
"num_images": 2
},
"fallback": {
"enabled": True,
"model": "flux-1-1-pro",
"params": {
"prompt": "{{generate_text.output}}",
"guidance_scale": 7.5
}
}
}
],
"input_schema": {},
"metadata": {}
},
"output_mapping": { "image": "$.generate_image.output" },
"published": True,
"locked": True,
"production": True,
"allowed_to_share": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
version_id: 'v2',
definition: {
version: 'v2',
steps: [
{
step_id: 'generate_text',
type: 'model',
model: 'openai-chatgpt-5',
params: {system_prompt: 'You are a helpful assistant', user_prompt: '{{inputs.prompt}}'}
},
{
step_id: 'generate_image',
type: 'model',
model: 'flux-dev',
params: {prompt: '{{generate_text.output}}', num_images: 2},
fallback: {
enabled: true,
model: 'flux-1-1-pro',
params: {prompt: '{{generate_text.output}}', guidance_scale: 7.5}
}
}
],
input_schema: {},
metadata: {}
},
output_mapping: {image: '$.generate_image.output'},
published: true,
locked: true,
production: true,
allowed_to_share: true
})
};
fetch('https://api.eachlabs.ai/v1/workflows/{workflowID}/versions/{versionID}', 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://api.eachlabs.ai/v1/workflows/{workflowID}/versions/{versionID}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'version_id' => 'v2',
'definition' => [
'version' => 'v2',
'steps' => [
[
'step_id' => 'generate_text',
'type' => 'model',
'model' => 'openai-chatgpt-5',
'params' => [
'system_prompt' => 'You are a helpful assistant',
'user_prompt' => '{{inputs.prompt}}'
]
],
[
'step_id' => 'generate_image',
'type' => 'model',
'model' => 'flux-dev',
'params' => [
'prompt' => '{{generate_text.output}}',
'num_images' => 2
],
'fallback' => [
'enabled' => true,
'model' => 'flux-1-1-pro',
'params' => [
'prompt' => '{{generate_text.output}}',
'guidance_scale' => 7.5
]
]
]
],
'input_schema' => [
],
'metadata' => [
]
],
'output_mapping' => [
'image' => '$.generate_image.output'
],
'published' => true,
'locked' => true,
'production' => true,
'allowed_to_share' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.eachlabs.ai/v1/workflows/{workflowID}/versions/{versionID}"
payload := strings.NewReader("{\n \"version_id\": \"v2\",\n \"definition\": {\n \"version\": \"v2\",\n \"steps\": [\n {\n \"step_id\": \"generate_text\",\n \"type\": \"model\",\n \"model\": \"openai-chatgpt-5\",\n \"params\": {\n \"system_prompt\": \"You are a helpful assistant\",\n \"user_prompt\": \"{{inputs.prompt}}\"\n }\n },\n {\n \"step_id\": \"generate_image\",\n \"type\": \"model\",\n \"model\": \"flux-dev\",\n \"params\": {\n \"prompt\": \"{{generate_text.output}}\",\n \"num_images\": 2\n },\n \"fallback\": {\n \"enabled\": true,\n \"model\": \"flux-1-1-pro\",\n \"params\": {\n \"prompt\": \"{{generate_text.output}}\",\n \"guidance_scale\": 7.5\n }\n }\n }\n ],\n \"input_schema\": {},\n \"metadata\": {}\n },\n \"output_mapping\": {\n \"image\": \"$.generate_image.output\"\n },\n \"published\": true,\n \"locked\": true,\n \"production\": true,\n \"allowed_to_share\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.eachlabs.ai/v1/workflows/{workflowID}/versions/{versionID}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"version_id\": \"v2\",\n \"definition\": {\n \"version\": \"v2\",\n \"steps\": [\n {\n \"step_id\": \"generate_text\",\n \"type\": \"model\",\n \"model\": \"openai-chatgpt-5\",\n \"params\": {\n \"system_prompt\": \"You are a helpful assistant\",\n \"user_prompt\": \"{{inputs.prompt}}\"\n }\n },\n {\n \"step_id\": \"generate_image\",\n \"type\": \"model\",\n \"model\": \"flux-dev\",\n \"params\": {\n \"prompt\": \"{{generate_text.output}}\",\n \"num_images\": 2\n },\n \"fallback\": {\n \"enabled\": true,\n \"model\": \"flux-1-1-pro\",\n \"params\": {\n \"prompt\": \"{{generate_text.output}}\",\n \"guidance_scale\": 7.5\n }\n }\n }\n ],\n \"input_schema\": {},\n \"metadata\": {}\n },\n \"output_mapping\": {\n \"image\": \"$.generate_image.output\"\n },\n \"published\": true,\n \"locked\": true,\n \"production\": true,\n \"allowed_to_share\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eachlabs.ai/v1/workflows/{workflowID}/versions/{versionID}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"version_id\": \"v2\",\n \"definition\": {\n \"version\": \"v2\",\n \"steps\": [\n {\n \"step_id\": \"generate_text\",\n \"type\": \"model\",\n \"model\": \"openai-chatgpt-5\",\n \"params\": {\n \"system_prompt\": \"You are a helpful assistant\",\n \"user_prompt\": \"{{inputs.prompt}}\"\n }\n },\n {\n \"step_id\": \"generate_image\",\n \"type\": \"model\",\n \"model\": \"flux-dev\",\n \"params\": {\n \"prompt\": \"{{generate_text.output}}\",\n \"num_images\": 2\n },\n \"fallback\": {\n \"enabled\": true,\n \"model\": \"flux-1-1-pro\",\n \"params\": {\n \"prompt\": \"{{generate_text.output}}\",\n \"guidance_scale\": 7.5\n }\n }\n }\n ],\n \"input_schema\": {},\n \"metadata\": {}\n },\n \"output_mapping\": {\n \"image\": \"$.generate_image.output\"\n },\n \"published\": true,\n \"locked\": true,\n \"production\": true,\n \"allowed_to_share\": true\n}"
response = http.request(request)
puts response.read_body{
"version_id": "v1",
"slug": "text-to-image-generator",
"published": false,
"locked": false,
"production": true,
"allowed_to_share": false,
"trigger_count": 15,
"created_at": "2025-12-01T10:00:00Z",
"updated_at": "2025-12-05T14:20:00Z",
"status": "active",
"visibility": "private",
"is_popular": false,
"updated_by": "[email protected]",
"definition": {},
"public_description": "Generates images from text prompts",
"public_thumbnail": "https://storage.googleapis.com/uploads/thumb.png",
"public_popular_sort_order": 1,
"public_example_output": "https://storage.googleapis.com/uploads/example.png"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Create or update workflow version
Create a new workflow version or update an existing one.
Patch semantics: omitted body fields keep their stored values. definition is required to create a new version; omit it (or send null) to keep the stored one.
This operation will:
- Create the version if it doesn’t exist, or patch the stored one
- Set this version as the latest version for the workflow
Important: Once a version is locked, it cannot be modified.
curl --request PUT \
--url https://api.eachlabs.ai/v1/workflows/{workflowID}/versions/{versionID} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"version_id": "v2",
"definition": {
"version": "v2",
"steps": [
{
"step_id": "generate_text",
"type": "model",
"model": "openai-chatgpt-5",
"params": {
"system_prompt": "You are a helpful assistant",
"user_prompt": "{{inputs.prompt}}"
}
},
{
"step_id": "generate_image",
"type": "model",
"model": "flux-dev",
"params": {
"prompt": "{{generate_text.output}}",
"num_images": 2
},
"fallback": {
"enabled": true,
"model": "flux-1-1-pro",
"params": {
"prompt": "{{generate_text.output}}",
"guidance_scale": 7.5
}
}
}
],
"input_schema": {},
"metadata": {}
},
"output_mapping": {
"image": "$.generate_image.output"
},
"published": true,
"locked": true,
"production": true,
"allowed_to_share": true
}
'import requests
url = "https://api.eachlabs.ai/v1/workflows/{workflowID}/versions/{versionID}"
payload = {
"version_id": "v2",
"definition": {
"version": "v2",
"steps": [
{
"step_id": "generate_text",
"type": "model",
"model": "openai-chatgpt-5",
"params": {
"system_prompt": "You are a helpful assistant",
"user_prompt": "{{inputs.prompt}}"
}
},
{
"step_id": "generate_image",
"type": "model",
"model": "flux-dev",
"params": {
"prompt": "{{generate_text.output}}",
"num_images": 2
},
"fallback": {
"enabled": True,
"model": "flux-1-1-pro",
"params": {
"prompt": "{{generate_text.output}}",
"guidance_scale": 7.5
}
}
}
],
"input_schema": {},
"metadata": {}
},
"output_mapping": { "image": "$.generate_image.output" },
"published": True,
"locked": True,
"production": True,
"allowed_to_share": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
version_id: 'v2',
definition: {
version: 'v2',
steps: [
{
step_id: 'generate_text',
type: 'model',
model: 'openai-chatgpt-5',
params: {system_prompt: 'You are a helpful assistant', user_prompt: '{{inputs.prompt}}'}
},
{
step_id: 'generate_image',
type: 'model',
model: 'flux-dev',
params: {prompt: '{{generate_text.output}}', num_images: 2},
fallback: {
enabled: true,
model: 'flux-1-1-pro',
params: {prompt: '{{generate_text.output}}', guidance_scale: 7.5}
}
}
],
input_schema: {},
metadata: {}
},
output_mapping: {image: '$.generate_image.output'},
published: true,
locked: true,
production: true,
allowed_to_share: true
})
};
fetch('https://api.eachlabs.ai/v1/workflows/{workflowID}/versions/{versionID}', 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://api.eachlabs.ai/v1/workflows/{workflowID}/versions/{versionID}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'version_id' => 'v2',
'definition' => [
'version' => 'v2',
'steps' => [
[
'step_id' => 'generate_text',
'type' => 'model',
'model' => 'openai-chatgpt-5',
'params' => [
'system_prompt' => 'You are a helpful assistant',
'user_prompt' => '{{inputs.prompt}}'
]
],
[
'step_id' => 'generate_image',
'type' => 'model',
'model' => 'flux-dev',
'params' => [
'prompt' => '{{generate_text.output}}',
'num_images' => 2
],
'fallback' => [
'enabled' => true,
'model' => 'flux-1-1-pro',
'params' => [
'prompt' => '{{generate_text.output}}',
'guidance_scale' => 7.5
]
]
]
],
'input_schema' => [
],
'metadata' => [
]
],
'output_mapping' => [
'image' => '$.generate_image.output'
],
'published' => true,
'locked' => true,
'production' => true,
'allowed_to_share' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.eachlabs.ai/v1/workflows/{workflowID}/versions/{versionID}"
payload := strings.NewReader("{\n \"version_id\": \"v2\",\n \"definition\": {\n \"version\": \"v2\",\n \"steps\": [\n {\n \"step_id\": \"generate_text\",\n \"type\": \"model\",\n \"model\": \"openai-chatgpt-5\",\n \"params\": {\n \"system_prompt\": \"You are a helpful assistant\",\n \"user_prompt\": \"{{inputs.prompt}}\"\n }\n },\n {\n \"step_id\": \"generate_image\",\n \"type\": \"model\",\n \"model\": \"flux-dev\",\n \"params\": {\n \"prompt\": \"{{generate_text.output}}\",\n \"num_images\": 2\n },\n \"fallback\": {\n \"enabled\": true,\n \"model\": \"flux-1-1-pro\",\n \"params\": {\n \"prompt\": \"{{generate_text.output}}\",\n \"guidance_scale\": 7.5\n }\n }\n }\n ],\n \"input_schema\": {},\n \"metadata\": {}\n },\n \"output_mapping\": {\n \"image\": \"$.generate_image.output\"\n },\n \"published\": true,\n \"locked\": true,\n \"production\": true,\n \"allowed_to_share\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.eachlabs.ai/v1/workflows/{workflowID}/versions/{versionID}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"version_id\": \"v2\",\n \"definition\": {\n \"version\": \"v2\",\n \"steps\": [\n {\n \"step_id\": \"generate_text\",\n \"type\": \"model\",\n \"model\": \"openai-chatgpt-5\",\n \"params\": {\n \"system_prompt\": \"You are a helpful assistant\",\n \"user_prompt\": \"{{inputs.prompt}}\"\n }\n },\n {\n \"step_id\": \"generate_image\",\n \"type\": \"model\",\n \"model\": \"flux-dev\",\n \"params\": {\n \"prompt\": \"{{generate_text.output}}\",\n \"num_images\": 2\n },\n \"fallback\": {\n \"enabled\": true,\n \"model\": \"flux-1-1-pro\",\n \"params\": {\n \"prompt\": \"{{generate_text.output}}\",\n \"guidance_scale\": 7.5\n }\n }\n }\n ],\n \"input_schema\": {},\n \"metadata\": {}\n },\n \"output_mapping\": {\n \"image\": \"$.generate_image.output\"\n },\n \"published\": true,\n \"locked\": true,\n \"production\": true,\n \"allowed_to_share\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eachlabs.ai/v1/workflows/{workflowID}/versions/{versionID}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"version_id\": \"v2\",\n \"definition\": {\n \"version\": \"v2\",\n \"steps\": [\n {\n \"step_id\": \"generate_text\",\n \"type\": \"model\",\n \"model\": \"openai-chatgpt-5\",\n \"params\": {\n \"system_prompt\": \"You are a helpful assistant\",\n \"user_prompt\": \"{{inputs.prompt}}\"\n }\n },\n {\n \"step_id\": \"generate_image\",\n \"type\": \"model\",\n \"model\": \"flux-dev\",\n \"params\": {\n \"prompt\": \"{{generate_text.output}}\",\n \"num_images\": 2\n },\n \"fallback\": {\n \"enabled\": true,\n \"model\": \"flux-1-1-pro\",\n \"params\": {\n \"prompt\": \"{{generate_text.output}}\",\n \"guidance_scale\": 7.5\n }\n }\n }\n ],\n \"input_schema\": {},\n \"metadata\": {}\n },\n \"output_mapping\": {\n \"image\": \"$.generate_image.output\"\n },\n \"published\": true,\n \"locked\": true,\n \"production\": true,\n \"allowed_to_share\": true\n}"
response = http.request(request)
puts response.read_body{
"version_id": "v1",
"slug": "text-to-image-generator",
"published": false,
"locked": false,
"production": true,
"allowed_to_share": false,
"trigger_count": 15,
"created_at": "2025-12-01T10:00:00Z",
"updated_at": "2025-12-05T14:20:00Z",
"status": "active",
"visibility": "private",
"is_popular": false,
"updated_by": "[email protected]",
"definition": {},
"public_description": "Generates images from text prompts",
"public_thumbnail": "https://storage.googleapis.com/uploads/thumb.png",
"public_popular_sort_order": 1,
"public_example_output": "https://storage.googleapis.com/uploads/example.png"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
API key passed as Authorization: Bearer <api_key>
Path Parameters
Unique workflow identifier
"wf_abc123"
Version identifier (e.g., "v1", "v2")
"v1"
Body
Optional; overrides the version in the path when present
"v2"
The complete workflow definition for this version. Required when creating a new version; omit (or send null) to keep the stored definition when updating.
Show child attributes
Show child attributes
Final output keys mapped to step output refs. Omit to leave unchanged, send {} to clear, send entries to replace the whole map.
Show child attributes
Show child attributes
{ "image": "$.generate_image.output" }
Publish state for this version. Omitted keeps the stored value.
Lock this version against further edits. Omitted keeps the stored value.
Mark as the production version. Omitted keeps the stored value.
Toggle unlisted sharing for this version.
true→ makes the version "unlisted" (accessible via link, hidden from public listings)false→ makes the version "private" (organization only)- No effect on public versions
- Omitted keeps the stored value (new versions default to private)
Response
Workflow version created or updated successfully
Summary information about a workflow version
Version identifier
"v1"
Workflow slug (inherited from parent workflow)
"text-to-image-generator"
Whether this version is published
false
Whether this version is locked from modifications
false
Whether this is a production version
true
True if version is unlisted (accessible via direct link but hidden from public listings).
false
Number of times this specific version has been triggered
15
RFC3339 timestamp when version was created
"2025-12-01T10:00:00Z"
RFC3339 timestamp when version was last updated
"2025-12-05T14:20:00Z"
Version lifecycle status
active, archived, deleted "active"
Version visibility
private, unlisted, public "private"
Whether the version is featured as popular in public listings
false
Identifier of the user who last updated the version
The complete workflow definition — steps, input schema, and metadata. Omitted from the response when the version has no stored definition.
Public listing description. Omitted when unset.
"Generates images from text prompts"
Public listing thumbnail URL. Omitted when unset.
"https://storage.googleapis.com/uploads/thumb.png"
Sort position within the popular public listing. Omitted when unset.
1
Public listing example output URL. Omitted when unset.
"https://storage.googleapis.com/uploads/example.png"