Skip to content

Generative Workflow Templates Endpoints

Generative Workflow Templates API endpoints.


Overview

Method Endpoint Description
GET /api/v1/generative-workflow-templates/ List Templates
POST /api/v1/generative-workflow-templates/ Create Template
GET /api/v1/generative-workflow-templates/{template_id} Get Template
PATCH /api/v1/generative-workflow-templates/{template_id} Update Template
DELETE /api/v1/generative-workflow-templates/{template_id} Soft Delete Template
POST /api/v1/generative-workflow-templates/{template_id}/render Render Template
POST /api/v1/generative-workflow-templates/{template_id}/validate Validate Template

API Reference

Sartiq Backend Server - Generative Workflow Templates 0.1.0

generative-workflow-templates


GET /api/v1/generative-workflow-templates/

List Templates

Description

Org-scoped list of templates, soft-deleted excluded.

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No
limit query integer 50 No
organization_id query No
q query No
skip query integer 0 No
tags query No
validation_status query No

Responses

{
    "data": [
        {
            "name": "string",
            "description": null,
            "notes": null,
            "tags": [
                "string"
            ],
            "engine": "string",
            "schema_version": "string",
            "definition_json": {
                "config": {},
                "suppress_subtask_events": true,
                "steps": [
                    {
                        "id": "string",
                        "task_type": "string",
                        "config": {},
                        "depends_on": [
                            "string"
                        ],
                        "input_mappings": [
                            {
                                "from_step": "string",
                                "from_field": "string",
                                "to_field": "string",
                                "transform": null
                            }
                        ],
                        "max_retries": 0,
                        "provider_config": null,
                        "active_provider_capabilities": null,
                        "fallback_provider_type": null,
                        "fallback_provider_config": null,
                        "fallback_provider_capabilities": null
                    }
                ]
            },
            "inputs_schema_json": {},
            "id": "861edc44-8d09-4a31-8d53-9bf0f92b531d",
            "owner_id": null,
            "organization_id": null,
            "system_role": null,
            "revision": 0,
            "validation_status": "valid",
            "validation_errors": null,
            "created_at": "2022-04-13T15:42:05.901Z",
            "updated_at": "2022-04-13T15:42:05.901Z",
            "deleted_at": null
        }
    ],
    "count": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "data": {
            "items": {
                "$ref": "#/components/schemas/GenerativeWorkflowTemplatePublic"
            },
            "type": "array",
            "title": "Data"
        },
        "count": {
            "type": "integer",
            "title": "Count"
        }
    },
    "type": "object",
    "required": [
        "data",
        "count"
    ],
    "title": "GenerativeWorkflowTemplatesPublic"
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/generative-workflow-templates/

Create Template

Description

Create a new template.

The template is persisted regardless of validation outcome — a structurally-parseable but semantically-broken payload lands with validation_status="invalid" (locked decision #9).

MVP full_inputs contract (locked #29): templates may declare any subset of these inputs in inputs_schema_json: generation_id, prediction_id, production_request_id, shot_id (UUID strings); width, height, seed (ints); prompt (str); base_image_url (str); reference_images (list[str]). URL fields are compute-server-reachable internal URLs produced via app.services.storage.get_internal_url(...).

Runtime contract (locked #14): the final compute-DAG step must emit result_image_path. Enforced by the event service at workflow completion, NOT at create time.

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No
organization_id query No

Request body

{
    "name": "string",
    "description": null,
    "notes": null,
    "tags": [
        "string"
    ],
    "engine": "string",
    "schema_version": "string",
    "definition_json": {
        "config": {},
        "suppress_subtask_events": true,
        "steps": [
            {
                "id": "string",
                "task_type": "string",
                "config": {},
                "depends_on": [
                    "string"
                ],
                "input_mappings": [
                    {
                        "from_step": "string",
                        "from_field": "string",
                        "to_field": "string",
                        "transform": null
                    }
                ],
                "max_retries": 0,
                "provider_config": null,
                "active_provider_capabilities": null,
                "fallback_provider_type": null,
                "fallback_provider_config": null,
                "fallback_provider_capabilities": null
            }
        ]
    },
    "inputs_schema_json": {}
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "name": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Name"
        },
        "description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Description"
        },
        "notes": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Notes"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array",
            "title": "Tags"
        },
        "engine": {
            "type": "string",
            "maxLength": 32,
            "title": "Engine",
            "default": "compute_dag"
        },
        "schema_version": {
            "type": "string",
            "maxLength": 64,
            "title": "Schema Version",
            "default": "generative-workflow/v1"
        },
        "definition_json": {
            "$ref": "#/components/schemas/GenerativeWorkflowDefinition-Input"
        },
        "inputs_schema_json": {
            "additionalProperties": {
                "$ref": "#/components/schemas/GenerativeWorkflowInputDef"
            },
            "type": "object",
            "title": "Inputs Schema Json"
        }
    },
    "type": "object",
    "required": [
        "name",
        "definition_json"
    ],
    "title": "GenerativeWorkflowTemplateCreate",
    "description": "POST payload.\n\nServer-managed fields (`id`, `revision`, `validation_status`,\n`validation_errors`, timestamps, `owner_id`, `organization_id`) are\nNOT accepted here; if present they are silently dropped (pydantic\ndefault).\n\nMVP `full_inputs` contract (locked plan decision #29): templates may\ndeclare any subset of these inputs in `inputs_schema_json`:\n`generation_id`, `prediction_id`, `production_request_id`, `shot_id`\n(UUID strings); `width`, `height`, `seed` (ints); `prompt` (str);\n`base_image_url` (str); `reference_images` (list[str]). URL fields\nare compute-server-reachable internal URLs (produced via\n`app.services.storage.get_internal_url(...)`).\n\nRuntime contract (locked plan decision #14): the final step must\nemit `result_image_path`. Enforced by the event service at workflow\ncompletion, NOT at create time."
}

