SuperAPI AI Directory

image-superres-enhance

Design & creation

View repository

Updated 10-16 06:46

About this skill

Image Superres Enhance

Overview

Perform clarity enhancement / super-resolution upscaling on existing images, automatically selecting the optimal algorithm based on content type, covering general super-resolution, e-commerce product image super-resolution, and text document super-resolution. Key distinction: "upscale to 4K/2K/1080P" (resolution target) goes to this tool; "upscale 2/4/8x" (multiplier upscaling) goes to image-transform.

API Mapping

  • General super-resolution:api_v2_image_restoration_async
  • E-commerce product image super-resolution:api_v1_dlbeautygoodsimagesr_async
  • Text document/scan super-resolution:api_v1_dlbeautytextimagesr_async

Dependencies

  • meitu-cli: >=2.0.6
  • Credential:CONFIG AKSK → meitu tools update; EXEC AKSK → actual execution (see root CONFIG.md)
  • Environment variable:MEITU_OPENAPI_TOOL_TASK_MODE=command

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

Core Workflow

Preflight → Execute → Deliver

Preflight

  1. meitu --version ≥ 2.0.6
  2. Already ran with CONFIG AKSK meitu tools update
  3. Current AKSK = EXEC,MEITU_OPENAPI_TOOL_TASK_MODE=command
  4. output_dir:openclaw.yaml → ./output/ |else → $VISUAL/output/image-superres-enhance/;mkdir -p

Execute

Trigger signals / routing rules

Core dimension:The content type recognized by the Agent from the image(prompt signal words).

Scenario Determination keywords Routing
E-commerce product image product, item, SKU, e-commerce, white-background product api_v1_dlbeautygoodsimagesr_async
Text document document, text, chart, scan, invoice, contract, form api_v1_dlbeautytextimagesr_async
General / unspecified portrait, landscape, old photo, other api_v2_image_restoration_async
Mixed content -- Default to general or ask
Product image + specified resolution product image to 4K api_v1_dlbeautygoodsimagesr_async(scenario-specific takes precedence over general)

Routing principle:scenario-specific takes precedence over general; before calling, the Agent first identifies the image content to generate prompt, if it cannot be determined then prompt write "general image" to go with the default.

Parameter definitions

Parameter Type Required Description
image_url STRING Yes Image URL. If missing → prompt "Please provide the image to be ultra-clear processed"
prompt STRING Yes The Agent's description of the image content, used for internal routing determination (e.g. "e-commerce white-background product image", "scanned text document", "landscape photo")

All APIs use only image_url + prompt, with no additional parameters.

Tool invocation

meitu image-superres-enhance --image_url <url> --prompt "<content desc>" --json --download-dir {output_dir} --skill_name skill_image-superres-enhance

Error fallback

Scenario Handling method
image_url missing Prompt "Please provide the image to be ultra-clear processed"
image_url inaccessible Directly return an invalid image link error, do not retry
prompt empty or no signal words Default to api_v2_image_restoration_async
Mixed content (text + product) Ask or default to general
Any API call failure Switch api_v2_image_restoration_async retry once → if still failing return error
Content compliance interception Directly return a compliance notice, do not retry, do not fall back
Product image + specified resolution Prioritize product super-resolution (scenario-specific takes precedence), resolution is handled internally by the API

Deliver

  • output_dir resolved using 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-superres-enhance.{ext}

Output

  • Format:image
  • Location: project → ./output/, one-time → $VISUAL/output/image-superres-enhance/

Baseline Task ID

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