generate-clip-art-asset-ref

activev2026.07.31.3

Sibling of generate-clip-art-asset-v2 for REFERENCE-ANCHORED PACKS: renders each asset AGAINST a reference image (esy/image-edit). anchorMode picks what the reference anchors — 'character' (default) reproduces the reference subject across a pack; 'style' copies only its palette/linework/rendering while each asset depicts its own subject (pack-studio Style Kits). The prompt must be fully compiled (compactBible + subject + styleFragment — plan-clipart-pack does this); the reference sheet URL is shared across an order's children via intake_base. Then background removal and catalog classification, exactly like v2.

This page renders the template’s published registry entry — the contract itself, not a description of it. Immutable versions; sealed properties exist but are not public.

What you provide — intake contract

FieldTypeRequiredDefaultDescription
promptstringrequiredFULLY compiled prompt (character bible + subject + style fragment). Do NOT include background/transparency wording (issue #213); such phrases are scrubbed
referenceUrlstringrequiredReference image URL: character sheet or style anchor (platform storage or trusted origin)
anchorModeenum
characterstyle
optional"character"What the reference anchors: 'character' reproduces the reference subject (character packs); 'style' copies only palette/linework/rendering (style kits)
styleenum
flatminimaloutlineblack-and-whitecartoonmascotstickeremojivintagewatercolorstorybookisometricclaychibipixelkawaii3ddoodle
required"flat"Clip-art style
aspectRatioenum
1:13:44:3
optional"1:1"Aspect ratio
qualityenum
lowmediumhigh
optional"medium"Render quality tier
backgroundRemovalEnabledbooleanoptionaltrueDeliver the asset with a transparent background
elementTypeenum
""subjectposepropbordercornerpatternscene
optional""Pack element type; full-bleed types ('pattern', 'scene') skip background removal — compositions have no single subject to isolate
alphaAuditModeenum
enforcereportoff
optional"enforce"Cutout QA after background removal: 'enforce' (default) fails bad cutouts (holes/halos/spill) so they retry through the removal ladder, 'report' records metrics only, 'off' skips the audit
removalEscalationEnabledbooleanoptionaltrueOn an enforced cutout-audit failure, retry the same render through stronger background-removal models (Heavy/Matting at 2K, then BRIA) before re-rendering; off fails straight to re-render
matteColorstringoptional""Chroma-key backing color for the keyed render (single-primary hex, e.g. #00FF00); empty lets the engine choose
categoriesstringrequiredComma-separated category slugs the classifier must choose from (empty fails the run in preflight)
textPolicyenumoptional""Per-item text contract: none = text forbidden; exact = must match expectedText; freeform = text allowed, judged on legibility/spelling only. Empty derives from textBearing (true=exact, false=freeform). Use 'none' deliberately, for assets that must carry no characters at all.
textBearingbooleanoptionalfalseTrue when the asset must carry legible text (the OCR gate then checks it)
expectedTextstringoptional""The EXACT text the asset must carry; leave empty unless textPolicy is 'exact'

How it runs — step topology

1
Render from referencetool
2
Remove backgroundtoolbackgroundRemover
3
Refine edgestool
4
Audit cutouttool
5
Classify assetllmclassifier
systempromptTemplatemaxTokens
6
Text gatellmtextGategate

Hard gate: the run fails unless pass OCR text gate rejected the render

systempromptTemplatemaxTokens

Model roles: imageEditor backgroundRemover classifier textGate bindings budgetPolicy

What you get — artifact

clip-artvisual

Version lineage

2026.07.31.3rev 41current2026-08-06
sha256:3b70fe28e
2026.07.31.3rev 402026-08-06
sha256:aea88590c
2026.07.31.3rev 392026-08-02
sha256:a79182e8d
2026.07.31.2rev 362026-08-02
sha256:5803abe8d
2026.07.31.2rev 272026-07-31
sha256:1ea9109b0
2026.07.31rev 252026-07-31
sha256:57d4ee6cf
2026.07.30rev 242026-07-30
sha256:ba69e5f90
2026.07.29.4rev 212026-07-30
sha256:71a13b635
2026.07.29.3rev 202026-07-29
sha256:129859c25
2026.07.29.2rev 162026-07-29
sha256:953657b0a
2026.07.29.1rev 152026-07-29
sha256:0d224eeea
2026.07.25rev 142026-07-26
sha256:55ea814f8
2026.07.18rev 92026-07-20
sha256:4536a4fef
2026.07.18rev 82026-07-20
sha256:790b27bf4
2026.07.18rev 32026-07-18
sha256:5f7981451
2026.07.18rev 22026-07-18
sha256:7db51991c
2026.07.14rev 12026-07-15
sha256:75dbcc89d

Full contract (as served)

GET /v1/catalog/workflows/generate-clip-art-asset-ref
{
  "_comment": "SYNCED SNAPSHOT — do not hand-edit. Regenerate with: node scripts/sync-workflow-catalog.mjs (pulls api.esy.com GET /v1/catalog/workflows/{id}).",
  "generatedAt": "2026-08-13T02:30:34.277473Z",
  "id": "generate-clip-art-asset-ref",
  "name": "Generate Clip Art (reference-consistent)",
  "description": "Sibling of generate-clip-art-asset-v2 for REFERENCE-ANCHORED PACKS: renders each asset AGAINST a reference image (esy/image-edit). anchorMode picks what the reference anchors — 'character' (default) reproduces the reference subject across a pack; 'style' copies only its palette/linework/rendering while each asset depicts its own subject (pack-studio Style Kits). The prompt must be fully compiled (compactBible + subject + styleFragment — plan-clipart-pack does this); the reference sheet URL is shared across an order's children via intake_base. Then background removal and catalog classification, exactly like v2.",
  "shortDescription": "Reference-consistent clip-art asset (character packs).",
  "artifactClass": "visual",
  "outputType": "visual",
  "status": "active",
  "supersededById": null,
  "version": "2026.07.31.3",
  "stages": [
    {
      "name": "Render",
      "description": "Render the asset against the reference sheet.",
      "stepCount": 1
    },
    {
      "name": "Post-process",
      "description": "Remove the background when transparency is requested, refine the cutout edge, then audit the result.",
      "stepCount": 3
    },
    {
      "name": "Classify",
      "description": "Produce catalog metadata.",
      "stepCount": 1
    }
  ],
  "intakeSchema": {
    "fields": [
      {
        "name": "prompt",
        "type": "string",
        "required": true,
        "description": "FULLY compiled prompt (character bible + subject + style fragment). Do NOT include background/transparency wording (issue #213); such phrases are scrubbed"
      },
      {
        "name": "referenceUrl",
        "type": "string",
        "required": true,
        "description": "Reference image URL: character sheet or style anchor (platform storage or trusted origin)"
      },
      {
        "name": "anchorMode",
        "type": "enum",
        "required": false,
        "default": "character",
        "description": "What the reference anchors: 'character' reproduces the reference subject (character packs); 'style' copies only palette/linework/rendering (style kits)",
        "options": [
          "character",
          "style"
        ]
      },
      {
        "name": "style",
        "type": "enum",
        "required": true,
        "description": "Clip-art style",
        "default": "flat",
        "options": [
          "flat",
          "minimal",
          "outline",
          "black-and-white",
          "cartoon",
          "mascot",
          "sticker",
          "emoji",
          "vintage",
          "watercolor",
          "storybook",
          "isometric",
          "clay",
          "chibi",
          "pixel",
          "kawaii",
          "3d",
          "doodle"
        ]
      },
      {
        "name": "aspectRatio",
        "type": "enum",
        "required": false,
        "description": "Aspect ratio",
        "default": "1:1",
        "options": [
          "1:1",
          "3:4",
          "4:3"
        ]
      },
      {
        "name": "quality",
        "type": "enum",
        "required": false,
        "description": "Render quality tier",
        "default": "medium",
        "options": [
          "low",
          "medium",
          "high"
        ]
      },
      {
        "name": "backgroundRemovalEnabled",
        "type": "boolean",
        "required": false,
        "description": "Deliver the asset with a transparent background",
        "default": true
      },
      {
        "name": "elementType",
        "type": "enum",
        "required": false,
        "default": "",
        "description": "Pack element type; full-bleed types ('pattern', 'scene') skip background removal — compositions have no single subject to isolate",
        "options": [
          "",
          "subject",
          "pose",
          "prop",
          "border",
          "corner",
          "pattern",
          "scene"
        ]
      },
      {
        "name": "alphaAuditMode",
        "type": "enum",
        "required": false,
        "default": "enforce",
        "description": "Cutout QA after background removal: 'enforce' (default) fails bad cutouts (holes/halos/spill) so they retry through the removal ladder, 'report' records metrics only, 'off' skips the audit",
        "options": [
          "enforce",
          "report",
          "off"
        ]
      },
      {
        "name": "removalEscalationEnabled",
        "type": "boolean",
        "required": false,
        "default": true,
        "description": "On an enforced cutout-audit failure, retry the same render through stronger background-removal models (Heavy/Matting at 2K, then BRIA) before re-rendering; off fails straight to re-render"
      },
      {
        "name": "matteColor",
        "type": "string",
        "required": false,
        "default": "",
        "description": "Chroma-key backing color for the keyed render (single-primary hex, e.g. #00FF00); empty lets the engine choose"
      },
      {
        "name": "categories",
        "type": "string",
        "required": true,
        "description": "Comma-separated category slugs the classifier must choose from (empty fails the run in preflight)"
      },
      {
        "name": "textPolicy",
        "type": "enum",
        "required": false,
        "default": "",
        "options": [
          "",
          "none",
          "exact",
          "freeform"
        ],
        "description": "Per-item text contract: none = text forbidden; exact = must match expectedText; freeform = text allowed, judged on legibility/spelling only. Empty derives from textBearing (true=exact, false=freeform). Use 'none' deliberately, for assets that must carry no characters at all."
      },
      {
        "name": "textBearing",
        "type": "boolean",
        "required": false,
        "default": false,
        "description": "True when the asset must carry legible text (the OCR gate then checks it)"
      },
      {
        "name": "expectedText",
        "type": "string",
        "required": false,
        "default": "",
        "description": "The EXACT text the asset must carry; leave empty unless textPolicy is 'exact'"
      }
    ]
  },
  "runtimeSteps": [
    {
      "id": "step-1",
      "name": "Render from reference",
      "kind": "tool",
      "inputPath": "intake.referenceUrl"
    },
    {
      "id": "step-2",
      "name": "Remove background",
      "kind": "tool",
      "role": "backgroundRemover",
      "inputPath": "step-1.url"
    },
    {
      "id": "step-2a",
      "name": "Refine edges",
      "kind": "tool",
      "inputPath": "step-2.url"
    },
    {
      "id": "step-2b",
      "name": "Audit cutout",
      "kind": "tool",
      "inputPath": "step-2a.url"
    },
    {
      "id": "step-3",
      "name": "Classify asset",
      "kind": "llm",
      "capability": "text",
      "role": "classifier",
      "jsonSchema": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Catalog-ready title, <= 60 chars"
          },
          "slug": {
            "type": "string",
            "description": "kebab-case URL slug"
          },
          "description": {
            "type": "string",
            "description": "1-2 sentence SEO-friendly description"
          },
          "category": {
            "type": "string",
            "description": "Exactly one of the provided category slugs"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "3-8 search tags"
          }
        },
        "required": [
          "title",
          "slug",
          "description",
          "category"
        ],
        "additionalProperties": false
      },
      "system": "redacted",
      "promptTemplate": "redacted",
      "maxTokens": "redacted"
    },
    {
      "id": "step-4",
      "name": "Text gate",
      "kind": "llm",
      "capability": "text",
      "role": "textGate",
      "requireTrue": "pass",
      "failMessage": "OCR text gate rejected the render",
      "jsonSchema": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "foundText": {
            "type": "string",
            "description": "All legible text read from the image; empty if none"
          },
          "pass": {
            "type": "boolean"
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "foundText",
          "pass",
          "reason"
        ]
      },
      "system": "redacted",
      "promptTemplate": "redacted",
      "maxTokens": "redacted"
    }
  ],
  "gates": [
    {
      "id": "gate-render",
      "name": "Provider execution",
      "type": "quality",
      "inputs": [
        "intake"
      ],
      "outputs": [
        "raw-image"
      ],
      "unlocks": [
        "step-2"
      ]
    },
    {
      "id": "gate-bg",
      "name": "Background removal",
      "type": "quality",
      "inputs": [
        "raw-image"
      ],
      "outputs": [
        "processed-image"
      ],
      "unlocks": [
        "step-3"
      ]
    },
    {
      "id": "gate-alpha",
      "name": "Cutout alpha audit",
      "type": "quality",
      "inputs": [
        "processed-image"
      ],
      "outputs": [
        "audited-image"
      ]
    },
    {
      "id": "gate-text",
      "name": "Text gate",
      "type": "quality",
      "inputs": [
        "processed-image"
      ],
      "outputs": [
        "verified-image"
      ]
    }
  ],
  "artifactSchema": {
    "artifactClass": "visual",
    "artifactType": "clip-art",
    "files": [
      "image/webp"
    ],
    "metadata": {
      "style": "string",
      "referenceUrl": "string",
      "backgroundRemoved": "boolean",
      "classification": "object"
    }
  },
  "providers": {
    "imageEditor": "redacted",
    "backgroundRemover": "redacted",
    "classifier": "redacted",
    "textGate": "redacted"
  },
  "budgetPolicy": "redacted",
  "versions": [
    {
      "version": "2026.07.14",
      "revision": 1,
      "contentHash": "sha256:75dbcc89df730d423ea84520b0bf4342967a865e752f5757ff25b997befa5a7f",
      "createdAt": "2026-07-15T15:18:56.167968Z"
    },
    {
      "version": "2026.07.18",
      "revision": 2,
      "contentHash": "sha256:7db51991c649990f8dba204a2296995cc7a357315fa591ea1300a5ffb0f171b4",
      "createdAt": "2026-07-18T19:19:14.239374Z"
    },
    {
      "version": "2026.07.18",
      "revision": 3,
      "contentHash": "sha256:5f7981451dfed80c62fa43445d2283602fa5e7e5e23df6f1780ebd4310d8aa14",
      "createdAt": "2026-07-18T19:45:20.743388Z"
    },
    {
      "version": "2026.07.18",
      "revision": 8,
      "contentHash": "sha256:790b27bf473b27573f4235610a73a45d8ae1e74e929a17a0e8e9a5c065e59dba",
      "createdAt": "2026-07-20T20:32:29.806659Z"
    },
    {
      "version": "2026.07.18",
      "revision": 9,
      "contentHash": "sha256:4536a4fef4e70e5e09d6955d7f4ddc156d2c1453f2c12f4a6db708797c6e50a3",
      "createdAt": "2026-07-20T21:59:54.012027Z"
    },
    {
      "version": "2026.07.25",
      "revision": 14,
      "contentHash": "sha256:55ea814f861c3a306c25024b3f557da1174abc3d1e62e6bbebd8b380cd9ebdd2",
      "createdAt": "2026-07-26T00:51:22.416018Z"
    },
    {
      "version": "2026.07.29.1",
      "revision": 15,
      "contentHash": "sha256:0d224eeea4e85079380802c3b221de6c61d95014249760764fa5b44eea7e043c",
      "createdAt": "2026-07-29T14:44:37.958669Z"
    },
    {
      "version": "2026.07.29.2",
      "revision": 16,
      "contentHash": "sha256:953657b0ae6211cec1a08f7d9097a510feae8fd6b2f3f66896008e3348c55099",
      "createdAt": "2026-07-29T18:03:03.662947Z"
    },
    {
      "version": "2026.07.29.3",
      "revision": 20,
      "contentHash": "sha256:129859c2505b94fcd1fd9fc044129de204b741e7acb1a9c3c1ba54e1e577d9a2",
      "createdAt": "2026-07-29T23:31:44.472187Z"
    },
    {
      "version": "2026.07.29.4",
      "revision": 21,
      "contentHash": "sha256:71a13b63521586fb6c9e1009476f206654c92957cdf55de0f07921462611d497",
      "createdAt": "2026-07-30T00:05:53.341157Z"
    },
    {
      "version": "2026.07.30",
      "revision": 24,
      "contentHash": "sha256:ba69e5f90cfa6013bf37f143f81213c31f583400506dc8e71a671ec2daa79579",
      "createdAt": "2026-07-30T21:21:44.675493Z"
    },
    {
      "version": "2026.07.31",
      "revision": 25,
      "contentHash": "sha256:57d4ee6cfd53c3a81ebd1c7c610a02e8b5fd855422be20137f85b12f47aa61ac",
      "createdAt": "2026-07-31T17:44:51.686624Z"
    },
    {
      "version": "2026.07.31.2",
      "revision": 27,
      "contentHash": "sha256:1ea9109b00813e475efcf96679cd74bba906ce5c137e046069e20895409c8cbc",
      "createdAt": "2026-07-31T23:05:50.407387Z"
    },
    {
      "version": "2026.07.31.2",
      "revision": 36,
      "contentHash": "sha256:5803abe8d2858ec437d71e1c6f62cb58527ab73b5595bc96e4f1bb63bce42968",
      "createdAt": "2026-08-02T01:34:07.765575Z"
    },
    {
      "version": "2026.07.31.3",
      "revision": 39,
      "contentHash": "sha256:a79182e8d7e6cb8bcfa36b916ed2fd07e0433dee8fb142dcf0512927c8c99044",
      "createdAt": "2026-08-02T17:38:42.426516Z"
    },
    {
      "version": "2026.07.31.3",
      "revision": 40,
      "contentHash": "sha256:aea88590ca7d09f7aadc7c2b10ce18f23981106109bf98c16b5f2e3241c9e823",
      "createdAt": "2026-08-06T22:08:49.212191Z"
    },
    {
      "version": "2026.07.31.3",
      "revision": 41,
      "contentHash": "sha256:3b70fe28ebdd0039bc66f26d7c7aba4afe087e2fef8e10c307ba429ab31b36d0",
      "createdAt": "2026-08-06T22:47:28.688241Z"
    }
  ],
  "updatedAt": "2026-08-06T22:47:28.688241Z"
}

Snapshot generated 2026-08-13 from the live registry.