Responses

{
    "name": "string",
    "description": null,
    "notes": null,
    "tags": [
        "string"
    ],
    "engine": "string",
    "schema_version": "string",
    "definition_json": {
        "config": {},
        "suppress_subtask_events": true,
        "steps": [
            {
                "id": "string",
                "task_type": "string",
                "config": {},
                "depends_on": [
                    "string"
                ],
                "input_mappings": [
                    {
                        "from_step": "string",
                        "from_field": "string",
                        "to_field": "string",
                        "transform": null
                    }
                ],
                "max_retries": 0,
                "provider_config": null,
                "active_provider_capabilities": null,
                "fallback_provider_type": null,
                "fallback_provider_config": null,
                "fallback_provider_capabilities": null
            }
        ]
    },
    "inputs_schema_json": {},
    "id": "6a727496-1961-429b-b447-315fa6f34717",
    "owner_id": null,
    "organization_id": null,
    "system_role": null,
    "revision": 0,
    "validation_status": "valid",
    "validation_errors": null,
    "created_at": "2022-04-13T15:42:05.901Z",
    "updated_at": "2022-04-13T15:42:05.901Z",
    "deleted_at": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "name": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Name"
        },
        "description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Description"
        },
        "notes": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Notes"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array",
            "title": "Tags"
        },
        "engine": {
            "type": "string",
            "maxLength": 32,
            "title": "Engine",
            "default": "compute_dag"
        },
        "schema_version": {
            "type": "string",
            "maxLength": 64,
            "title": "Schema Version",
            "default": "generative-workflow/v1"
        },
        "definition_json": {
            "$ref": "#/components/schemas/GenerativeWorkflowDefinition-Output"
        },
        "inputs_schema_json": {
            "additionalProperties": {
                "$ref": "#/components/schemas/GenerativeWorkflowInputDef"
            },
            "type": "object",
            "title": "Inputs Schema Json"
        },
        "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
        },
        "owner_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Owner Id"
        },
        "organization_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Organization Id"
        },
        "system_role": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "System Role"
        },
        "revision": {
            "type": "integer",
            "title": "Revision"
        },
        "validation_status": {
            "$ref": "#/components/schemas/GenerativeWorkflowValidationStatus"
        },
        "validation_errors": {
            "anyOf": [
                {
                    "items": {
                        "$ref": "#/components/schemas/ValidationError"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Validation Errors"
        },
        "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
        },
        "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
        },
        "deleted_at": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "date-time"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Deleted At"
        }
    },
    "type": "object",
    "required": [
        "name",
        "definition_json",
        "id",
        "revision",
        "validation_status",
        "created_at",
        "updated_at"
    ],
    "title": "GenerativeWorkflowTemplatePublic",
    "description": "GET response — server-side state included.\n\n``owner_id`` and ``organization_id`` are NULL for system templates\n(e.g., the seeded mannequin pipeline rows); user-owned templates\nalways populate both. ``system_role`` is non-NULL only for system\nrows and lets clients render edit affordances accordingly (UI hides\nthe \"edit\" button on system rows for non-superusers)."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

