Apply with AI (Merge)
apply_with_aiMerge / Apply-with-AI: apply a donor design (armor, outfit, weapon, hat, accessory, or overall style) onto a target sprite. Pass asset_id (+ artboard) for the target and donor_asset_id (+ donor artboard) OR style_reference_id for the donor. Defaults: preset style, subject character, density quality — infer preset/subject from the request and state your assumptions. Optional fit_to_target scales the donor design to the target subject. Results append to the target file. ~8 credits (HD).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"asset_id": "<asset_id>"
},
"name": "apply_with_ai"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| save | No | Append result into the target library file (default true). | |
| preset | No | Merge preset: character-transfer|armor|outfit|weapon|hat|accessory|style|custom. Default style; infer from the request (e.g. "give him the helmet" → hat). | |
| density | No | max (1) | quality (~3, default). | |
| subject | No | Target subject: character|item|building|ui|custom. Default character; infer from the target sprite. | |
| asset_id | Yes | Target library asset id — the sprite being modified (IMAGE 1). | |
| artboard_id | No | Optional artboard id from get_asset. Multi-artboard files need artboard_id or artboard_name to pick one sprite; omit for single-artboard assets. | |
| color_policy | No | Palette policy matching in-app ColorPolicyControl: "32"|"64"|"128"|"256" (max colors) or "none" (don't reduce). Default "128". Put palette caps here, not in the prompt. | |
| artboard_name | No | Optional artboard name from get_asset (e.g. "rocks_crystal"). Alternative to artboard_id. | |
| custom_prompt | No | Required for preset "custom" (the full instruction). For other presets: optional extra instructions. Subject/style only — no canvas size, no "no anti-aliasing" lectures; use color_policy for palette caps. Same caps as the in-app Merge fields: 1000 characters for preset "custom", 1000 for extra instructions on other presets; longer text is trimmed and the reply says so. | |
| fit_to_target | No | In-app Merge "Fit to target" — inject SCALE so the donor design matches the target subject size. Default false. | |
| fix_preflight | No | For the target artboard. true = re-center the subject for this run (the only blocking finding). "all" = also apply the advisory brush and artboard-resize fixes, which can change the output size. Default false. The saved library file is not changed. Merge never blocks on these. | |
| donor_asset_id | No | Donor library asset (design reference, IMAGE 2). Provide this OR style_reference_id. | |
| donor_artboard_id | No | Optional donor artboard id from get_asset on donor_asset_id (multi-artboard donors). | |
| style_reference_id | No | Donor from References library (upload_style_reference / list_style_references). Alternative to donor_asset_id. | |
| donor_artboard_name | No | Optional donor artboard name alternative. |