This page provides a ready-to-use Agent Skill: drop it into your coding agent and call APIYI’s Tencent Hunyuan Hy-Image 3.5 Preview (
hy-image-v3.5-preview-2k / hy-image-v3.5-preview-4k) in natural language or with explicit commands. It is just two files; copy and use.What the Skill Does
One script that switches behavior based on whether reference images are supplied:Text-to-Image
Prompt only → a 2048×2048 (2K) or 4096×4096 (4K) image, with strong Chinese text rendering.
Reference-Image Generation
One local image + instruction → style transfer, composition preservation, or local edits.
Multi-Image Fusion
Multiple images + one instruction → combine subjects in a single scene; refer to them as “image 1 / image 2”.
Which Agents Can Use It
A Skill is essentially a folder: a
SKILL.md instruction file for the agent and a script that does the work. Any coding agent that can read local files and run shell commands can use it — Codex, Claude Code, Cursor, and others. The only requirements are Python 3 and network access to api.apiyi.com.Three-Step Setup
① Create the folder and add the files
Create a skill folder with these two files:② Add your key
Write your APIYI API key (created in theapi.apiyi.com console) to hunyuan-image/.env:
.env automatically.
③ Hand it to your agent
- Agents with skill discovery (such as Claude Code): put the whole
hunyuan-image/folder in the skill directory —~/.claude/skills/for personal use or.claude/skills/for project use. - Other agents: follow their skill/plugin convention, or simply tell the agent to read
SKILL.mdin the folder and follow it.
SKILL.md
Createhunyuan-image/SKILL.md with the following content:
scripts/hunyuan_image.py
Createhunyuan-image/scripts/hunyuan_image.py with the following content (standard library only, no pip install):
Usage
Natural language (implicit invocation)
Once installed, just talk to your agent:Explicit invocation
-
Agents with slash commands (such as Claude Code):
-
Any agent / direct script call:
Where the Images Go
- When
-ois a bare filename (such as-o poster.png), images go to thehunyuan-output/folder in the project root (created automatically). - “Project root” is the first directory containing
.gitor.claudewhen walking up from the script location. The images always land inside the project, never in a temporary directory. - The script prints the full absolute path of every image.
- Default is one image;
-n 3generates three (max 5, automatically capped), with-1,-2,-3suffixes.
Hunyuan Hy-Image 3.5 has content safety controls. If the script reports
HTTP 400 (content_safety_violation), the prompt was blocked. Adjust the content; do not retry the same prompt.