Overview
The Jimeng skill enables AI-driven image and video generation through jimeng-mcp-server, an MCP (Model Context Protocol) server that integrates Jimeng AI's multimodal generation capabilities. Use this skill to create visual content directly through natural language instructions.
Core capabilities:
- 🎨 Text-to-image: Generate high-quality images from text descriptions
- 🎭 Image composition: 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:
- The user asks to generate, create, or produce an image or video
- The user mentions "jimeng", "Jimeng", or requests AI visual content generation
- The user provides a text description and wants visual output
- The user wants to combine, merge, or composite multiple images
- The user wants to add animation or motion effects to a static image
Prerequisites
Before using this skill, make sure jimeng-mcp-server is correctly configured:
-
The server must be running, through one of the following modes:
- stdio mode: Configured in an MCP client (Claude Desktop, Cherry Studio)
- SSE mode: Running as an HTTP server with SSE transport
- HTTP mode: Running as a REST API server
-
Environment variables are configured:
JIMENG_API_KEY: Your Jimeng API key (obtained from Jimeng website cookies)JIMENG_API_URL: API endpoint (default:http://127.0.0.1:8001)JIMENG_MODEL: Model name (default: jimeng-4.5)
-
Backend API is 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 Pattern
When the user requests image or video generation, follow this workflow:
- Identify the task type, based on the user input
- Extract the required parameters, from the request
- Call the corresponding jimeng-mcp-server tool
- Return the generated content URL to the user
Example requests
Text-to-image:
用户:"用即梦生成一张图片:樱花树下的柴犬"
→ 使用 text_to_image 工具,参数 prompt="樱花树下的柴犬"
Image composition:
用户:"帮我合成这两张图片,风格偏向第一张"
→ 使用 image_composition 工具,提供图片 URL
Text-to-video:
用户:"创建一个5秒视频:小马过河的故事场景"
→ 使用 text_to_video 工具,设置提示词和时长
Image-to-video:
用户:"为这张图片添加动画效果"
→ 使用 image_to_video 工具,提供图片 URL
Core Capabilities
1. Text-to-image
Generate images from text descriptions using the Jimeng 4.5 engine.
Tool:text_to_image
Parameters:
prompt(required): The text description of the desired imagemodel(optional): Model version (default: jimeng-4.5)ratio(optional): Image aspect ratio ("1:1", "4:3", "3:4", "16:9", "9:16")resolution(Optional): Resolution preset ("1k", "2k", "4k", default: 2k)negativePrompt(Optional): Elements to avoid in the generated image
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 images)
- 3:4 → Standard portrait (portrait photos)
Usage example:
# 用户请求:"生成一张图片:夕阳下的海滩,有椰子树"
{
"model": "jimeng-4.5",
"prompt": "夕阳下的海滩,有椰子树",
"ratio": "16:9",
"resolution": "2k"
}
Returned result: Returns an array containing multiple image URLs, which can be displayed or downloaded.
Tips:
- Higher resolution (4k) is suitable for print materials and high-quality displays
- Lower resolution (1k) is suitable for quick previews
- Use descriptive prompts to get better results
- Specify art style, lighting, and atmosphere to enhance control
2. Image composition
Merge and blend multiple images through intelligent fusion.
Tool:image_composition
Parameters:
prompt(Required): Description of how to compose the imagesimages(Required): Array of 2-5 image URLs to composemodel(Optional): Model version (default: jimeng-4.5)ratio(Optional): Output image aspect ratio ("1:1", "4:3", "3:4", "16:9", "9:16")resolution(Optional): Resolution preset ("1k", "2k", "4k", default: 2k)
Usage example:
# 用户请求:"合成这两张图,保留第一张的风格"
{
"model": "jimeng-4.5",
"prompt": "将两张图片无缝融合,保持第一张图片的艺术风格",
"images": [
"https://example.com/image1.jpg",
"https://example.com/image2.jpg"
],
"ratio": "4:3",
"resolution": "2k"
}
Use cases:
- Blend a portrait with a background
- Style transfer between images
- Create artistic composite works
- Merge elements from multiple photos
Tips:
- Provide clear composition instructions in the prompt
- Images should have compatible resolutions
- Describe the desired blending style (seamless, artistic, realistic)
3. Text to video
Create short videos from text descriptions.
Tool:text_to_video
Parameters:
prompt(Required): Text description of the video scenemodel(Optional): Model version (default: jimeng-video-3.0)ratio(Optional): Video aspect ratio ("16:9", "9:16", "4:3", "3:4", "1:1")resolution(Optional): Resolution preset ("480p", "720p", "1080p")
Resolution presets:
- "480p" → Quick preview
- "720p" → Balanced quality/speed (recommended)
- "1080p" → High quality
Usage example:
# 用户请求:"生成5秒视频:小猫在钓鱼"
{
"model": "jimeng-video-3.0",
"prompt": "一只橘色小猫坐在河边,手持鱼竿专注地钓鱼,阳光明媚",
"ratio": "16:9",
"resolution": "720p"
}
Video features:
- Duration: usually 3-5 seconds
- Format: MP4
- Generation time: 30-60 seconds
- Frame rate: 24-30 fps
Tips:
- Include scene details, actions, and atmosphere
- Keep the prompt focused on a single clear action
- Specify the time of day, weather, or mood for better results
- Start with 720p to balance quality and speed
4. Image to video animation
Add motion and animation effects to static images.
Tool:image_to_video
Parameters:
prompt(Required): Description of the desired animation effectfile_paths(Required): Array of image URLs to animatemodel(Optional): Model version (default: jimeng-video-3.0)ratio(Optional): Video aspect ratio ("16:9", "9:16", "4:3", "3:4", "1:1")resolution(Optional): Preset resolution ("480p", "720p", "1080p")
Usage example:
# 用户请求:"让这张照片动起来,添加轻柔的镜头缩放"
{
"model": "jimeng-video-3.0",
"prompt": "添加轻柔的运动效果和自然的镜头缩放,营造电影感",
"file_paths": ["https://example.com/photo.jpg"],
"ratio": "16:9",
"resolution": "720p"
}
Animation type:
- Character motion
- Camera movements
- Scene transitions
- Environmental effects: wind, rain, etc.
Tips:
- Describe the desired type of motion
- Consider the image content when choosing effects
- Portrait photos are suitable for subtle movements
- Landscape photos are suitable for 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_video
Parameter extraction
When handling user requests:
- Extract prompt: the user's description of the desired content
- Identify aspect ratio: extract the size preference (landscape/portrait/square) corresponding to the ratio parameter
- Parse resolution requirements: look for quality requirements, corresponding to the resolution parameter
- Collect image URLs: used for composition and animation tasks
Error handling
If tool execution fails:
- Check server status: verify whether jimeng-mcp-server is running
- Verify API key: ensure JIMENG_API_KEY is configured
- Check parameters: confirm that all required fields are provided
- Check image URLs: verify whether the URLs for composition/animation are accessible
- Report errors clearly: explain the problem and suggest solutions
Common errors:
API key not configured: set JIMENG_API_KEY in the environmentServer not responding: start the jimeng-free-api-all Docker containerInvalid image URL: ensure the URL is publicly accessibleGeneration timeout: large videos may take 60+ seconds
Advanced usage
Combine multiple tools
For complex creative tasks, tools can be chained:
Example: Create animated artwork
- Use
text_to_imageto generate a base image - Use
image_to_videoto animate the result
Example: Composition and optimization
- Use
image_compositionto compose images - Generate variations using the adjusted prompt
Optimization tips
Speed up generation:
- Use a lower resolution (720p instead of 1080p, or 1k instead of 2k)
- Keep prompts concise but descriptive
Improve quality:
- Use detailed, specific prompts
- Choose the appropriate ratio (aspect ratio) based on the scene
- Use a higher resolution (2k or 4k)
- Specify the art style and technique
- Include lighting and atmosphere descriptions
Batch processing
When the user requests multiple generations:
- Process requests sequentially (one at a time)
- Provide progress updates for each item
- Collect all results before the final response
- Consider resource limits (API quota)
Troubleshooting
Server connection issues
Symptoms: The tool returns a connection error
Solution:
- Check whether the jimeng-free-api-all Docker container is running:
docker ps | grep jimeng - Verify whether the server is accessible:
curl http://127.0.0.1:8001/health - Restart the Docker container if needed
API key issues
Symptoms: "Invalid API key" or authentication error
Solution:
- Verify JIMENG_API_KEY in the .env file
- Get a new API key (sessionid value) from the Jimeng website cookies
- Make sure the key format is correct (no extra spaces or quotes)
Generation quality issues
Symptoms: Poor quality or unexpected results
Solution:
- Use more specific details to refine the prompt
- Adjust the
ratioparameter to choose an appropriate aspect ratio - Try different
resolutionresolutions - Add
negativePromptto exclude unwanted elements
Timeout errors
Symptoms: Generation takes too long or times out
Solution:
- Video generation usually takes 30-60 seconds - please be patient
- If timeouts persist, try a lower resolution
- Check server resource usage
- Verify the network connection to the Jimeng API
Resources
references/
setup_guide.md: Detailed installation and configuration instructionsapi_reference.md: Complete API documentation for all tools
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
- Always verify server status before attempting generation
- Use an appropriate resolution based on the use case and speed requirements(ratio controls the aspect ratio, resolution controls clarity)
- Provide detailed promptsfor better generation quality
- Handle errors gracefullyand provide clear user feedback
- Consider rate limits when handling multiple requests
- Test with simple prompts before complex compositions
- Cache commonly used parameters, such as the preferred ratio and resolution
Limits
- Free tier limit: The official Jimeng API provides 66 credits per day
- Video duration: Usually limited to 3-10 seconds
- Generation time: Videos may take 30-60 seconds to generate
- Image composition: 2-3 images work best, with support for up to 5
- Server dependency: Requires the jimeng-free-api-all backend to be running
- Network requirements: Internet access is required to call the Jimeng API