AI Agent Hub
Back to skills
Smart Image Editing icon

Smart Image Editing

Design & Media Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Please install @ixhlink/ixhlink-skills-image-edit according to https://skillhub.cn/install/skillhub.md.

About this skill

Problem Addressed

In digital content creation and automated workflows, image editing often requires specialized software or manual intervention, making it difficult to integrate programmatically. The Smart Image Editing skill provides an API interface that enables developers to perform image edits automatically based on textual descriptions and reference images, simplifying the process.

How It Works

The core capability is image_edit, which accepts an editing description via the prompt parameter and uses the images array to provide at least one reference image. Key steps include:

  • Submitting Edit Requests: Use the POST method to call either /api/v1/llm/invoke or /api/v1/llm/tasks endpoints. The request body must include model, capability, and payload fields, where payload requires prompt and images. Images can be provided in Base64 or URL format.
  • Asynchronous Processing Flow: Tasks are asynchronous by default due to potential processing time. Upon successful submission, a task ID (task_id) is returned. Developers need to poll GET /api/v1/llm/tasks/{task_id} to check status (pending, running, succeeded, or failed), with a recommended interval of 2–5 seconds.
  • Payment Integration: If the task involves payment (priced at 0.5 CNY per use), the initial request may return HTTP 402 with WeChat Pay details. Developers must ensure the Agent has the WeChat Pay extension (weixinpay extension) installed. Then, initiate payment, and upon success, retry the request with the same JSON body, adding WeixinPay-Required and X-Payment-Id headers.
  • Fetching Results: After task success, extract the output image URL from data.result.data[].url in the response for further use.

Applicability and Considerations

  • Payment Dependency: Before invocation, verify if the Agent supports WeChat Pay. If not, terminate the flow and notify the user with a message like "Current Agent does not support paid creation capabilities."
  • Asynchronous Delays: Due to async execution, response times can vary from seconds to minutes; developers should set reasonable timeouts (e.g., 3–5 minutes) and avoid blocking the main thread.
  • Error Handling: Common errors include HTTP 400 (invalid request or missing parameters), 402 (payment required but not completed), 404 (model not enabled), and 503 (service unavailable). For failed tasks, check data.error_message for sanitized error details.
  • Transparent Pricing: Before submitting paid tasks, clearly display the service name and price (0.5 CNY/use) to the user for confirmation to prevent unexpected charges.

Use Cases

  • E-commerce operators need to batch edit product images, adding promotional text or resizing based on descriptions to fit different platform requirements.
  • Designers in prototype iterations quickly modify reference images via text prompts to generate multiple design variants for comparison.
  • Content creators process user-uploaded images, using the API to automatically apply filters and watermarks for brand visual consistency.
  • Marketing teams create social media ad materials, editing product images based on copy descriptions to generate promotional content.

Best For

  • Backend developers for social platforms who need to automatically crop user avatars to uniform sizes and apply beautification effects.
  • Digital marketing specialists who need to batch generate ad images weekly based on marketing campaign descriptions.
  • Product managers who wish to integrate image editing functionality into their applications via API.
  • E-commerce operations managers who need to process client-uploaded images and automatically add brand identifiers.