image-edit

Edit and transform existing images using text prompts via the z-ai-web-dev-sdk API.

Updated Mar 30, 2026
One-click install
npx skills add https://github.com/tmtgroupbot/lptracker-deploy --skill image-edit-tmtgroupbot
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: image-edit
Source: https://github.com/tmtgroupbot/lptracker-deploy/tree/main/skills/image-edit
Command: npx skills add https://github.com/tmtgroupbot/lptracker-deploy --skill image-edit-tmtgroupbot

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires z-ai-web-dev-sdk, and includes scripts (resource) components.

What problem does it solve? Modifying existing images—changing backgrounds, swapping elements, applying new styles, or creating variations—normally requires manual design work. This Skill lets you perform AI-driven image edits programmatically from backend JavaScript/TypeScript code or a CLI, returning base64-encoded results you can save directly. ## Core Features & Use Cases - Text-Guided Image Editing: Send an image URL or base64 data URL plus an edit prompt to the z-ai-web-dev-sdk images.generations.edit endpoint and receive a modified image. - Variations, Style Transfer & Element Replacement: Generate multiple variations of one image, convert photos to painting styles, or replace specific elements while preserving the rest of the composition. - CLI Tool: Run quick edits from the terminal with z-ai image-edit using prompt, image, output, and size flags. - Use Case: Redesign a product photo by replacing its white background with a wooden table scene, then batch-generate three lighting variations for an e-commerce listing. ## Quick Start Use the image-edit skill to change the background of ./photo.jpg to a sunset scene and save the result as ./edited.png.

Frequently Asked Questions about image-edit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I edit an existing image with AI in JavaScript?

Use the z-ai-web-dev-sdk images.generations.edit method with a prompt describing the edit and an images array containing objects with a url property. The response returns base64 image data you decode and save with Node's fs module.

How do I create image variations from one source image?

Call the edit endpoint repeatedly with the same source image but different prompt variations, such as changing background or lighting. The Skill includes batch editing and createVariations examples that loop over instruction lists and save each result.

Can I use z-ai-web-dev-sdk in client-side browser code?

No. The SDK must be used in backend code only, never in client-side code. Expose it through a server endpoint such as the provided Express.js example and call that endpoint from the frontend.

What image sizes does the edit API support?

Seven sizes are supported: 1024x1024, 768x1344, 864x1152, 1344x768, 1152x864, 1440x720, and 720x1440. Passing any other size value causes an error, so validate against this list before calling the API.

Why does my edited image not match the prompt intention?

Vague prompts like "make it better" produce poor results. Specify what to change and what to preserve, for example stating the base description, the modification, and elements to keep unchanged while maintaining composition.