by wwwzhouhui · v0.0.2
AI text-to-video generation plugin powered by JXINCM Sora-2 API. Create high-quality videos from text prompts.
This community listing does not yet include every recommended support, privacy, pricing, and permission disclosure. Review the available package permissions before installing.
Available inside your emploidai workspace after installation.
Available inside your emploidai workspace after installation.
中文 | English
This is a comprehensive Dify plugin based on JXINCM Sora-2 API that supports both text-to-video and image-to-video generation modes. Generate high-quality videos from text descriptions or create animated videos from image URLs, with real-time progress tracking. The plugin offers rich features including landscape/portrait orientation, watermark control, and multiple model selection.
jxincm_sora2/
├── manifest.yaml # Plugin manifest file
├── main.py # Plugin entry point
├── requirements.txt # Python dependencies
├── README.md # English documentation
├── README_CN.md # Chinese documentation
├── PRIVACY.md # Privacy policy
├── icon.svg # Plugin icon
├── provider/ # Service provider configuration
│ ├── jxincm.yaml # JXINCM provider config
│ └── jxincm_provider.py # Provider implementation
└── tools/ # Tool implementation
├── text2video.yaml # Video generation tool config
└── text2video.py # Video generation tool implementation
pip install -r requirements.txt
portrait: Vertical (suitable for mobile short videos)landscape: Horizontal (suitable for widescreen playback)large (high quality)sora-2: Standard quality modelsora-2-pro: High quality modelExample:
Prompt: "A golden retriever playing in a sunny park with children running around"
Orientation: portrait
Size: large
Model: sora-2
Duration: 15 seconds
Watermark: No
Private: Yes
Image URLs: (leave empty)
→ Generate text-to-video
https://example.com/image.jpghttps://example.com/img1.jpg, https://example.com/img2.jpghttps://example.com/img1.jpg
https://example.com/img2.jpg
Example:
Prompt: "make animate"
Orientation: portrait
Image URLs: https://filesystem.site/cdn/20250612/VfgB5ubjInVt8sG6rzMppxnu7gEfde.png
→ Generate image-to-video
For best video generation results, we recommend:
Text-to-Video Prompts:
Example:
A golden retriever playing in a sunny park with children running around,
camera slowly pushing in and orbiting, bright natural lighting
Image-to-Video Prompts:
Example:
make animate
bring the scene to life
add natural dynamic effects
# 1. Create video task (using JSON format)
POST https://api.jxincm.cn/v1/video/create
Headers:
- Authorization: Bearer {api_key}
- Content-Type: application/json
Body:
{
"prompt": "description",
"model": "sora-2",
"orientation": "portrait",
"size": "large",
"duration": 15,
"watermark": false,
"private": true,
"images": [] # Empty for text-to-video, contains URLs for image-to-video
}
# 2. Poll for status
GET https://api.jxincm.cn/v1/video/query?id={video_id}
Response: {
"id": "sora-2:task_xxx",
"status": "completed",
"progress": 100,
"detail": {
"url": "https://.../video.mp4",
"thumbnail": "https://.../thumbnail.jpg",
"gif": "https://.../preview.gif"
}
}
Task Creation:
# Build request body
payload = {
"prompt": prompt,
"model": model,
"orientation": orientation,
"size": size,
"duration": 15,
"watermark": watermark,
"private": private,
"images": image_urls if image_urls else [] # Auto-switch mode
}
Progress Polling:
while attempt < max_attempts:
response = conn.request("GET", f"/v1/video/query?id={video_id}")
status = data.get("status")
progress = data.get("progress")
if status == "completed":
# Extract video URL, thumbnail, GIF
video_url = detail.get("url")
thumbnail_url = detail.get("thumbnail")
gif_url = detail.get("gif")
Invalid API Key
Generation Timeout
Invalid Image URL
Prompt Rejected
401: Invalid or unauthorized API Key429: API call rate limit exceeded500: Internal server errorTimeout: Request timeout (network or server issue)Please refer to PRIVACY.md for detailed information about data handling and privacy policy.
Key points:
This plugin follows Dify plugin development best practices:
Welcome to submit Issues and Pull Requests to improve this plugin!
This project is licensed under the MIT License.