Smart Image Editing
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/invokeor/api/v1/llm/tasksendpoints. The request body must includemodel,capability, andpayloadfields, wherepayloadrequirespromptandimages. 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, orfailed), 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, addingWeixinPay-RequiredandX-Payment-Idheaders. - Fetching Results: After task success, extract the output image URL from
data.result.data[].urlin 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_messagefor 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.
Related Skills
Restyle a short video into a new visual style while preserving core elements such as characters, actions, and composition, suitable for various creative conversions like anime, illustration, ink wash, etc.
Create Douyin vertical video covers from topics, hooks, or materials with support for creative generation, image synthesis, and refinement.
An AI tool that transforms real photos into specified illustration styles while preserving subject recognition.
An engineering-driven solution that integrates design styles, UX workflows, design systems, and multi-platform implementation to solve cross-project design consistency.