app icon
Sora2 Video Tools
0.0.2

AI text-to-video generation plugin powered by JXINCM Sora-2 API. Create high-quality videos from text prompts.

wwwzhouhui/sora2_text2video1846 installs

ไธญๆ–‡ ๏ฝœ English

Project Source Code

Sora2 Text-to-Video / Image-to-Video Dify Plugin

๐Ÿ“– Project Overview

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.

โœจ Key Features

  • ๐ŸŽฌ Dual Mode Video Generation: Support both text-to-video and image-to-video modes
  • ๐Ÿ“ธ Multi-Image Support: Image-to-video mode supports multiple image URLs
  • ๐Ÿ”„ Smart Mode Switching: Automatically switch generation mode based on image URL input
  • ๐Ÿ“ Multiple Orientations: Support landscape and portrait video formats
  • ๐ŸŽฏ High-Quality Output: Powered by JXINCM Sora-2 and Sora-2-Pro models
  • ๐Ÿ”— Complete Result Return: Returns video URL, thumbnail, and GIF preview
  • ๐Ÿ”„ Real-time Progress Tracking: Display full process status from queued to completed
  • ๐Ÿ›ก๏ธ Comprehensive Error Handling: User-friendly error messages and solutions
  • ๐ŸŒ Bilingual Support: Supports both English and Chinese interface

๐Ÿ—๏ธ Project Architecture

๐Ÿš€ Quick Start

1. Get JXINCM API Key

  1. Visit JXINCM Official Website
  2. Register and login to your account
  3. Get your API Key

2. Install Dependencies

3. Install Plugin in Dify

  1. Upload the plugin folder to Dify plugin directory
  2. Enable the plugin in Dify management interface
  3. Configure JXINCM API Key

๐Ÿ”ง Usage

Mode 1: Text-to-Video

  1. Add "Text to Video" tool in Dify workflow
  2. Configure JXINCM API Key in plugin settings
  3. Input video description prompt
  4. Select video orientation:
    • : Vertical (suitable for mobile short videos)
    • : Horizontal (suitable for widescreen playback)
  5. Select video size: (high quality)
  6. Select model:
    • : Standard quality model
    • : High quality model
  7. Set video duration: Fixed at 15 seconds
  8. Choose whether to add watermark
  9. Choose whether to make it private
  10. Leave image URL parameter empty
  11. Run the tool to generate video

Example:

Mode 2: Image-to-Video

  1. Add "Text to Video" tool in Dify workflow
  2. Configure JXINCM API Key in plugin settings
  3. Input animation description prompt
  4. Input image URLs (supports the following formats):
    • Single URL:
    • Multiple URLs (comma-separated):
    • Multiple URLs (newline-separated):
  5. Configure other parameters (orientation, model, etc.)
  6. Run the tool to generate animated video

Example:

Prompt Suggestions

For best video generation results, we recommend:

Text-to-Video Prompts:

  • Detailed Description: Provide specific information about scenes, actions, camera movements, lighting
  • Clear Expression: Use concise and clear language
  • Camera Direction: Specify camera movements like "slow push-in", "orbit shot"

Example:

Image-to-Video Prompts:

  • Action Description: Describe how elements in the image should animate
  • Keep It Simple: Usually short action commands work best
  • Stay Consistent: Prompt should relate to the image content

Example:

โš™๏ธ Technical Implementation

Core Workflow

Video Generation Flow:

  1. Parameter Parsing: Parse input parameters, determine generation mode (text or image)
  2. Task Creation: Submit video generation request to JXINCM API
  3. Status Polling: Monitor task status via periodic API calls
  4. Progress Tracking: Display generation progress (queued โ†’ processing โ†’ completed)
  5. Result Extraction: Auto-extract video URL, thumbnail, GIF preview
  6. Result Return: Return complete video information

API Call Pattern

Key Implementation Details

Task Creation:

Progress Polling:

๐Ÿ” Troubleshooting

Common Issues

  1. Invalid API Key

    • Check if API Key format is correct
    • Confirm API Key is valid and has sufficient quota
    • Verify JXINCM platform account status
  2. Generation Timeout

    • Check network connection stability
    • Video generation typically takes 2-10 minutes
    • Try simplifying prompt description
    • Retry later if server is busy
  3. Invalid Image URL

    • Ensure image URL is publicly accessible
    • Check if image format is supported (JPG, PNG, WebP, etc.)
    • Verify URL format is correct
  4. Prompt Rejected

    • Avoid sensitive or inappropriate content
    • Use more general descriptions
    • Follow content policy guidelines

Error Codes

  • : Invalid or unauthorized API Key
  • : API call rate limit exceeded
  • : Internal server error
  • : Request timeout (network or server issue)

๐Ÿ“Š Performance Metrics

  • Request Timeout: 30 seconds (API calls), 10 minutes (total polling)
  • Average Generation Time: 2-10 minutes (varies by complexity and queue length)
  • Video Duration: 15 seconds (fixed)
  • Supported Format: MP4
  • Video Orientation:
    • portrait (vertical)
    • landscape (horizontal)
  • Video Size: large (high quality)
  • Model Selection:
    • sora-2 (standard quality)
    • sora-2-pro (high quality)
  • Generation Modes:
    • Text-to-video (no image URLs)
    • Image-to-video (with image URLs)
  • Output Content:
    • Video URL (main playback link)
    • Thumbnail (preview image)
    • GIF preview (animated preview)
  • Polling Interval: 5 seconds (real-time progress updates)

๐Ÿ”’ Privacy & Security

Please refer to PRIVACY.md for detailed information about data handling and privacy policy.

Key points:

  • No local storage of prompts or videos
  • Temporary processing only during generation
  • API Key stored securely in Dify environment
  • Data processed by JXINCM according to their privacy policy
  • Image URLs provided by users, plugin does not store or cache them

๐Ÿ“‹ Development Standards

This plugin follows Dify plugin development best practices:

  • โœ… Generator response processing
  • โœ… Real-time progress tracking
  • โœ… Automatic URL extraction
  • โœ… Complete error handling mechanism
  • โœ… Bilingual support (English/Chinese)
  • โœ… Standard JXINCM API integration
  • โœ… Dual mode support (text/image)

๐Ÿค Contributing

Welcome to submit Issues and Pull Requests to improve this plugin!

๐Ÿ“„ License

This project is licensed under the MIT License.

๐Ÿ”— Related Links

๐Ÿ“ฆ Release Notes

0.0.4 (2025-11-01) ๐Ÿ†•

  • API Migration: Migrated from 302.AI to JXINCM API
  • Dual Mode Support: Support both text-to-video and image-to-video modes
  • Multi-Image Support: Image-to-video mode supports multiple image URLs
  • Parameter Optimization: Simplified parameter configuration, fixed 15-second duration
  • Enhanced Output: Returns video URL, thumbnail, and GIF preview
  • Progress Display: Complete task creation and progress tracking information
  • Smart Mode: Auto-switch generation mode based on image URL parameter

0.0.1 (2025-10-02)

  • Initial release with text-to-video generation
CATEGORY
Tool
TAGS
PRODUCTIVITY
VERSION
0.0.2
wwwzhouhuiยท11/01/2025 04:08 PM
REQUIREMENTS
LLM invocation
Tool invocation
Maximum memory
2MB