简体中文 | English
Giggle Video Generation
Source: giggle-official/skills · API: giggle.pro
Generates AI videos via giggle.pro's Generation API. Supports text-to-video and image-to-video. Submit task → query when ready. No polling, no Cron, no file writes—all operations via exec.
Installation Requirements
| Requirement | Value |
|---|
| Binary | INLINECODE0 |
| Environment |
GIGGLE_API_KEY (required; obtain from https://giggle.pro/) |
|
Pip |
requests |
Set GIGGLE_API_KEY before use. The script will prompt if not configured.
No Retry on Error: If script execution encounters an error, do not retry. Report the error to the user directly and stop.
Supported Models
| Model | Supported Durations (s) | Default | Description |
|---|
| grok | 6, 10 | 6 | Strong overall capability, recommended |
| grok-fast |
6, 10 | 6 | grok fast version |
| sora2 | 4, 8, 12 | 4 | OpenAI Sora 2 |
| sora2-pro | 4, 8, 12 | 4 | Sora 2 Pro |
| sora2-fast | 10, 15 | 10 | Sora 2 Fast |
| sora2-pro-fast | 10, 15 | 10 | Sora 2 Pro Fast |
| kling25 | 5, 10 | 5 | Kling video model |
| seedance15-pro | 4, 8, 12 | 4 | Seedance Pro (with audio) |
| seedance15-pro-no-audio | 4, 8, 12 | 4 | Seedance Pro (no audio) |
| veo31 | 4, 6, 8 | 4 | Google Veo 3.1 (with audio) |
| veo31-no-audio | 4, 6, 8 | 4 | Google Veo 3.1 (no audio) |
| minimax23 | 6 | 6 | MiniMax model |
| wan25 | 5, 10 | 0 | Wanxiang model |
Note: --duration must be chosen from the model's supported durations, otherwise the API will error.
Frame Reference (Image-to-Video)
For image-to-video, --start-frame and --end-frame support three mutually exclusive formats:
| Method | Format | Example |
|---|
| asset_id | INLINECODE7 | INLINECODE8 |
| url |
url:<URL> |
url:https://example.com/img.jpg |
| base64 |
base64:<DATA> |
base64:iVBORw0KGgo... |
Each frame parameter can only use one of these methods.
Execution Flow: Submit and Query
Video generation is asynchronous (typically 60–300 seconds). Submit a task to get task_id, then query when the user wants to check status. All commands run via exec; API key from system env.
Step 1: Submit Task
First send a message to the user: "Video generation submitted. Usually takes 1–5 minutes. You can ask me about the progress anytime."
CODEBLOCK0
Response example:
CODEBLOCK1
Store task_id in memory (addMemory):
giggle-generation-video task_id: xxx (submitted: YYYY-MM-DD HH:mm)
Step 2: Query When User Asks
When the user asks about video progress (e.g. "is my video ready?", "progress?"), run:
CODEBLOCK3
Output handling:
| stdout pattern | Action |
|---|
| Plain text with video links (视频已就绪) | Forward to user as-is |
| Plain text with error |
Forward to user as-is |
| JSON
{"status": "processing", "task_id": "..."} | Tell user "Still in progress, please ask again in a moment" |
Link return rule: Video links in results must be full signed URLs (with Policy, Key-Pair-Id, Signature query params). Keep as-is when forwarding.
New Request vs Query Old Task
When the user initiates a new video generation request, must run Step 1 to submit a new task. Do not reuse old task_id from memory.
Only when the user explicitly asks about a previous task's progress should you query the old task_id from memory.
Parameter Reference
| Parameter | Default | Description |
|---|
| INLINECODE17 | required | Video description prompt |
| INLINECODE18 |
grok | See "Supported Models" table |
|
--duration | model default | Must choose from model's supported durations |
|
--aspect-ratio | 16:9 | 16:9, 9:16, 1:1, 3:4, 4:3 |
|
--resolution | 720p | 480p, 720p, 1080p |
|
--start-frame | - | Image-to-video start frame:
asset_id:ID,
url:URL, or
base64:DATA |
|
--end-frame | - | Image-to-video end frame, same format as start |
Note: base64 parameter supports base64-encoded images. Pass the raw Base64 string directly, do not add the data:image/xxx;base64, prefix.
Interaction Guide
When the user request is vague, guide per the steps below. If the user has provided enough info, run the command directly.
Step 1: Model Selection (required)
Before generating, must introduce available models and let the user choose. Display the model list from "Supported Models" table. Wait for explicit user choice before continuing.
Step 2: Video Duration
For the chosen model, show supported duration options. Default to the model's default duration.
Step 3: Generation Mode
CODEBLOCK4
Step 4: Aspect Ratio
CODEBLOCK5
Step 5: Execute and Display
Follow the flow: send message → Step 1 submit → user asks → Step 2 query. Forward exec stdout to the user as-is.
简体中文 | English
Giggle 视频生成
来源: giggle-official/skills · API: giggle.pro
通过 giggle.pro 的生成 API 生成 AI 视频。支持文本转视频和图片转视频。提交任务 → 就绪后查询。无需轮询、无需定时任务、无需文件写入——所有操作均通过 exec 执行。
安装要求
GIGGLE
APIKEY(必需;从 https://giggle.pro/ 获取) |
|
Pip 包 | requests |
使用前请设置 GIGGLEAPIKEY。若未配置,脚本会提示。
出错不重试:如果脚本执行遇到错误,不要重试。直接向用户报告错误并停止。
支持的模型
| 模型 | 支持时长(秒) | 默认值 | 描述 |
|---|
| grok | 6, 10 | 6 | 综合能力强,推荐使用 |
| grok-fast |
6, 10 | 6 | grok 快速版 |
| sora2 | 4, 8, 12 | 4 | OpenAI Sora 2 |
| sora2-pro | 4, 8, 12 | 4 | Sora 2 Pro |
| sora2-fast | 10, 15 | 10 | Sora 2 快速版 |
| sora2-pro-fast | 10, 15 | 10 | Sora 2 Pro 快速版 |
| kling25 | 5, 10 | 5 | 可灵视频模型 |
| seedance15-pro | 4, 8, 12 | 4 | Seedance Pro(含音频) |
| seedance15-pro-no-audio | 4, 8, 12 | 4 | Seedance Pro(无音频) |
| veo31 | 4, 6, 8 | 4 | Google Veo 3.1(含音频) |
| veo31-no-audio | 4, 6, 8 | 4 | Google Veo 3.1(无音频) |
| minimax23 | 6 | 6 | MiniMax 模型 |
| wan25 | 5, 10 | 0 | 万象模型 |
注意:--duration 必须从模型支持的时长中选择,否则 API 会报错。
帧参考(图片转视频)
对于图片转视频,--start-frame 和 --end-frame 支持三种互斥的格式:
| 方法 | 格式 | 示例 |
|---|
| assetid | assetid:<ID> | asset_id:lkllv0yv81 |
| url |
url:
| url:https://example.com/img.jpg |
| base64 | base64: | base64:iVBORw0KGgo... |
每个帧参数只能使用其中一种方法。
执行流程:提交与查询
视频生成是异步的(通常需要 60–300 秒)。提交任务获取 task_id,然后当用户想检查状态时查询。所有命令通过 exec 运行;API 密钥来自系统环境变量。
步骤 1:提交任务
首先向用户发送消息:视频生成已提交。通常需要 1–5 分钟。你可以随时询问我进度。
bash
文本转视频(默认 grok-fast)
python3 scripts/generation_api.py \
--prompt 镜头缓慢推进,画面中人物微笑 \
--model grok-fast --duration 6 \
--aspect-ratio 16:9 --resolution 720p
图片转视频 - 使用 asset_id 作为起始帧
python3 scripts/generation_api.py \
--prompt 人物缓慢转身 \
--start-frame asset_id:lkllv0yv81 \
--model grok-fast --duration 6 \
--aspect-ratio 16:9 --resolution 720p
图片转视频 - 使用 URL 作为起始帧
python3 scripts/generation_api.py \
--prompt 风景从静态到动态 \
--start-frame url:https://example.com/img.jpg \
--model grok-fast --duration 6
图片转视频 - 同时设置起始帧和结束帧
python3 scripts/generation_api.py \
--prompt 场景过渡 \
--start-frame asset_id:abc123 \
--end-frame url:https://example.com/end.jpg \
--model grok --duration 6
响应示例:
json
{status: started, task_id: 55bf24ca-e92a-4d9b-a172-8f585a7c5969}
将 task_id 存储在内存中(addMemory):
giggle-generation-video task_id: xxx(提交时间:YYYY-MM-DD HH:mm)
步骤 2:用户询问时查询
当用户询问视频进度时(例如我的视频好了吗?、进度如何?),运行:
bash
python3 scripts/generationapi.py --query --task-id id>
输出处理:
| stdout 模式 | 操作 |
|---|
| 包含视频链接的纯文本(视频已就绪) | 原样转发给用户 |
| 包含错误的纯文本 |
原样转发给用户 |
| JSON {status: processing, task_id: ...} | 告诉用户仍在处理中,请稍后再问 |
链接返回规则:结果中的视频链接必须是完整的签名 URL(包含 Policy、Key-Pair-Id、Signature 查询参数)。转发时保持原样。
新请求 vs 查询旧任务
当用户发起新的视频生成请求时,必须运行步骤 1 提交新任务。不要重复使用内存中的旧 task_id。
只有当用户明确询问之前任务的进度时,才从内存中查询旧的 task_id。
参数参考
| 参数 | 默认值 | 描述 |
|---|
| --prompt | 必需 | 视频描述提示词 |
| --model |
grok | 参见支持的模型表格 |
| --duration | 模型默认值 | 必须从模型支持的时长中选择 |
| --aspect-ratio | 16:9 | 16:9、9:16、1:1、3:4、4:3 |
| --resolution | 720p | 480p、720p、1080p |
| --start-frame | - | 图片转视频起始帧:asset_id:ID、url:URL 或 base64:DATA |
| --end-frame | - | 图片转视频结束帧,格式与起始帧相同 |
注意:base64 参数支持 base64 编码的图片。直接传递原始 Base64 字符串,不要添加 data:image/xxx;base64, 前缀。
交互指南
当用户请求模糊时,按以下步骤引导。如果用户已提供足够信息,直接运行命令。
步骤 1:模型选择(必需)
生成前,必须介绍可用模型并让用户选择。显示支持的模型表格中的模型列表。等待用户明确选择后再继续。
步骤 2:视频时长
对于所选模型,显示支持的时长选项。默认使用模型的默认时长。
步骤 3:生成模式
问题:你需要参考图片作为起始/结束帧吗?
选项:不需要 - 仅文本转视频 / 需要 - 图片转视频(设置起始/结束帧)
步骤 4:画面比例
问题:你需要什么画面比例?
选项:16:9 - 横屏(推荐) / 9:16 - 竖屏 / 1:1 - 正方形
步骤 5:执行与展示
按照流程操作:发送消息 → 步骤 1 提交 → 用户询问 → 步骤 2 查询。将 exec 的标准输出原样转发给用户。