Validate a Workflow JSON definition without executing it.
Use this tool to check whether a workflow definition is syntactically
and semantically correct before saving or running it. The definition
should follow the standard Workflow format with version, inputs,
steps, and outputs.
IMPORTANT: Always validate a workflow definition before running it.
Example workflow definition — detects objects, enlarges bounding
boxes, crops, runs a second detection filtering for dogs, and
classifies the breed only when exactly one dog is found:
.. code-block:: json
{
"version": "1.0",
"inputs": [
{"type": "WorkflowImage", "name": "image"}
],
"steps": [
{
"type": "ObjectDetectionModel",
"name": "first_detection",
"image": "$inputs.image",
"model_id": "yolov8n-640"
},
{
"type": "DetectionsTransformation",
"name": "enlarging_boxes",
"predictions": "$steps.first_detection.predictions",
"operations": [
{"type": "DetectionsOffset", "offset_x": 50, "offset_y": 50}
]
},
{
"type": "Crop",
"name": "first_crop",
"image": "$inputs.image",
"predictions": "$steps.enlarging_boxes.predictions"
},
{
"type": "ObjectDetectionModel",
"name": "second_detection",
"image": "$steps.first_crop.crops",
"model_id": "yolov8n-640",
"class_filter": ["dog"]
},
{
"type": "ContinueIf",
"name": "continue_if",
"condition_statement": {
"type": "StatementGroup",
"statements": [
{
"type": "BinaryStatement",
"left_operand": {
"type": "DynamicOperand",
"operand_name": "prediction",
"operations": [{"type": "SequenceLength"}]
},
"comparator": {"type": "(Number) =="},
"right_operand": {
"type": "StaticOperand",
"value": 1
}
}
]
},
"evaluation_parameters": {
"prediction": "$steps.second_detection.predictions"
},
"next_steps": ["$steps.classification"]
},
{
"type": "ClassificationModel",
"name": "classification",
"image": "$steps.first_crop.crops",
"model_id": "dog-breed-xpaq6/1"
}
],
"outputs": [
{
"type": "JsonField",
"name": "dog_classification",
"selector": "$steps.classification.predictions"
}
]
}
Key patterns shown above:
- ``$inputs.<name>`` references a workflow input.
- ``$steps.<step_name>.<output>`` references another step's output.
- ``ContinueIf`` enables conditional branching based on runtime
values.
- Steps can chain: detect → transform → crop → detect → classify.
Returns validation status. A valid workflow returns
``{"status": "ok"}``. An invalid one returns error details.