linkfox-aigc-videogen
Original:🇨🇳 Chinese
Translated
2 scriptsChecked / no sensitive code detected
AI Video Generation Tool (First/Last Frame/Single Image Mode) generates videos based on the original image and prompts, with optional last frame image support to control the ending scene. Supported models include KLING, WAN, SEED (Doubao), SEED_FAST, and HAILUO. Triggered when users use phrases like "generate video", "AI video", "image-to-video", "make a video", "video generation", "generate video", "image to video", "dynamic video".
4installs
Added on
NPX Install
npx skill4agent add linkfox-ai/linkfox-skills linkfox-aigc-videogenTags
Translated version includes tags in frontmatterSKILL.md Content (Chinese)
View Translation Comparison →AI Video Generation (First/Last Frame/Single Image Mode)
Generate videos based on the original image (first frame) and optional last frame image, supporting multiple AI video models. Asynchronously create tasks and poll to retrieve results.
Core Features
- 5 Model Options: Covers different style and duration requirements.
- First/Last Frame Control: Optional last frame image to control the video's ending scene.
- Rich Parameters: Supports Pro mode, sound generation, camera movement control, aspect ratio, etc.
- Asynchronous Mode: Immediately returns after task creation, and the script automatically polls until completion (timeout after 20 minutes).
taskId
Model Description
| Model (videoType) | Description | Supported Duration |
|---|---|---|
| KLING | Keling | 5s/10s |
| WAN | Wanxiang | 5s/10s/15s |
| SEED | Seedance/Doubao | 5s/10s/15s |
| SEED_FAST | Seedance 2.0 Fast | 5s/10s/15s |
| HAILUO | Hailuo | 6s/10s |
Parameter Overview
- Required Fields: ,
imageUrl,videoTypevideoTime - Optional Core Fields: (last frame image),
lastFrameImageUrl(within 2000 characters)prompt
Complete parameter table, response field structure and error codes can be found in .
references/api.mdCalling Methods
- Create Task: → Returns
POST /aigc/videoGenAsync{taskId} - Poll for Results: → Pass in
POST /aigc/taskQuery→ Returns status and results{taskId} - Python Script: (the script automatically handles creation + polling internally)
python scripts/aigc_videogen.py '<JSON parameters>'
Asynchronous Process:
- The script calls to create a task and obtains
/aigc/videoGenAsynctaskId - Starts polling after waiting for 2 minutes, once every 10 seconds, with a maximum wait time of 20 minutes
/aigc/taskQuery - Automatically downloads the video to the session directory upon success
media/
Output Strategy (Default Script Behavior):
- The script automatically downloads and saves the generated video to the session directory, and outputs a line
media/to stdout.Saved full response: <path array> - The original API response is silently saved to , and its path is only prompted in stdout when there is no video product.
data/
Data Reading Suggestion: Do NOT read the content of the saved video file. Directly provide the local path after to the user.
Saved full response:Resolve Authentication and Points Issues
When the following exceptions occur, guide users to resolve them using references/onboarding.md:
Exception Scenarios
- API Key Not Configured: The environment variable or
LINKFOX_AGENT_API_KEYis not configured.LINKFOXAGENT_API_KEY - Response with 401 or 402 Status Code
- Response Indicates Insufficient Points or Balance: Messages containing "insufficient points balance/insufficient billing/insufficient balance/quota exceeded/insufficient balance/package expired/need to recharge/please recharge" or similar meanings.
Usage Guidelines
- Model Selection: Use for general product videos; use
KLING/WANfor longer durations.SEED - First/Last Frames: Pass (first frame, required) + optional
imageUrl(last frame). Supported models: KLING (Pro mode only) / WAN / SEED.lastFrameImageUrl - Duration Matching: Must pass a duration value supported by the model, otherwise an error will occur.
- Prompt: Optional, within 2000 characters, describing the desired dynamic effects.
Examples
1. KLING — Product Display
json
{"imageUrl": "https://example.com/product.jpg", "videoType": "KLING", "videoTime": 10, "prompt": "Product display video"}3. WAN Wanxiang — With Sound and Camera Movement
json
{"imageUrl": "https://example.com/scene.jpg", "videoType": "WAN", "videoTime": 15, "voice": true, "camera": "single"}4. SEED — High Resolution
json
{"imageUrl": "https://example.com/scene.jpg", "videoType": "SEED", "videoTime": 10, "resolution": "1080p", "aspectRatio": "16:9"}Display Rules
- Only Display Saved Local Path: Tell users the local video path after , e.g., "Video saved to: xxx/a.mp4".
Saved full response: - Do NOT read video files, do NOT display base64 content.
- Do NOT directly provide the temporary URL returned by the original API to users (it is signed and will expire).
Limitations
- Maximum prompt length is 2000 characters.
- Generation time is relatively long, usually 100-600 seconds. The script automatically polls, with a timeout of 20 minutes.
- KLING's last frame image is only supported in Pro mode.
- This interface only supports single image/first-last frame mode. For multiple reference images, use .
linkfox-aigc-videogen-multi - No retries on failure (only one attempt).
Not Applicable Scenarios
Not applicable for:
- Video generation with multiple reference images → Use
linkfox-aigc-videogen-multi - Image generation → Use
linkfox-aigc-imagegen - Text generation → Use
linkfox-aigc-textgen
Feedback
See .
references/api.md