SuperAPI AI Directory

image-search

Design & creation

View repository

Updated 10-16 06:46

About this skill

Image Search

Overview

Keyword image search / reverse image search, combined retrieval across the platform image library + Pinterest + Huaban. Used for finding reference images, finding materials, searching for inspiration, and finding similar images from an image; supports splitting multiple keywords to improve recall.

Before execution, the user should be clearly informed that: this Skill will read local Meitu credentials and retrieval configuration, call meitu image-search, and may write the retrieval result JSON and downloaded images to ./output/ or $VISUAL/output/image-search/。

API Mapping

  • Keyword image search / reverse image search:image_search

Dependencies

  • meitu-cli: >=2.0.6
  • 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
  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-search/;mkdir -p

Execute

Trigger signals / routing rules

Core dimensions:search vs retrieve mode + complete parameters。

Scenario Determination Routing
Keyword image search Search for images described by text image_search,query_mode=search
Reverse image search Find similar images given a reference image image_search,query_mode=retrieve
Keyword + reference image Provide both keyword and reference image image_search,query_mode=search + dual parameters

Split complex intents into multiple keywords to improve recall (e.g. "Nordic minimalist living room" →["北欧客厅","极简风"])。

Parameter definitions

Parameter Type Required Range Default Description
prompt ARRAY Conditionally required -- -- Array of search terms. Split complex intents into multiple keywords.search Required in mode
image_ids ARRAY Conditionally required -- -- Array of image IDs. Automatically extracts the ID when the user provides a URL.retrieve Required in mode
query_mode STRING Yes search / retrieve search search=keyword search; retrieve=image-based recall
size NUMBER Yes 1–8 4 Number of images to return, maximum 8
source_type STRING Yes auto / internal / pinterest / huaban auto auto=platform image library first, fall back to other sources when insufficient

Default strategy:prompt and image_ids provide at least one; if both are missing → prompt "Please describe the search content or provide a reference image".

Tool invocation

meitu image-search --prompt "<kw1>,<kw2>" [--query_mode search] [--size 4] [--source_type auto] --json --download-dir {output_dir} --skill_name skill_image-search
# 以图搜图
meitu image-search --image_ids <id1>,<id2> --query_mode retrieve --json --download-dir {output_dir} --skill_name skill_image-search

Error degradation

Scenario Handling method
prompt and image_ids both missing Prompt "Please describe the search content or provide a reference image"
Says "search for images similar to this one" but does not provide an image Prompt "Please provide a reference image"
Says "search for more" but size is already 8 Inform that at most 8 images can be returned
source_type=pinterest but external source unavailable Degrade to auto retry
Returns empty result Retry once with synonyms; if still empty: inform that nothing was found and suggest changing keywords
API timeout size reduce to 2 and retry; if still timing out: inform that the service is temporarily unavailable
image_ids All invalid Prompt "invalid image ID"
Content compliance interception Directly return the compliance prompt, do not retry
The user provides both keywords and a reference image query_mode=search, and also pass prompt + image_ids

Deliver

  • Use the output_dir parsed by Preflight
  • Write the returned retrieval result metadata to {output_dir}/{YYYY-MM-DD}_{descriptive}_image-search.json
  • If the command returns downloaded_files, from downloaded_files[*].saved_path read the downloaded image paths and keep them in output_dir

Output

  • Format: JSON retrieval results (URL/ID) + optional downloaded images
  • Location: project → ./output/, one-time → $VISUAL/output/image-search/

Baseline Task ID

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