SuperAPI AI Directory

image-element-remove

Design & creation

View repository

Updated 10-16 09:32

About this skill

Image element removal (image-element-remove)

Overview

Perform element removal on existing images (watermark removal/text removal/local object removal), covering 4 types of scenarios: general watermark removal (one-click watermark removal including semi-transparent), document scenario semi-transparent watermarks, local object/element/specified text removal, and the fallback chain. Routing iron rule: when the user specifies specific text content, you must use praline_pro(path C); going through the general watermark/all-text path is prohibited (otherwise all text will be removed).

Before execution, the user should be clearly informed that: this Skill will read Meitu credentials, call the local meitu CLI, send the user-provided image and the generated removal instructions to the Meitu OpenAPI for processing, and write the results to ./output/ or $VISUAL/output/image-element-remove/. If the request involves removing watermarks, removing logos, removing authentication/attribution information, or similar source identifiers, the user should be reminded to confirm that they have legal editing permission.

API Mapping

  • General watermark/all-text removal: general removal path.
  • Document scenario semi-transparent watermark: document watermark path.
  • Local object or specified text removal: prioritize praline_pro, and on failure degrade in order to praline_lite、mint_edit。

Dependencies

  • meitu-cli: >=2.0.6(npm install -g meitu-cli@latest)
  • credentials:CONFIG AKSK → meitu tools update; EXEC AKSK → actual execution (see root CONFIG.md)
  • environment variables:MEITU_OPENAPI_TOOL_TASK_MODE=command

Path aliases:$VISUAL = {OPENCLAW_HOME}/workspace/visual/

Core Workflow

Preflight → Execute → Deliver

Preflight

  1. meitu --version ≥ 2.0.6 (otherwise npm install -g meitu-cli@latest)
  2. confirm that meitu tools updatehas been run (using CONFIG AKSK)
  3. current AKSK = EXEC, and MEITU_OPENAPI_TOOL_TASK_MODE=command
  4. resolve output_dir: openclaw.yaml → ./output/ |else → $VISUAL/output/image-element-remove/;mkdir -p

Execute

Trigger signals / routing rules

Core judgment dimensions:preliminary judgment (specified text?) + removal content type。

Decision order:

  1. Preliminary judgment (routing iron rule): Does the user quote/describe specific text content?
    • ✅ Yes → mandatory use praline_pro(going through the general removal path is prohibited)
    • ❌ No → continue classification
  2. Branch by removal content:
    • Path A: watermark removal / all-text removal (universal quantifier) → general removal path
    • Path B: explicit document scenario semi-transparent watermark → document watermark path
    • Path C: local object/specified text → praline_pro → fallback chain
Scenario Judgment keywords Routing
Specified specific text content (iron rule) remove 'xxx', remove the text 'xxx' praline_pro
General watermark remove watermark, remove the watermark, remove semi-transparent watermark General removal path, target=watermark
All text (including universal quantifier) remove all text, all text, one-click text removal General removal path, target=text
Document scenario semi-transparent watermark (explicit in the user's own words) document watermark, scanned document watermark, novel watermark Document watermark path
Local object/element remove passersby, remove logo, remove clutter, remove corner badge praline_pro → Degradation chain
Ambiguous intent ("remove text") Neither all nor specific content specified Light confirmation

Explicit constraint elimination principle:praline_pro、praline_lite and mint_edit elimination prompt must use thefour-part template(SCOPE + PRESERVE + REFLOW + NEGATIVE), explicitly locking the 12 visual attributes of the remaining elements to prevent the model from incidentally altering non-target elements.

Parameter definitions

Common parameters:

Parameter Type Required Description
image_url STRING Yes Image address. If missing → prompt "Please provide the image to be processed"

Additional parameters for the general elimination path:

Parameter Type Required Range Default value Description
target STRING No watermark / text watermark Elimination target type

Additional parameters for the local elimination model:

Parameter Type Required Description
prompt STRING Yes English elimination instruction generated according to the four-part template (SCOPE + PRESERVE + REFLOW + NEGATIVE)

Four-part prompt template:

Task: Element removal.
Remove ONLY the specified element from the image: {target_description}.
STRICTLY PRESERVE all remaining visual elements, including: font family, size, color, weight, style, stroke, shadow, position, alignment, background, lighting, composition, and any other text or objects not targeted for removal.
If the removal affects part of a text segment, REFLOW the remaining text to read as a natural, complete phrase — close any gaps, maintain baseline and alignment, preserve visual balance and typographic consistency.
DO NOT modify any other elements in the image.
DO NOT change the overall color palette, lighting, composition, or style.

Tool invocation

# 通用水印
meitu image-element-remove --image_url <url> --target watermark --json --download-dir {output_dir} --skill_name skill_image-element-remove
# 指定文字/局部物体
meitu image-element-remove --image_url <url> --prompt "<four_segment_prompt>" --model praline_pro --json --download-dir {output_dir} --skill_name skill_image-element-remove

Error degradation

Scenario Handling method
image_url missing Prompt "Please provide the image to be processed"
image_url inaccessible Return invalid error directly, do not retry
General elimination path fails + user mentions "semi-transparent" Degrade to document watermark path → praline_pro → praline_lite → mint_edit
General elimination path fails (non-semi-transparent) Return error, do not blindly degrade
Document watermark path fails Degrade praline_pro → praline_lite → mint_edit
praline_pro fails Automatically degrade praline_lite
praline_lite fails Automatically degrade mint_edit
mint_edit fails Return error
No watermark/text detected Return the original image, inform that none was detected
Content compliance interception Return compliance prompt, do not retry, do not degrade

Deliver

  • Directly use the output_dir parsed by Preflight
  • From downloaded_files[0].saved_path read the downloaded file path
  • mv {downloaded_files[0].saved_path} {output_dir}/{YYYY-MM-DD}_{descriptive}_image-element-remove.jpg

Output

  • Format: JPEG/PNG (keep original format)
  • Naming:{YYYY-MM-DD}_{descriptive}_image-element-remove.jpg
  • Location: project → ./output/, one-time → $VISUAL/output/image-element-remove/

Baseline Task ID

See the corresponding row in references/task-id-baseline.md .