jimeng_mcp_skill
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese即梦 AI 生成技能
Jimeng AI Generation Skill
概述
Overview
即梦技能通过 jimeng-mcp-server 实现 AI 驱动的图像和视频生成,这是一个集成了即梦 AI 多模态生成能力的 MCP(模型上下文协议)服务器。使用此技能可以直接通过自然语言指令创建视觉内容。
核心能力:
- 🎨 文本生成图像:从文本描述生成高质量图像
- 🎭 图像合成:智能合并和融合多张图片
- 🎬 文本生成视频:从文本提示创建短视频
- 🎞️ 图像生成视频:为静态图像添加动画效果
何时使用此技能:
- 用户要求生成、创建或制作图像或视频
- 用户提到"jimeng"、"即梦"或请求AI视觉内容生成
- 用户提供文本描述并希望得到视觉输出
- 用户想要组合、合并或合成多张图片
- 用户想为静态图像添加动画或运动效果
The Jimeng Skill enables AI-driven image and video generation through jimeng-mcp-server, an MCP (Model Context Protocol) server integrated with Jimeng AI's multimodal generation capabilities. This skill allows you to create visual content directly through natural language instructions.
Core Capabilities:
- 🎨 Text-to-Image: Generate high-quality images from text descriptions
- 🎭 Image Synthesis: Intelligently merge and blend multiple images
- 🎬 Text-to-Video: Create short videos from text prompts
- 🎞️ Image-to-Video: Add animation effects to static images
When to Use This Skill:
- Users request to generate, create or produce images or videos
- Users mention "jimeng", "Jimeng" or request AI visual content generation
- Users provide text descriptions and expect visual outputs
- Users want to combine, merge or synthesize multiple images
- Users want to add animation or motion effects to static images
前置条件
Prerequisites
使用此技能前,请确保 jimeng-mcp-server 已正确配置:
-
服务器必须运行,通过以下模式之一:
- stdio 模式:在 MCP 客户端(Claude Desktop、Cherry Studio)中配置
- SSE 模式:作为带 SSE 传输的 HTTP 服务器运行
- HTTP 模式:作为 REST API 服务器运行
-
环境变量已配置:
- :您的即梦 API 密钥(从即梦网站 cookies 获取)
JIMENG_API_KEY - :API 端点(默认:http://127.0.0.1:8001)
JIMENG_API_URL - :模型名称(默认:jimeng-4.5)
JIMENG_MODEL
-
后端 API 运行中:jimeng-free-api-all Docker 容器必须处于活动状态
详细的设置说明请参考 。
references/setup_guide.mdBefore using this skill, ensure jimeng-mcp-server is properly configured:
-
Server Must Be Running, in one of the following modes:
- stdio Mode: Configured in MCP clients (Claude Desktop, Cherry Studio)
- SSE Mode: Run as an HTTP server with SSE transmission
- HTTP Mode: Run as a REST API server
-
Environment Variables Configured:
- : Your Jimeng API key (obtained from Jimeng website cookies)
JIMENG_API_KEY - : API endpoint (default: http://127.0.0.1:8001)
JIMENG_API_URL - : Model name (default: jimeng-4.5)
JIMENG_MODEL
-
Backend API Running: The jimeng-free-api-all Docker container must be active
For detailed setup instructions, refer to .
references/setup_guide.md快速开始
Quick Start
基本使用模式
Basic Usage Workflow
当用户请求图像或视频生成时,遵循以下工作流程:
- 识别任务类型,基于用户输入
- 提取必需参数,从请求中获取
- 调用相应的 jimeng-mcp-server 工具
- 返回生成的内容 URL 给用户
When users request image or video generation, follow this workflow:
- Identify Task Type based on user input
- Extract Required Parameters from the request
- Call the Corresponding jimeng-mcp-server Tool
- Return Generated Content URLs to the user
示例请求
Example Requests
文本生成图像:
用户:"用即梦生成一张图片:樱花树下的柴犬"
→ 使用 text_to_image 工具,参数 prompt="樱花树下的柴犬"图像合成:
用户:"帮我合成这两张图片,风格偏向第一张"
→ 使用 image_composition 工具,提供图片 URL文本生成视频:
用户:"创建一个5秒视频:小马过河的故事场景"
→ 使用 text_to_video 工具,设置提示词和时长图像生成视频:
用户:"为这张图片添加动画效果"
→ 使用 image_to_video 工具,提供图片 URLText-to-Image:
User: "Generate an image with Jimeng: Shiba Inu under cherry blossom trees"
→ Use the text_to_image tool with parameter prompt="Shiba Inu under cherry blossom trees"Image Synthesis:
User: "Help me synthesize these two images, with the style leaning towards the first one"
→ Use the image_composition tool and provide image URLsText-to-Video:
User: "Create a 5-second video: Scene of a pony crossing a river"
→ Use the text_to_video tool, set the prompt and durationImage-to-Video:
User: "Add animation effects to this image"
→ Use the image_to_video tool and provide the image URL核心能力
Core Capabilities
1. 文本生成图像
1. Text-to-Image
使用即梦 4.5 引擎从文本描述生成图像。
工具:
text_to_image参数:
- (必需):期望图像的文本描述
prompt - (可选):模型版本(默认:jimeng-4.5)
model - (可选):图像宽高比("1:1", "4:3", "3:4", "16:9", "9:16")
ratio - (可选):分辨率预设("1k", "2k", "4k",默认:2k)
resolution - (可选):要在生成图像中避免的元素
negativePrompt
常见宽高比:
- 16:9 → 横向/宽屏(视频封面、Banner)
- 1:1 → 正方形(头像、社交媒体)
- 9:16 → 竖向/手机屏幕(短视频封面)
- 4:3 → 标准横向(博客配图)
- 3:4 → 标准竖向(人像照片)
使用示例:
python
undefinedGenerate images from text descriptions using the Jimeng 4.5 engine.
Tool:
text_to_imageParameters:
- (required): Text description of the desired image
prompt - (optional): Model version (default: jimeng-4.5)
model - (optional): Image aspect ratio ("1:1", "4:3", "3:4", "16:9", "9:16")
ratio - (optional): Resolution preset ("1k", "2k", "4k", default: 2k)
resolution - (optional): Elements to avoid in the generated image
negativePrompt
Common Aspect Ratios:
- 16:9 → Landscape/widescreen (video covers, banners)
- 1:1 → Square (avatars, social media)
- 9:16 → Portrait/mobile screen (short video covers)
- 4:3 → Standard landscape (blog illustrations)
- 3:4 → Standard portrait (portrait photos)
Usage Example:
python
undefined用户请求:"生成一张图片:夕阳下的海滩,有椰子树"
User request: "Generate an image: Beach at sunset with coconut trees"
{
"model": "jimeng-4.5",
"prompt": "夕阳下的海滩,有椰子树",
"ratio": "16:9",
"resolution": "2k"
}
**返回结果:**
返回包含多张图片 URL 的数组,可显示或下载。
**提示:**
- 更高分辨率(4k)适合印刷品和高质量展示
- 较低分辨率(1k)适合快速预览
- 使用描述性提示词以获得更好的结果
- 指定艺术风格、光照、氛围以增强控制{
"model": "jimeng-4.5",
"prompt": "Beach at sunset with coconut trees",
"ratio": "16:9",
"resolution": "2k"
}
**Return Result:**
Returns an array containing multiple image URLs, which can be displayed or downloaded.
**Tips:**
- Higher resolution (4k) is suitable for print and high-quality displays
- Lower resolution (1k) is suitable for quick previews
- Use descriptive prompts for better results
- Specify art style, lighting, and atmosphere to enhance control2. 图像合成
2. Image Synthesis
通过智能融合合并和混合多张图片。
工具:
image_composition参数:
- (必需):如何合成图片的描述
prompt - (必需):要合成的 2-5 个图片 URL 数组
images - (可选):模型版本(默认:jimeng-4.5)
model - (可选):输出图像宽高比("1:1", "4:3", "3:4", "16:9", "9:16")
ratio - (可选):分辨率预设("1k", "2k", "4k",默认:2k)
resolution
使用示例:
python
undefinedMerge and blend multiple images through intelligent fusion.
Tool:
image_compositionParameters:
- (required): Description of how to synthesize the images
prompt - (required): Array of 2-5 image URLs to synthesize
images - (optional): Model version (default: jimeng-4.5)
model - (optional): Output image aspect ratio ("1:1", "4:3", "3:4", "16:9", "9:16")
ratio - (optional): Resolution preset ("1k", "2k", "4k", default: 2k)
resolution
Usage Example:
python
undefined用户请求:"合成这两张图,保留第一张的风格"
User request: "Synthesize these two images, retaining the style of the first one"
{
"model": "jimeng-4.5",
"prompt": "将两张图片无缝融合,保持第一张图片的艺术风格",
"images": [
"https://example.com/image1.jpg",
"https://example.com/image2.jpg"
],
"ratio": "4:3",
"resolution": "2k"
}
**使用场景:**
- 将人像与背景融合
- 图片之间的风格迁移
- 创建艺术合成作品
- 合并多张照片的元素
**提示:**
- 在提示词中提供清晰的合成说明
- 图片应具有兼容的分辨率
- 描述期望的混合风格(无缝、艺术、真实){
"model": "jimeng-4.5",
"prompt": "Seamlessly blend the two images while maintaining the artistic style of the first image",
"images": [
"https://example.com/image1.jpg",
"https://example.com/image2.jpg"
],
"ratio": "4:3",
"resolution": "2k"
}
**Usage Scenarios:**
- Blend portraits with backgrounds
- Style transfer between images
- Create artistic composite works
- Merge elements from multiple photos
**Tips:**
- Provide clear synthesis instructions in the prompt
- Images should have compatible resolutions
- Describe the desired blending style (seamless, artistic, realistic)3. 文本生成视频
3. Text-to-Video
从文本描述创建短视频。
工具:
text_to_video参数:
- (必需):视频场景的文本描述
prompt - (可选):模型版本(默认:jimeng-video-3.0)
model - (可选):视频宽高比("16:9", "9:16", "4:3", "3:4", "1:1")
ratio - (可选):预设分辨率("480p", "720p", "1080p")
resolution
分辨率预设:
- "480p" → 快速预览
- "720p" → 平衡质量/速度(推荐)
- "1080p" → 高质量
使用示例:
python
undefinedCreate short videos from text descriptions.
Tool:
text_to_videoParameters:
- (required): Text description of the video scene
prompt - (optional): Model version (default: jimeng-video-3.0)
model - (optional): Video aspect ratio ("16:9", "9:16", "4:3", "3:4", "1:1")
ratio - (optional): Preset resolution ("480p", "720p", "1080p")
resolution
Resolution Presets:
- "480p" → Quick preview
- "720p" → Balanced quality/speed (recommended)
- "1080p" → High quality
Usage Example:
python
undefined用户请求:"生成5秒视频:小猫在钓鱼"
User request: "Generate a 5-second video: Kitten fishing"
{
"model": "jimeng-video-3.0",
"prompt": "一只橘色小猫坐在河边,手持鱼竿专注地钓鱼,阳光明媚",
"ratio": "16:9",
"resolution": "720p"
}
**视频特性:**
- 时长:通常 3-5 秒
- 格式:MP4
- 生成时间:30-60 秒
- 帧率:24-30 fps
**提示:**
- 包含场景细节、动作和氛围
- 保持提示词专注于单一清晰的动作
- 指定一天中的时间、天气或情绪以获得更好的结果
- 从 720p 开始以平衡质量和速度{
"model": "jimeng-video-3.0",
"prompt": "An orange kitten sitting by the river, holding a fishing rod and focusing on fishing, sunny weather",
"ratio": "16:9",
"resolution": "720p"
}
**Video Features:**
- Duration: Typically 3-5 seconds
- Format: MP4
- Generation Time: 30-60 seconds
- Frame Rate: 24-30 fps
**Tips:**
- Include scene details, actions, and atmosphere
- Keep prompts focused on a single clear action
- Specify time of day, weather, or mood for better results
- Start with 720p to balance quality and speed4. 图像生成视频动画
4. Image-to-Video Animation
为静态图像添加运动和动画效果。
工具:
image_to_video参数:
- (必需):期望动画效果的描述
prompt - (必需):要添加动画的图片 URL 数组
file_paths - (可选):模型版本(默认:jimeng-video-3.0)
model - (可选):视频宽高比("16:9", "9:16", "4:3", "3:4", "1:1")
ratio - (可选):预设分辨率("480p", "720p", "1080p")
resolution
使用示例:
python
undefinedAdd motion and animation effects to static images.
Tool:
image_to_videoParameters:
- (required): Description of the desired animation effect
prompt - (required): Array of image URLs to animate
file_paths - (optional): Model version (default: jimeng-video-3.0)
model - (optional): Video aspect ratio ("16:9", "9:16", "4:3", "3:4", "1:1")
ratio - (optional): Preset resolution ("480p", "720p", "1080p")
resolution
Usage Example:
python
undefined用户请求:"让这张照片动起来,添加轻柔的镜头缩放"
User request: "Animate this photo with gentle camera zoom"
{
"model": "jimeng-video-3.0",
"prompt": "添加轻柔的运动效果和自然的镜头缩放,营造电影感",
"file_paths": ["https://example.com/photo.jpg"],
"ratio": "16:9",
"resolution": "720p"
}
**动画类型:**
- 人物动作(Character motion)
- 镜头运动(Camera movements)
- 场景转换(Scene transitions)
- 环境效果(Environmental effects:风、雨等)
**提示:**
- 描述期望的运动类型
- 选择效果时考虑图像内容
- 人像照片适合细微的动作
- 风景照片适合平移/缩放效果{
"model": "jimeng-video-3.0",
"prompt": "Add gentle motion effects and natural camera zoom to create a cinematic feel",
"file_paths": ["https://example.com/photo.jpg"],
"ratio": "16:9",
"resolution": "720p"
}
**Animation Types:**
- Character motion
- Camera movements
- Scene transitions
- Environmental effects (wind, rain, etc.)
**Tips:**
- Describe the desired type of motion
- Consider image content when selecting effects
- Portrait photos suit subtle movements
- Landscape photos suit pan/zoom effects工作流程指南
Workflow Guide
决策树
Decision Tree
收到用户请求
│
├─ 包含"生成图片"或"create image"?
│ └─ 是 → 使用 text_to_image
│
├─ 包含"合成"或"merge/blend images"?
│ └─ 是 → 使用 image_composition
│
├─ 包含"生成视频"或"create video"?
│ └─ 是 → 使用 text_to_video
│
└─ 包含"动画"或"animate image"?
└─ 是 → 使用 image_to_videoReceive User Request
│
├─ Contains "generate image" or "create image"?
│ └─ Yes → Use text_to_image
│
├─ Contains "synthesize" or "merge/blend images"?
│ └─ Yes → Use image_composition
│
├─ Contains "generate video" or "create video"?
│ └─ Yes → Use text_to_video
│
└─ Contains "animate" or "animate image"?
└─ Yes → Use image_to_video参数提取
Parameter Extraction
处理用户请求时:
- 提取提示词:用户对期望内容的描述
- 识别宽高比:提取尺寸偏好(横向/竖向/正方形)对应 ratio 参数
- 解析分辨率需求:寻找质量要求,对应 resolution 参数
- 收集图片 URL:用于合成和动画任务
When processing user requests:
- Extract Prompt: User's description of the desired content
- Identify Aspect Ratio: Extract size preferences (landscape/portrait/square) corresponding to the ratio parameter
- Parse Resolution Requirements: Look for quality requirements corresponding to the resolution parameter
- Collect Image URLs: For synthesis and animation tasks
错误处理
Error Handling
如果工具执行失败:
- 检查服务器状态:验证 jimeng-mcp-server 是否运行
- 验证 API 密钥:确保 JIMENG_API_KEY 已配置
- 检查参数:确认所有必需字段已提供
- 检查图片 URL:验证合成/动画的 URL 是否可访问
- 清晰报告错误:解释问题并建议解决方案
常见错误:
- :在环境中设置 JIMENG_API_KEY
API key not configured - :启动 jimeng-free-api-all Docker 容器
Server not responding - :确保 URL 公开可访问
Invalid image URL - :大型视频可能需要 60+ 秒
Generation timeout
If tool execution fails:
- Check Server Status: Verify if jimeng-mcp-server is running
- Validate API Key: Ensure JIMENG_API_KEY is configured
- Check Parameters: Confirm all required fields are provided
- Check Image URLs: Verify URLs for synthesis/animation are accessible
- Report Errors Clearly: Explain the problem and suggest solutions
Common Errors:
- : Set JIMENG_API_KEY in the environment
API key not configured - : Start the jimeng-free-api-all Docker container
Server not responding - : Ensure the URL is publicly accessible
Invalid image URL - : Large videos may take 60+ seconds
Generation timeout
高级用法
Advanced Usage
组合多个工具
Combine Multiple Tools
对于复杂的创意任务,可以链式使用工具:
示例:创建动画艺术作品
- 使用 生成基础图像
text_to_image - 使用 为结果添加动画
image_to_video
示例:合成和优化
- 使用 合成图片
image_composition - 使用调整后的提示词生成变体
For complex creative tasks, tools can be used in a chain:
Example: Create Animated Artwork
- Use to generate a base image
text_to_image - Use to add animation to the result
image_to_video
Example: Synthesize and Optimize
- Use to synthesize images
image_composition - Generate variants with adjusted prompts
优化技巧
Optimization Tips
加快生成速度:
- 使用较低分辨率(720p 而非 1080p,或 1k 而非 2k)
- 保持提示词简洁但具有描述性
提高质量:
- 使用详细、具体的提示词
- 根据场景选择合适的 ratio(宽高比)
- 使用更高的 resolution(2k 或 4k)
- 指定艺术风格和技术
- 包含光照和氛围描述
Speed Up Generation:
- Use lower resolution (720p instead of 1080p, or 1k instead of 2k)
- Keep prompts concise yet descriptive
Improve Quality:
- Use detailed, specific prompts
- Select appropriate ratio based on the scene
- Use higher resolution (2k or 4k)
- Specify art style and techniques
- Include lighting and atmosphere descriptions
批量处理
Batch Processing
当用户请求多次生成时:
- 按顺序处理请求(一次一个)
- 为每个项目提供进度更新
- 在最终响应前收集所有结果
- 考虑资源限制(API 配额)
When users request multiple generations:
- Process requests sequentially (one at a time)
- Provide progress updates for each item
- Collect all results before final response
- Consider resource limits (API quotas)
故障排除
Troubleshooting
服务器连接问题
Server Connection Issues
症状:工具返回连接错误
解决方案:
- 检查 jimeng-free-api-all Docker 容器是否运行:
bash
docker ps | grep jimeng - 验证服务器是否可访问:
bash
curl http://127.0.0.1:8001/health - 如有需要重启 Docker 容器
Symptom: Tool returns connection errors
Solutions:
- Check if the jimeng-free-api-all Docker container is running:
bash
docker ps | grep jimeng - Verify server accessibility:
bash
curl http://127.0.0.1:8001/health - Restart the Docker container if needed
API 密钥问题
API Key Issues
症状:"Invalid API key"或身份验证错误
解决方案:
- 验证 .env 文件中的 JIMENG_API_KEY
- 从即梦网站 cookies 获取新的 API 密钥(sessionid 值)
- 确保密钥格式正确(无额外空格或引号)
Symptom: "Invalid API key" or authentication errors
Solutions:
- Verify JIMENG_API_KEY in the .env file
- Obtain a new API key from Jimeng website cookies (sessionid value)
- Ensure the key format is correct (no extra spaces or quotes)
生成质量问题
Generation Quality Issues
症状:质量差或意外结果
解决方案:
- 使用更具体的细节优化提示词
- 调整 参数选择合适的宽高比
ratio - 尝试不同的 分辨率
resolution - 添加 以排除不需要的元素
negativePrompt
Symptom: Poor quality or unexpected results
Solutions:
- Optimize prompts with more specific details
- Adjust the parameter to select an appropriate aspect ratio
ratio - Try different settings
resolution - Add to exclude unwanted elements
negativePrompt
超时错误
Timeout Errors
症状:生成时间过长或超时
解决方案:
- 视频生成通常需要 30-60 秒 - 请耐心等待
- 如果持续超时,尝试较低分辨率
- 检查服务器资源使用情况
- 验证到即梦 API 的网络连接
Symptom: Generation takes too long or times out
Solutions:
- Video generation typically takes 30-60 seconds - please be patient
- If timeouts persist, try lower resolution
- Check server resource usage
- Verify network connection to Jimeng API
资源
Resources
references/
references/
- :详细的安装和配置说明
setup_guide.md - :所有工具的完整 API 文档
api_reference.md
- : Detailed installation and configuration instructions
setup_guide.md - : Complete API documentation for all tools
api_reference.md
项目链接
Project Links
- GitHub Repository: https://github.com/wwwzhouhui/jimeng-mcp-server
- Backend API: https://github.com/wwwzhouhui/jimeng-free-api-all
- Jimeng Official Website: https://jimeng.jianying.com/
最佳实践
Best Practices
- 始终在尝试生成前验证服务器状态
- 根据用例和速度要求使用适当的分辨率(ratio 控制比例,resolution 控制清晰度)
- 提供详细的提示词以获得更好的生成质量
- 优雅地处理错误并提供清晰的用户反馈
- 处理多个请求时考虑速率限制
- 在复杂合成前先用简单提示词测试
- 缓存常用参数,如首选 ratio 和 resolution
- Always Verify Server Status Before Attempting Generation
- Use Appropriate Resolution Based on Use Case and Speed Requirements (ratio controls aspect ratio, resolution controls clarity)
- Provide Detailed Prompts for Better Generation Quality
- Handle Errors Gracefully and Provide Clear User Feedback
- Consider Rate Limits When Processing Multiple Requests
- Test with Simple Prompts Before Complex Synthesis
- Cache Frequently Used Parameters such as preferred ratio and resolution
限制
Limitations
- 免费层限制:官方即梦 API 每天 66 积分
- 视频时长:通常限制为 3-10 秒
- 生成时间:视频可能需要 30-60 秒生成
- 图像合成:2-3 张图片效果最佳,最多支持 5 张
- 服务器依赖:需要 jimeng-free-api-all 后端运行
- 网络要求:必须有互联网访问以调用即梦 API
- Free Tier Limits: Official Jimeng API allows 66 credits per day
- Video Duration: Typically limited to 3-10 seconds
- Generation Time: Videos may take 30-60 seconds to generate
- Image Synthesis: Best results with 2-3 images, maximum 5 images supported
- Server Dependency: Requires jimeng-free-api-all backend to run
- Network Requirements: Internet access required to call Jimeng API