Ship store art through an automated quality gate
Last updated: October 12, 2026
Generate store art at volume and let only what meets your studio's standards through, with a quality gate in the workflow and scoring wired into your own pipeline.
What you'll make
A repeatable pipeline that produces a batch of character art for a store page or a live-ops event, scores every candidate against your house style, drops what falls short, and lands the rest in a delivery project with its scores attached. The same pattern works for icons, ads, environments, video and 3D.
It enforces policy at four points, each covered below:
- Before generation: input guardrails refuse prompts and reference images that break policy.
- In the workflow: a judge node passes only outputs at or above a threshold, and fails the run if none pass.
- In the library: scoring rules stamp a score on every asset, so reviewers work from a sorted queue.
- In your pipeline: the API, SDK, webhooks and AI assistants read scores, so a build or a vendor intake can refuse what does not pass.
Before you start
- An admin to set workspace rules, and the Edit content policy permission for project rules. See Invite teammates and set their roles.
- Finished art that shows the standard, for reference images.
- For the API steps, a service account and its key. See Set up a service account for the API.
- Every judgement is billed like a small generation. See Creative Units.
Write the standard down
Everything downstream scores against rules, so start there. See Set up scoring rules for a workspace or project for the steps and Scoring rule examples for wording.
Under Workspace Settings > AI Controls > Output Scoring, add a House style rule with reference images, set it to Always, and star it as the headline score.
Add an IP clearance rule set to On demand for the checks you run before hand-off.
Under Input Guardrails, turn on the IP & trademark infringement preset so prompts and reference images that lean on another company's IP are refused before they generate.
In the delivery project's settings, add what only that project needs, such as an on-model rule for its hero character.
Gate the workflow
A judge node is a quality gate inside a workflow: a vision model scores each input against the criteria you give it, and only the outputs at or above the threshold continue to the next node. It has its own criteria, separate from the workspace's scoring rules, so a workflow carries its gate wherever it is run. See Build and publish a workflow for the canvas.
In the workflow, open Judges in the bottom toolbar and drag Smart Image Judge onto the canvas. Smart Video Judge, Smart Mesh Judge and Smart Text Judge work the same way for other outputs.
Wire the candidates into its Images input: the output of a generate or edit node, or an input node of uploads.
Under Criteria, write what a passing image looks like. Reuse your house style rule's wording so the gate and the library agree.
Set Threshold, the lowest score that passes, from 0 to 100. The default is 70; 80 matches the library's Good band.
Run the node.
It outputs only the images that passed, unchanged and in their original order. Here two of the three candidates come through and the watercolour pass stops.
Wire its output to whatever comes next (an upscale, a background removal, an export), so nothing that failed the gate is processed further. Publish the workflow so the team runs the gated version.
If no image passes, the run fails rather than handing nothing on, so an empty batch is never mistaken for a finished one. System Prompt, under Advanced, refines how the criteria are applied, and Base Model chooses the vision model that judges.
Wire scoring into your pipeline
Outside Layer, a build script, an asset management system or a vendor portal can ask for scores and act on them. The token needs the projects scope.
List the rules in force for the workspace or a project, to know their ids and which is the headline:
curl https://api.app.layer.ai/api/v2/workspaces/$WORKSPACE_ID/scoring-rules \ -H "Authorization: Bearer $LAYER_TOKEN"Queue files for scoring, up to 100 per request, with a webhook so you are told when the verdicts are in. Leave
rule_idsempty to run every rule in force; passproject_idto add that project's rules.curl -X POST https://api.app.layer.ai/api/v2/workspaces/$WORKSPACE_ID/scores \ -H "Authorization: Bearer $LAYER_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "file_ids": ["FILE_ID_1", "FILE_ID_2"], "project_id": "PROJECT_ID", "rule_ids": [], "webhook": { "url": "https://example.com/hooks/layer", "metadata": { "batch": "vendor-0412" } } }'When
scoring_run.completedarrives, read each file's verdicts.scoresholds the newest score and rationale per rule, andheadline_scorethe number on its tile:curl https://api.app.layer.ai/api/v2/workspaces/$WORKSPACE_ID/files/$FILE_ID/scores \ -H "Authorization: Bearer $LAYER_TOKEN"Route each file on its lowest score: accept at 80 and above, send back with the rationale between 50 and 79, reject below 50.
With the TypeScript SDK, layer.scores.rules(), layer.scores.score({ file_ids }) and layer.files.scores(fileId) make the same calls. A generation submitted through /v2 with a webhook in a workspace with Always rules also gets a separate scoring event, listed in expected_events. See Webhooks and SDK in the developer docs.
From an AI assistant connected to Layer, ask in plain words: "score these files against IP clearance and list anything under 80". The Layer tools list_output_scoring_rules, score_files and get_file_scores do the rest. See Connect an AI assistant to Layer.
Review what is left
Scores land on the assets in the library, so the people who sign off work from a queue rather than a folder.
In the delivery project, sort by Score and filter to Middling and Poor. Save it as a view. See Filter, sort and re-score assets by score.
Open each asset, read the reason under Policy scores, and fix the one thing named or send it back. See Score an asset and read its scores.
Hand it off
Select the passing assets, sorted by Score, and download them, or add them to the delivery project for the next stage. A file's scores stay with it, so the next team, or the next script, can check them again through the API before it ships.
Scale it up
Live-ops event art, every week
A published workflow takes the event's theme, generates character and prop variants with the event's reference set, passes them through a Smart Image Judge on the house style and upscales only the survivors, so a run's outputs are already the gated set. Producers run it from Workflows with a new theme each week; with the house style on Always, the art director reviews the saved Middling view rather than every output.
Vendor and outsourced deliveries
Each vendor uploads into its own project, whose rules add your IP clearance and on-model checks to the workspace's. Your intake script calls POST .../scores with that project_id and a webhook, accepts files whose every score is 80 or above, and returns the rest to the vendor with the rationale as the note. No delivery is accepted without a score.
A licensed collaboration
The collaboration's project carries a rule written from the licensor's guide, with their approved sheets as references, starred as the project's headline. Every tile in the project shows how close it is to the guide, and only Good assets go into the approval pack you send them.
Standards that cannot be loosened
Workspace rules are set by admins and apply to every project; a project can add rules but cannot switch off or weaken the workspace's. Combined with roles, a team can tighten its own bar without anyone lowering the studio's.
If something goes wrong
- The workflow run fails at the judge. No candidate reached the threshold. Check the criteria describe what a passing image shows, compare the threshold with the scores your scoring rules give similar work, and improve the upstream prompt or reference set.
- Too much passes the gate. The criteria describe intent rather than what is visible, or the threshold is low. Copy the wording from a calibrated scoring rule and raise the threshold to 80.
- The API returns no scoring run.
scoring_run_idis null when no rule is in force for the scope, so nothing was queued. Check the rules, and theproject_idyou passed. - A file comes back without scores. Audio and text are not scored by rules; use Smart Text Judge in a workflow for text. A file that could not be judged, such as one that does not load, gets no score rather than a guess.