GET /api/v1/generative-workflow-templates/{template_id}

Get Template

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No
organization_id query No
template_id path string No

Responses

{
    "name": "string",
    "description": null,
    "notes": null,
    "tags": [
        "string"
    ],
    "engine": "string",
    "schema_version": "string",
    "definition_json": {
        "config": {},
        "suppress_subtask_events": true,
        "steps": [
            {
                "id": "string",
                "task_type": "string",
                "config": {},
                "depends_on": [
                    "string"
                ],
                "input_mappings": [
                    {
                        "from_step": "string",
                        "from_field": "string",
                        "to_field": "string",
                        "transform": null
                    }
                ],
                "max_retries": 0,
                "provider_config": null,
                "active_provider_capabilities": null,
                "fallback_provider_type": null,
                "fallback_provider_config": null,
                "fallback_provider_capabilities": null
            }
        ]
    },
    "inputs_schema_json": {},
    "id": "ac3834cb-bf17-418a-a1e9-4b506d93f577",
    "owner_id": null,
    "organization_id": null,
    "system_role": null,
    "revision": 0,
    "validation_status": "valid",
    "validation_errors": null,
    "created_at": "2022-04-13T15:42:05.901Z",
    "updated_at": "2022-04-13T15:42:05.901Z",
    "deleted_at": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "name": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Name"
        },
        "description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Description"
        },
        "notes": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Notes"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array",
            "title": "Tags"
        },
        "engine": {
            "type": "string",
            "maxLength": 32,
            "title": "Engine",
            "default": "compute_dag"
        },
        "schema_version": {
            "type": "string",
            "maxLength": 64,
            "title": "Schema Version",
            "default": "generative-workflow/v1"
        },
        "definition_json": {
            "$ref": "#/components/schemas/GenerativeWorkflowDefinition-Output"
        },
        "inputs_schema_json": {
            "additionalProperties": {
                "$ref": "#/components/schemas/GenerativeWorkflowInputDef"
            },
            "type": "object",
            "title": "Inputs Schema Json"
        },
        "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
        },
        "owner_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Owner Id"
        },
        "organization_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Organization Id"
        },
        "system_role": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "System Role"
        },
        "revision": {
            "type": "integer",
            "title": "Revision"
        },
        "validation_status": {
            "$ref": "#/components/schemas/GenerativeWorkflowValidationStatus"
        },
        "validation_errors": {
            "anyOf": [
                {
                    "items": {
                        "$ref": "#/components/schemas/ValidationError"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Validation Errors"
        },
        "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
        },
        "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
        },
        "deleted_at": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "date-time"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Deleted At"
        }
    },
    "type": "object",
    "required": [
        "name",
        "definition_json",
        "id",
        "revision",
        "validation_status",
        "created_at",
        "updated_at"
    ],
    "title": "GenerativeWorkflowTemplatePublic",
    "description": "GET response — server-side state included.\n\n``owner_id`` and ``organization_id`` are NULL for system templates\n(e.g., the seeded mannequin pipeline rows); user-owned templates\nalways populate both. ``system_role`` is non-NULL only for system\nrows and lets clients render edit affordances accordingly (UI hides\nthe \"edit\" button on system rows for non-superusers)."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

PATCH /api/v1/generative-workflow-templates/{template_id}

Update Template

Description

Patch a template. Bumps revision. Re-validates.

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No
organization_id query No
template_id path string No

Request body

