media.brand.generate-critique-approve
Generate a brand image, run a multimodal AI critique (storage_object_uuid → ai.chat.complete attachment_uuids), and open an inbox review envelope. Final verdict via media.artifact.set-verdict.
Overview
| Property | Value |
|---|---|
| Workflow type | Dag |
| Library | App-media |
| Version | 1.0 |
Input Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | string | Yes | — | — |
connection_uuid | string | Yes | — | AI connection for image generation |
storage_connection_uuid | string | Yes | — | — |
bucket | string | Yes | — | — |
prompt | string | Yes | — | — |
model | string | Yes | — | — |
actor_uuid | string | Yes | — | Staff actor that receives the inbox review envelope |
size | string | No | — | — |
quality | string | No | — | — |
brand | string | No | — | — |
campaign | string | No | — | — |
purpose | string | No | — | — |
session_uuid | string | No | — | — |
review_gate | string | No | — | — |
critique_connection_uuid | string | No | — | AI chat connection for critique (vision-capable). Prefer a multimodal chat model — not the image-only deployment. Image pixels are passed via ai.chat.complete attachment_uuids (generate.storage_object_uuid). |
critique_model | string | No | — | Vision-capable chat model for critique (e.g. gpt-4o, gpt-4.1). |
critique_prompt | string | No | — | — |
review_title | string | No | — | — |
review_reason | string | No | — | — |
suppress_dispatch | boolean | No | — | — |
connector_uuid | string | No | — | — |
produced_by_kind | string | No | — | — |
produced_by_uuid | string | No | — | — |
created_by_uuid | string | No | — | — |
Output Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | string | Yes | — | — |
connection_uuid | string | Yes | — | AI connection for image generation |
storage_connection_uuid | string | Yes | — | — |
bucket | string | Yes | — | — |
prompt | string | Yes | — | — |
model | string | Yes | — | — |
actor_uuid | string | Yes | — | Staff actor that receives the inbox review envelope |
size | string | No | — | — |
quality | string | No | — | — |
brand | string | No | — | — |
campaign | string | No | — | — |
purpose | string | No | — | — |
session_uuid | string | No | — | — |
review_gate | string | No | — | — |
critique_connection_uuid | string | No | — | AI chat connection for critique (vision-capable). Prefer a multimodal chat model — not the image-only deployment. Image pixels are passed via ai.chat.complete attachment_uuids (generate.storage_object_uuid). |
critique_model | string | No | — | Vision-capable chat model for critique (e.g. gpt-4o, gpt-4.1). |
critique_prompt | string | No | — | — |
review_title | string | No | — | — |
review_reason | string | No | — | — |
suppress_dispatch | boolean | No | — | — |
connector_uuid | string | No | — | — |
produced_by_kind | string | No | — | — |
produced_by_uuid | string | No | — | — |
created_by_uuid | string | No | — | — |
failure_reason | string | No | — | Engine-stamped human-readable failure reason |
failed_at | string | No | — | ISO timestamp when the workflow failed |
failed_at_state | string | No | — | Engine-stamped state when the workflow failed |
failed_step | string | No | — | Engine-stamped step name (DAG path) |
failed_layer | integer | No | — | Engine-stamped layer index (DAG path) |
error | string | No | — | Engine-stamped exception message |
error_type | string | No | — | Engine-stamped exception class name |
storage_object_uuid | string | No | — | — |
artifact_uuid | string | No | — | — |
approval_envelope_uuid | string | No | — | — |
verdict | string | No | — | — |
critique_response | string | No | — | — |
generate | json | No | — | — |
critique | json | No | — | — |
request_review | json | No | — | — |
completed_at | string | No | — | — |
DAG Layers
| # | Layer | Steps | Compensation |
|---|---|---|---|
| 1 | generate | media.image.generate | media.artifact.set-verdict |
| 2 | critique | ai.chat.complete | media.artifact.set-verdict |
| 3 | request_review | media.artifact.request-review | — |
Execution Flow
Compensation
When any layer fails, its compensation steps run in reverse order to roll back the work completed so far.
Sub-workflows
| Sub-workflow | Step name |
|---|---|
media.image.generate | generate |
ai.chat.complete | critique |
media.artifact.request-review | request_review |
media.artifact.set-verdict | reject_artifact_after_generate |
Outcomes
| Outcome | Type | Description | State Data Keys |
|---|---|---|---|
review_requested | SUCCESS | Image generated, critiqued, and inbox review envelope opened | artifact_uuid, approval_envelope_uuid, storage_object_uuid, critique_response |
failed | FAILURE | Brand generate-critique-approve DAG failed | failure_reason |
API Usage
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "media.brand.generate-critique-approve",
"initial_data": {
"organization_uuid": "value",
"connection_uuid": "value",
"storage_connection_uuid": "value",
"bucket": "value"
}
}