Package Information
Available Nodes
Documentation
n8n-nodes-sj
This is an n8n community node that allows you to integrate with Shanjian (闪剪) AI Open Platform API in your n8n workflows.
Shanjian is an AI-powered platform for digital human cloning, voice cloning, and video synthesis.
n8n is a fair-code licensed workflow automation platform.
Installation
Follow the installation guide in the n8n community nodes documentation.
Community Nodes (Recommended)
- Go to Settings > Community Nodes
- Select Install
- Enter
n8n-nodes-sjin Enter npm package name - Agree to the risks of using community nodes
- Select Install
Manual Installation
To install this node manually, run:
npm install n8n-nodes-sj
Configuration
Before using this node, you need to configure your Shanjian API credentials:
- In n8n, go to Credentials > New
- Search for Shanjian API
- Enter your Shanjian API details:
- Domain:
https://openapi.shanjian.tv(default) - API Key: Your Shanjian API key (get it from https://openapi-doc.shanjian.tv/)
- Domain:
Operations
This node supports the following operations:
Cloning Resource
Digital human and voice cloning operations:
Professional Digital Human: Clone a professional digital human from video
- Requires: Video URL, Auth Video URL, Auth Text, Green Background flag (optional)
- Endpoint:
/v1/virtualman/train
Fast Digital Human: Quick clone a digital human
- Requires: Video URL, Auth Video URL, Auth Text
- Endpoint:
/v1/virtualman/fast/train
Voice: Clone a voice from audio
- Requires: Audio URL, Auth Audio URL, Auth Text
- Endpoint:
/v1/voice/train
Image to Digital Human: Convert an image to a digital human
- Requires: Image URL, Voice ID, Auth Image URL, Auth Text
- Endpoint:
/v1/virtualman/image/train
Video Synthesis Resource
Video generation and synthesis operations:
Digital Human Voiceover: Create digital human voiceover video (unpackaged)
- Requires: Digital Human ID, Text content
- Endpoint:
/v1/virtualman/video
Digital Human Mixed Clip: Create digital human mixed clip video
- Requires: Anchor ID, Script, Video Materials (JSON array)
- Endpoint:
/v1/clip/video/virtualman_broadcast
Real Person Mixed Clip: Create real person mixed clip video
- Requires: Anchor ID, Script, Video Materials (JSON array)
- Endpoint:
/v1/clip/video/realman_broadcast
Material Mixed Clip: Create material-only mixed clip video
- Requires: Script, Video Materials (JSON array), Voice ID
- Endpoint:
/v1/clip/video/broadcast_mixcut
Task Resource
Task management and monitoring:
- Get Task Info: Query task details and status
- Requires: Task ID
- Endpoint:
/v1/task/info
Usage Examples
Clone a Professional Digital Human
- Add the Shanjian node to your workflow
- Select Cloning as the resource
- Select Professional Digital Human as the operation
- Configure the parameters:
- Video URL: URL of your training video
- Auth Video URL: URL of your authorization video
- Auth Text: Authorization text (e.g., "闪剪")
- Is Green Background: Toggle if using green screen
- Callback URL: Optional webhook URL for completion notification
- Connect your Shanjian API credentials
- Execute the node
Create a Digital Human Video
- Add the Shanjian node to your workflow
- Select Video Synthesis as the resource
- Select Digital Human Voiceover as the operation
- Configure the parameters:
- Digital Human ID: ID from your cloned digital human
- Text: Script content for the video
- Callback URL: Optional webhook URL for completion notification
- Connect your Shanjian API credentials
- Execute the node
Check Task Status
- Add the Shanjian node to your workflow
- Select Task as the resource
- Select Get Task Info as the operation
- Enter the Task ID (from a previous cloning or synthesis operation)
- Connect your Shanjian API credentials
- Execute the node
Compatibility
This node has been tested with:
- n8n version: 1.0.0+
- Node.js version: 18+
API Response Format
All operations return task information in the following format:
{
"code": 0,
"msg": "success",
"data": {
"taskId": "task_xxx",
"status": "pending|processing|completed|failed",
"result": {
// Operation-specific result data
}
}
}
Resources
Development
Setup
# Install dependencies
npm install
# Build the node
npm run build
# Link to n8n (for local development)
npm link
cd ~/.n8n/custom
npm link n8n-nodes-sj
Testing
To test the node in your local n8n instance:
# Start n8n
n8n start
Then navigate to http://localhost:5678 and search for "Shanjian" in the nodes panel.
License
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Support
If you have any questions or issues, please open an issue on the GitHub repository.