{
    "name": null,
    "description": null,
    "notes": null,
    "tags": null,
    "engine": null,
    "schema_version": null,
    "definition_json": null,
    "inputs_schema_json": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "name": {
            "anyOf": [
                {
                    "type": "string",
                    "maxLength": 255,
                    "minLength": 1
                },
                {
                    "type": "null"
                }
            ],
            "title": "Name"
        },
        "description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Description"
        },
        "notes": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Notes"
        },
        "tags": {
            "anyOf": [
                {
                    "items": {
                        "type": "string"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Tags"
        },
        "engine": {
            "anyOf": [
                {
                    "type": "string",
                    "maxLength": 32
                },
                {
                    "type": "null"
                }
            ],
            "title": "Engine"
        },
        "schema_version": {
            "anyOf": [
                {
                    "type": "string",
                    "maxLength": 64
                },
                {
                    "type": "null"
                }
            ],
            "title": "Schema Version"
        },
        "definition_json": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/GenerativeWorkflowDefinition-Input"
                },
                {
                    "type": "null"
                }
            ]
        },
        "inputs_schema_json": {
            "anyOf": [
                {
                    "additionalProperties": {
                        "$ref": "#/components/schemas/GenerativeWorkflowInputDef"
                    },
                    "type": "object"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Inputs Schema Json"
        }
    },
    "type": "object",
    "title": "GenerativeWorkflowTemplateUpdate",
    "description": "PATCH payload — all fields optional.\n\nSaving an update bumps `revision` and re-runs validation."
}

Responses

{
    "name": "string",
    "description": null,
    "notes": null,
    "tags": [
        "string"
    ],
    "engine": "string",
    "schema_version": "string",
    "definition_json": {
        "config": {},
        "suppress_subtask_events": true,
        "steps": [
            {
                "id": "string",
                "task_type": "string",
                "config": {},
                "depends_on": [
                    "string"
                ],
                "input_mappings": [
                    {
                        "from_step": "string",
                        "from_field": "string",
                        "to_field": "string",
                        "transform": null
                    }
                ],
                "max_retries": 0,
                "provider_config": null,
                "active_provider_capabilities": null,
                "fallback_provider_type": null,
                "fallback_provider_config": null,
                "fallback_provider_capabilities": null
            }
        ]
    },
    "inputs_schema_json": {},
    "id": "5ff16df4-936e-4968-b730-9cd271cb3ef3",
    "owner_id": null,
    "organization_id": null,
    "system_role": null,
    "revision": 0,
    "validation_status": "valid",
    "validation_errors": null,
    "created_at": "2022-04-13T15:42:05.901Z",
    "updated_at": "2022-04-13T15:42:05.901Z",
    "deleted_at": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "name": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Name"
        },
        "description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Description"
        },
        "notes": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Notes"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array",
            "title": "Tags"
        },
        "engine": {
            "type": "string",
            "maxLength": 32,
            "title": "Engine",
            "default": "compute_dag"
        },
        "schema_version": {
            "type": "string",
            "maxLength": 64,
            "title": "Schema Version",
            "default": "generative-workflow/v1"
        },
        "definition_json": {
            "$ref": "#/components/schemas/GenerativeWorkflowDefinition-Output"
        },
        "inputs_schema_json": {
            "additionalProperties": {
                "$ref": "#/components/schemas/GenerativeWorkflowInputDef"
            },
            "type": "object",
            "title": "Inputs Schema Json"
        },
        "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
        },
        "owner_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Owner Id"
        },
        "organization_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Organization Id"
        },
        "system_role": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "System Role"
        },
        "revision": {
            "type": "integer",
            "title": "Revision"
        },
        "validation_status": {
            "$ref": "#/components/schemas/GenerativeWorkflowValidationStatus"
        },
        "validation_errors": {
            "anyOf": [
                {
                    "items": {
                        "$ref": "#/components/schemas/ValidationError"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Validation Errors"
        },
        "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
        },
        "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
        },
        "deleted_at": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "date-time"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Deleted At"
        }
    },
    "type": "object",
    "required": [
        "name",
        "definition_json",
        "id",
        "revision",
        "validation_status",
        "created_at",
        "updated_at"
    ],
    "title": "GenerativeWorkflowTemplatePublic",
    "description": "GET response — server-side state included.\n\n``owner_id`` and ``organization_id`` are NULL for system templates\n(e.g., the seeded mannequin pipeline rows); user-owned templates\nalways populate both. ``system_role`` is non-NULL only for system\nrows and lets clients render edit affordances accordingly (UI hides\nthe \"edit\" button on system rows for non-superusers)."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

DELETE /api/v1/generative-workflow-templates/{template_id}

Soft Delete Template

Description

Soft-delete a template.

Returns 409 with the locked GenerativeWorkflowDeletionConflict body when the template is referenced by non-deleted shootingguidelines or productionrequest rows. Hard delete is not exposed in MVP (locked decision #8).

SAR-1623 follow-up — system templates can only be deleted by a superuser (the route returns 403 for org members).

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No
organization_id query No
template_id path string No

Responses

Schema of the response body

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/generative-workflow-templates/{template_id}/validate

Validate Template

Description

Idempotent re-validation. Returns {status, errors} only.

SAR-1623 follow-up — re-validation persists validation_status and validation_errors on the row, so a non-superuser cannot flip a system template's gate state. The 403 fires before the write lands.

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No
organization_id query No
template_id path string No

Responses

{
    "status": "valid",
    "errors": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "status": {
            "$ref": "#/components/schemas/GenerativeWorkflowValidationStatus"
        },
        "errors": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Errors"
        }
    },
    "type": "object",
    "required": [
        "status"
    ],
    "title": "GenerativeWorkflowValidationResponse",
    "description": "Locked response for `POST /{id}/validate` (plan decision #14)."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/generative-workflow-templates/{template_id}/render

Render Template

Description

Single-pass dry-run render — same code path as the engine adapter uses at dispatch time (locked decision #5).

404 cross-org per locked decision #17. Substitution errors are surfaced as 400 with the locked {path, code, message} body verbatim (not wrapped in detail — that's why we return a JSONResponse directly here).

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No
organization_id query No
template_id path string No

Request body

{
    "inputs": {}
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "inputs": {
            "additionalProperties": true,
            "type": "object",
            "title": "Inputs"
        }
    },
    "type": "object",
    "title": "GenerativeWorkflowRenderRequest",
    "description": "Dry-run render payload. Single-pass per plan decision #5."
}

Responses

{
    "rendered": {}
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "rendered": {
            "additionalProperties": true,
            "type": "object",
            "title": "Rendered"
        }
    },
    "type": "object",
    "required": [
        "rendered"
    ],
    "title": "GenerativeWorkflowRenderResponse",
    "description": "Resolved JSON after substitution (engine-shaped)."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

Schemas

GenerativeWorkflowDefinition-Input

Name Type Description
config
steps Array<GenerativeWorkflowStepDefinition>
suppress_subtask_events boolean

GenerativeWorkflowDefinition-Output

Name Type Description
config
steps Array<GenerativeWorkflowStepDefinition>
suppress_subtask_events boolean

GenerativeWorkflowFieldMapping

Name Type Description
from_field string
from_step string
to_field string
transform

GenerativeWorkflowInputDef

Name Type Description
default
description
nullable boolean
required boolean
source
type string One of: string, integer, number, boolean, array, object

GenerativeWorkflowRenderRequest

Name Type Description
inputs

GenerativeWorkflowRenderResponse

Name Type Description
rendered

GenerativeWorkflowStepDefinition

Name Type Description
active_provider_capabilities
config
depends_on Array<string>
fallback_provider_capabilities
fallback_provider_config
fallback_provider_type
id string
input_mappings Array<GenerativeWorkflowFieldMapping>
max_retries integer
provider_config
task_type string

GenerativeWorkflowTemplateCreate

Name Type Description
definition_json GenerativeWorkflowDefinition-Input
description
engine string
inputs_schema_json
name string
notes
schema_version string
tags Array<string>

GenerativeWorkflowTemplatePublic

Name Type Description
created_at string(date-time)
definition_json GenerativeWorkflowDefinition-Output
deleted_at
description
engine string
id string(uuid)
inputs_schema_json
name string
notes
organization_id
owner_id
revision integer
schema_version string
system_role
tags Array<string>
updated_at string(date-time)
validation_errors
validation_status GenerativeWorkflowValidationStatus

GenerativeWorkflowTemplatesPublic

Name Type Description
count integer
data Array<GenerativeWorkflowTemplatePublic>

GenerativeWorkflowTemplateUpdate

Name Type Description
definition_json
description
engine
inputs_schema_json
name
notes
schema_version
tags

GenerativeWorkflowValidationResponse

Name Type Description
errors Array<ValidationError>
status GenerativeWorkflowValidationStatus

GenerativeWorkflowValidationStatus

Type: string

HTTPValidationError

Name Type Description
detail Array<ValidationError>

ValidationError

Name Type Description
ctx
input
loc Array<>
msg string
type string

Security schemes

Name Type Scheme Description
OAuth2PasswordBearer oauth2