pollo-ai-video-generator
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePollo AI API Skill
Pollo AI API 技能
Generate AI videos by calling the Pollo AI REST API directly.
通过直接调用Pollo AI REST API生成AI视频。
Friendly Onboarding (Conditional)
友好入门引导(按需触发)
When the user's request is vague or open-ended (e.g., "make me a video", "I want to try AI video", "generate something cool", no specific model/prompt/parameters), show a brief, friendly guide before asking for details. Do NOT show this guide if the user already has a clear request (e.g., specifies a model, gives a prompt, or provides an image).
Use this template (adapt naturally to match the user's language, keep it concise and professional):
I can help you generate AI videos with Pollo AI.
- **Text to Video**: Create a video from a written prompt
- **Image to Video**: Animate an image into a video
- **Credit Check**: Check your available API credits
I support 13 model brands, including Kling, Sora, Runway, Veo, and Pixverse. If you do not have a preferred model, I can recommend one.
What would you like to create? For example:
- "A cat playing piano in a jazz club, cinematic lighting"
- "Turn this image into a video" (attach an image)
- "Use Kling v2.6 to generate a 10s ocean wave video"Rules for this section:
- Skip entirely if the user provides a specific prompt, model name, or image — go straight to execution.
- Skip entirely if the user only asks about credits or config — just answer directly.
- Keep the tone warm but brief. Never dump the full model table on the user unprompted.
- After showing the guide, wait for the user's input before proceeding.
当用户的请求模糊或开放式时(例如“帮我做个视频”、“我想试试AI视频”、“生成点有意思的内容”,未指定具体模型/提示词/参数),在询问细节之前先展示一份简洁友好的引导。如果用户的请求已经明确(例如指定了模型、提供了提示词或图像),则无需展示该引导。
使用以下模板(可根据用户语言自然调整,保持简洁专业):
我可以帮你用Pollo AI生成AI视频。
- **文本转视频**:通过文字提示词创建视频
- **图像转视频**:将静态图像动成视频
- **信用额度查询**:查看你的API可用信用额度
我支持13个品牌的模型,包括Kling、Sora、Runway、Veo和Pixverse。如果你没有偏好的模型,我可以为你推荐。
你想要生成什么内容?例如:
- “一只猫在爵士俱乐部弹钢琴,电影级灯光效果”
- “把这张图片转成视频”(附上图片)
- “用Kling v2.6生成一段10秒的海浪视频”本节规则:
- 如果用户提供了具体的提示词、模型名称或图像,完全跳过引导,直接执行任务。
- 如果用户仅询问信用额度或配置相关问题,完全跳过引导,直接回答。
- 语气要亲切但简洁。切勿在用户未请求的情况下展示完整的模型列表。
- 展示引导后,等待用户输入再继续操作。
First-Time Setup
首次设置
Store the API key locally in . After setup, do not show it again in later replies.
~/.pollo/config.tomlImportant: Do not ask the user to run scripts or commands. All script execution is done by the AI. If setup is needed, ask the user to create a key on the website and paste it into the chat.
将API密钥本地存储在中。设置完成后,后续回复中不再显示密钥相关内容。
~/.pollo/config.toml重要提示:不要让用户运行脚本或命令,所有脚本执行均由AI完成。如果需要设置,告知用户在网站上创建密钥并粘贴到聊天框中。
Check if already configured
检查是否已配置
bash
python3 scripts/pollo_config.pyIf this prints the config summary, the key is already set up. Skip to Key Validation.
bash
python3 scripts/pollo_config.py如果该命令输出配置摘要,则密钥已设置完成,跳过此步骤直接进入密钥验证环节。
New setup
全新设置
If config is not found (exit code 2 or error), follow this flow:
-
Tell the user they need an API Key, in a friendly tone. Example:I need your Pollo API key once before I can generate videos.
- Open https://pollo.ai/api-platform/keys
- Click Add Key, save it, and paste the key here
I will validate it and store it locally so you do not need to paste it again.Adapt the language to match the user's language. Keep it brief, friendly, and non-technical.If the user already gave a concrete video request, briefly acknowledge that request before asking for the key. -
Wait for the user to paste the key. Do NOT proceed until the user provides it.
-
AI runs the setup script with the key the user provided:bash
python3 scripts/pollo_setup.py --key <the-key-user-pasted>This validates the key against the API and writes.~/.pollo/config.toml -
Report the result in user-friendly language:
- Success → "Setup is complete. You have X credits available. Send me a prompt whenever you are ready."
- Invalid key → "That key does not appear to be valid. Please copy a new key from https://pollo.ai/api-platform/keys and paste it here."
- Network error → "I couldn't reach the API right now. Please try again in a moment."
Never show the user raw script paths, command-line syntax, or error stack traces.
如果未找到配置(退出码为2或出现错误),请按照以下流程操作:
-
告知用户需要API密钥,语气友好。示例:在生成视频之前,我需要你提供一次Pollo API密钥。
- 打开 https://pollo.ai/api-platform/keys
- 点击Add Key,保存密钥并将其粘贴到此处
我会验证密钥并将其本地存储,之后你无需再次粘贴。根据用户使用的语言调整表述,保持简洁友好、非技术化。如果用户已经提出了具体的视频生成请求,先简要确认该请求,再询问密钥。 -
等待用户粘贴密钥。在用户提供密钥之前,请勿继续操作。
-
AI运行设置脚本,使用用户提供的密钥:bash
python3 scripts/pollo_setup.py --key <用户粘贴的密钥>该脚本会通过API验证密钥有效性,并将其写入。~/.pollo/config.toml -
用用户友好的语言告知结果:
- 成功 → “设置已完成。你当前有X个可用信用额度。随时可以给我发送提示词开始生成。”
- 密钥无效 → “该密钥似乎无效。请从https://pollo.ai/api-platform/keys复制新的密钥并粘贴到此处。”
- 网络错误 → “目前无法连接到API。请稍后再试。”
切勿向用户展示原始脚本路径、命令行语法或错误堆栈信息。
Key Validation (Required)
密钥验证(必填)
Before any generation task, validate the key by checking the credit balance:
bash
python3 scripts/pollo_api.py GET /credit/balanceHandle the response:
| Response | Meaning | Action |
|---|---|---|
| Key is valid | Read credits from |
| Key is invalid or does not exist | Tell user: "That API key does not appear to be valid. Please create a new one at https://pollo.ai/api-platform/keys and paste it here." |
| Key format wrong or missing | Tell user: "The API key format doesn't look right. Keys usually start with |
| Exit code 2 | Config not found | Trigger the New setup flow above. Do NOT tell the user to run any commands. |
| Network error / timeout | API unreachable | Tell user: "I couldn't reach the API right now. Please try again in a moment." |
Do NOT proceed to any generation task until the key is validated successfully. This prevents wasted time on tasks that will fail due to invalid keys or zero balance.
在执行任何生成任务之前,通过查询信用余额来验证密钥有效性:
bash
python3 scripts/pollo_api.py GET /credit/balance根据响应进行处理:
| 响应内容 | 含义 | 操作 |
|---|---|---|
| 密钥有效 | 从 |
| 密钥无效或不存在 | 告知用户:“该API密钥似乎无效。请前往https://pollo.ai/api-platform/keys创建新的密钥并粘贴到此处。” |
| 密钥格式错误或缺失 | 告知用户:“API密钥格式不正确。密钥通常以 |
| 退出码2 | 未找到配置 | 触发上述全新设置流程。切勿告知用户运行任何命令。 |
| 网络错误/超时 | 无法连接到API | 告知用户:“目前无法连接到API。请稍后再试。” |
在密钥验证成功之前,切勿执行任何生成任务。这可以避免因密钥无效或余额不足而浪费时间。
Core Workflow
核心工作流
The standard flow for any generation task:
- Validate key — If not yet validated this session, check first (see Key Validation above)
GET /credit/balance - Create task — POST to the model endpoint with parameters
- Handle creation errors — Check the response for errors (see Error Handling below). If , stop and guide to recharge.
"Not enough credits" - Notify user — Tell the user the task was submitted with a brief summary (model, prompt, duration, etc.)
- Poll status — Run synchronously (NOT in background) until completion
poll_task.py - Return result — Parse the JSON output and give the user the video URL
任何生成任务的标准流程:
- 验证密钥 — 如果本次会话尚未验证,先调用检查(详见上述密钥验证环节)
GET /credit/balance - 创建任务 — 向模型端点发送POST请求,附带参数
- 处理创建错误 — 检查响应是否存在错误(详见下方错误处理)。如果返回“Not enough credits”,停止操作并引导用户充值。
- 通知用户 — 告知用户任务已提交,并提供简要摘要(模型、提示词、时长等)
- 轮询状态 — 同步运行(不要在后台运行),直到任务完成
poll_task.py - 返回结果 — 解析JSON输出,将视频URL提供给用户
Request Body Structure
请求体结构
All generation endpoints wrap parameters inside an object:
"input"json
{
"input": {
"prompt": "...",
"aspectRatio": "16:9",
"length": 5
}
}所有生成端点的参数都包裹在对象中:
"input"json
{
"input": {
"prompt": "...",
"aspectRatio": "16:9",
"length": 5
}
}Creating a Generation Task
创建生成任务
Use to POST to the model endpoint. Example for Pollo v2.0 text-to-video:
pollo_api.pybash
python3 scripts/pollo_api.py POST /generation/pollo/pollo-v2-0 \
--data '{"input":{"prompt":"A cat playing piano in a jazz club","aspectRatio":"16:9","length":5,"resolution":"720p"}}'Response:
{ "code": "SUCCESS", "data": { "taskId": "xxx", "status": "waiting" } }Extract from .
taskIddata使用向模型端点发送POST请求。以下是Pollo v2.0文本转视频的示例:
pollo_api.pybash
python3 scripts/pollo_api.py POST /generation/pollo/pollo-v2-0 \
--data '{"input":{"prompt":"A cat playing piano in a jazz club","aspectRatio":"16:9","length":5,"resolution":"720p"}}'响应示例:
{ "code": "SUCCESS", "data": { "taskId": "xxx", "status": "waiting" } }从中提取。
datataskIdPolling for Results
轮询任务结果
After getting the taskId:
- Tell the user what's happening with a brief summary (model, prompt, params), so they know the task is in progress.
- Run the bundled polling script synchronously — do NOT use :
run_in_background
bash
python3 scripts/poll_task.py <taskId> --interval 5 --timeout 300The script reads the API key from automatically. Run it from the skill directory, or otherwise resolve relative to this skill's root. Set on the Bash tool call to allow up to 5 minutes. The script runs silently and outputs a single JSON result to stdout when done.
~/.pollo/config.tomlscripts/poll_task.pytimeout: 300000- Parse the result and present it to the user immediately.
获取后:
taskId- 告知用户当前操作状态,附带简要摘要(模型、提示词、参数),让用户知道任务正在进行中。
- 同步运行内置的轮询脚本 — 不要使用:
run_in_background
bash
python3 scripts/poll_task.py <taskId> --interval 5 --timeout 300该脚本会自动从读取API密钥。请从技能目录运行该脚本,或根据技能根目录相对路径找到。在Bash工具调用中设置,允许最长5分钟的等待时间。脚本会静默运行,完成后向标准输出返回单个JSON结果。
~/.pollo/config.tomlscripts/poll_task.pytimeout: 300000- 解析结果并立即呈现给用户。
Preflight Checklist
预检清单
Before calling any generation or tool endpoint, quickly lock down the minimum required inputs:
- Task type — confirm whether this is text-to-video, image-to-video, or credit check
- Model choice — use the user's requested model, or pick a default based on the guidance below
- Source assets — for image-to-video, confirm whether the input is already a public URL or needs upload first
- Core params — fill in ,
prompt,length,aspectRatio, and audio-related flags only if the chosen model supports themresolution - Compatibility check — if the user asks for a combination the model does not support, correct it before sending the request instead of letting the API reject it
Keep this step brief. The goal is to avoid preventable validation failures, not to interrogate the user when sensible defaults already exist.
在调用任何生成端点或工具端点之前,快速确认至少需要的输入信息:
- 任务类型 — 确认是文本转视频、图像转视频还是信用额度查询
- 模型选择 — 使用用户指定的模型,或根据下方指南选择默认模型
- 源资产 — 对于图像转视频,确认输入是公共URL还是需要先上传
- 核心参数 — 填写、
prompt、length、aspectRatio以及所选模型支持的音频相关参数resolution - 兼容性检查 — 如果用户要求的组合是模型不支持的,在发送请求前先修正,避免API拒绝请求
此步骤要简洁。目标是避免可预防的验证失败,而不是在已有合理默认值的情况下过度询问用户。
Handling Local Images (Image-to-Video)
处理本地图像(图像转视频)
When the user has a local image file instead of a URL, upload it first:
-
Get a signed upload URL:bash
python3 scripts/pollo_api.py POST /file/sign \ --data '{"action":"putObject","filename":"photo.jpg","type":"image/jpeg"}'Response includes a(for uploading) and asignedUrl(the final HTTPS URL).fileUrl -
Upload the file:bash
python3 scripts/pollo_api.py PUT "<signedUrl>" \ --upload /path/to/photo.jpg --content-type image/jpeg -
Use the— Pass it as the
fileUrlparameter in the generation request.image
当用户提供的是本地图像文件而非URL时,需要先上传:
-
获取签名上传URL:bash
python3 scripts/pollo_api.py POST /file/sign \ --data '{"action":"putObject","filename":"photo.jpg","type":"image/jpeg"}'响应包含(用于上传)和signedUrl(最终的HTTPS URL)。fileUrl -
上传文件:bash
python3 scripts/pollo_api.py PUT "<signedUrl>" \ --upload /path/to/photo.jpg --content-type image/jpeg -
使用— 在生成请求中将其作为
fileUrl参数传入。image
Supported Models
支持的模型
Below is the quick reference. When the user picks a brand/model, read the corresponding reference file for full parameter details.
以下是快速参考。当用户选择某个品牌/模型时,查看对应的参考文件获取完整参数细节。
Video Generation Brands
视频生成品牌
| Brand | Models | Reference File |
|---|---|---|
| Pollo | pollo-v1-5, pollo-v1-6, pollo-v2-0 (3 models) | |
| Kling AI | kling-v1, v1-5, v1-6, v2, v2-1, v2-1-master, v2-5-turbo, v2-6, video-o1 (9 models) | |
| Google Veo | veo2, veo3, veo3-fast, veo3-1, veo3-1-fast (5 models) | |
| Sora | sora-2, sora-2-pro (2 models) | |
| Runway | runway-gen-3-turbo, runway-gen-4-turbo (2 models) | |
| Pixverse | pixverse-v3-5, v4, v4-5, v5, v5-5 (5 models) | |
| Hailuo | video-01, video-01-live2d, minimax-hailuo-02, minimax-hailuo-2.3, minimax-hailuo-2.3-fast (5 models) | |
| Pika | pika-v2-1, pika-v2-2 (2 models) | |
| Vidu | vidu-q1, vidu-v1-5, vidu-v2-0, viduq2-pro, viduq2-turbo, viduq3-pro (6 models) | |
| Luma | luma-ray-1-6, luma-ray-2-0, luma-ray-2-0-flash (3 models) | |
| Wan | wanx-v2-1, wan-v2-2-flash, wan-v2-2-plus, wan-v2-5-preview, wan-v2-6 (5 models) | |
| Seedance | seedance, seedance-pro, seedance-pro-fast, seedance-1-5-pro (4 models) | |
| Hunyuan | hunyuan (1 model) | |
| 品牌 | 模型 | 参考文件 |
|---|---|---|
| Pollo | pollo-v1-5, pollo-v1-6, pollo-v2-0(3个模型) | |
| Kling AI | kling-v1, v1-5, v1-6, v2, v2-1, v2-1-master, v2-5-turbo, v2-6, video-o1(9个模型) | |
| Google Veo | veo2, veo3, veo3-fast, veo3-1, veo3-1-fast(5个模型) | |
| Sora | sora-2, sora-2-pro(2个模型) | |
| Runway | runway-gen-3-turbo, runway-gen-4-turbo(2个模型) | |
| Pixverse | pixverse-v3-5, v4, v4-5, v5, v5-5(5个模型) | |
| Hailuo | video-01, video-01-live2d, minimax-hailuo-02, minimax-hailuo-2.3, minimax-hailuo-2.3-fast(5个模型) | |
| Pika | pika-v2-1, pika-v2-2(2个模型) | |
| Vidu | vidu-q1, vidu-v1-5, vidu-v2-0, viduq2-pro, viduq2-turbo, viduq3-pro(6个模型) | |
| Luma | luma-ray-1-6, luma-ray-2-0, luma-ray-2-0-flash(3个模型) | |
| Wan | wanx-v2-1, wan-v2-2-flash, wan-v2-2-plus, wan-v2-5-preview, wan-v2-6(5个模型) | |
| Seedance | seedance, seedance-pro, seedance-pro-fast, seedance-1-5-pro(4个模型) | |
| Hunyuan | hunyuan(1个模型) | |
Other Endpoints
其他端点
| Function | Details |
|---|---|
| Task Status | |
| Credit Cost | |
| Credit Balance | |
| File Upload | |
For details, read .
references/common.md| 功能 | 详情 |
|---|---|
| 任务状态 | |
| 信用成本估算 | |
| 信用余额查询 | |
| 文件上传 | |
如需详细信息,请查看。
references/common.mdHow to Pick a Model
模型选择指南
Default: When the user has no preference, use Pollo v2.0 — good quality, supports audio (generateAudio), up to 10s, up to 1080p, and cost-effective.
When the user has specific needs:
- Best quality: Google Veo 3.1, Kling v2.6, Sora 2 Pro
- Fast & affordable: Pollo v2.0, Pixverse v5.5, Wan v2.2 Flash
- Audio generation: Pollo v2.0 (generateAudio), Google Veo 3+, Kling v2.6, Pixverse v5+, Seedance 1.5 Pro, Vidu Q3 Pro, Wan v2.6
- Long videos (10s+): Seedance 1.5 Pro / Pro Fast (up to 12s), most models support 10s
- High resolution (1080p): Pollo v2.0, Kling v2.6, Seedance, most models support up to 1080p
- Image to video: All models support this — need an image URL (not base64)
默认选择:当用户没有偏好时,使用Pollo v2.0 — 画质优秀,支持音频生成(generateAudio),最长10秒,最高1080p,性价比高。
当用户有特定需求时:
- 最佳画质:Google Veo 3.1、Kling v2.6、Sora 2 Pro
- 快速且经济:Pollo v2.0、Pixverse v5.5、Wan v2.2 Flash
- 支持音频生成:Pollo v2.0(generateAudio)、Google Veo 3+、Kling v2.6、Pixverse v5+、Seedance 1.5 Pro、Vidu Q3 Pro、Wan v2.6
- 长视频(10秒以上):Seedance 1.5 Pro / Pro Fast(最长12秒),多数模型支持10秒时长
- 高分辨率(1080p):Pollo v2.0、Kling v2.6、Seedance,多数模型支持最高1080p
- 图像转视频:所有模型均支持 — 需要提供图像URL(不支持base64格式)
Error Handling
错误处理
Every API call response must be checked for errors before proceeding. The API returns errors in this format:
json
{ "message": "Human-readable error", "code": "ERROR_CODE" }每次API调用后都必须检查响应是否存在错误,然后再继续操作。API返回的错误格式如下:
json
{ "message": "易读的错误信息", "code": "错误码" }Error Code Reference
错误码参考
| Error Code | Message Pattern | Meaning | What to Do |
|---|---|---|---|
| | Account has insufficient credits | Stop immediately. Tell user: "Your account does not have enough credits. Please top up at https://pollo.ai/api-platform/pricing and try again." |
| | Key lacks permission for this endpoint | Check if the key is valid. If file upload fails with this, the key may not have upload permissions — suggest the user use image URLs directly instead. |
| | Invalid API key or wrong endpoint | Tell user: "That API key does not appear to be valid. Please create a new one at https://pollo.ai/api-platform/keys and paste it here." |
| — | Missing or malformed API key | Tell user: "The API key format doesn't look right. Keys usually start with |
| | Invalid request parameters | Check the |
| 错误码 | 信息模式 | 含义 | 处理方式 |
|---|---|---|---|
| | 账户信用额度不足 | 立即停止操作。告知用户:“你的Pollo AI账户信用额度不足,无法完成此请求。请访问https://pollo.ai/api-platform/pricing充值后重试。” |
| | 密钥无该端点权限 | 检查密钥是否有效。如果文件上传时出现此错误,可能是密钥无上传权限 — 建议用户直接使用图像URL。 |
| | API密钥无效或不存在 | 告知用户:“该API密钥似乎无效。请前往https://pollo.ai/api-platform/keys创建新的密钥并粘贴到此处。” |
| — | 密钥缺失或格式错误 | 告知用户:“API密钥格式不正确。密钥通常以 |
| | 请求参数无效 | 检查响应中的 |
Critical: Insufficient Credits
重点:信用额度不足
This is the most common failure. When you see any of these signals:
- Response contains
"Not enough credits" - Response code is after a generation request
FORBIDDEN - Balance check shows
availableCredits: 0
Always respond with (adapt to the user's language):
Your Pollo AI account does not have enough credits for this request. Please visit https://pollo.ai/api-platform/pricing to top up, then try again.
Never retry the same request, try a different model, or attempt workarounds when credits are insufficient.
这是最常见的失败场景。当出现以下任何一种信号时:
- 响应包含
"Not enough credits" - 生成请求后返回错误码
FORBIDDEN - 余额查询显示
availableCredits: 0
请始终回复(可根据用户语言调整):
你的Pollo AI账户信用额度不足,无法完成此请求。请访问https://pollo.ai/api-platform/pricing充值后重试。
当信用额度不足时,切勿重试相同请求、尝试其他模型或寻找变通方法。
Key Rules
核心规则
- Use for all API calls — never construct raw
pollo_api.pycommands with API keys. The wrapper reads the key fromcurlautomatically and adds all required headers (~/.pollo/config.toml,X-API-KEY,Content-Type).User-Agent - Store key locally after setup — once configured, keep the API key in and do not show it again in later replies.
~/.pollo/config.toml - Response wrapper — all successful API responses are wrapped in . Always extract the actual payload from the
{ "code": "SUCCESS", "message": "success", "data": { ... } }field.data - Body wrapper — generation endpoints use
{ "input": { ... } } - Image inputs as URLs — when using image-to-video, the image must be an HTTPS URL, never base64. For local files, use the file upload flow above.
- Prompt length — varies by model (typically 1000-2500 chars), check the brand reference
- Video storage — generated videos are kept for 14 days only
- Webhook alternative — instead of polling, pass in the request body
webhookUrl - Each model has its own endpoint — the path pattern is
/generation/{brand}/{model} - Validate key first — always run the Key Validation step before any generation. Never skip it.
- 所有API调用均使用— 切勿直接构造包含API密钥的
pollo_api.py命令。该封装器会自动从curl读取密钥,并添加所有必要的请求头(~/.pollo/config.toml、X-API-KEY、Content-Type)。User-Agent - 设置完成后本地存储密钥 — 配置完成后,将API密钥保存在中,后续回复中不再显示。
~/.pollo/config.toml - 响应封装格式 — 所有成功的API响应都包裹在中。请始终从
{ "code": "SUCCESS", "message": "success", "data": { ... } }字段提取实际响应内容。data - 请求体封装格式 — 生成端点使用格式
{ "input": { ... } } - 图像输入需为URL — 使用图像转视频功能时,图像必须是HTTPS URL,不支持base64格式。对于本地文件,请使用上述文件上传流程。
- 提示词长度 — 不同模型要求不同(通常1000-2500字符),请查看对应品牌的参考文件
- 视频存储期限 — 生成的视频仅保留14天
- Webhook替代方案 — 除了轮询,还可以在请求体中传入
webhookUrl - 每个模型有独立的端点 — 路径模式为
/generation/{brand}/{model} - 先验证密钥 — 执行任何生成任务前,必须先完成密钥验证步骤。切勿跳过。
Reference Files
参考文件
Read these as needed (don't load all at once):
Resolve all bundled resources relative to this skill's root. Do not assume any machine-specific absolute path or a particular repo layout.
| File | When to Read |
|---|---|
| When generating with a specific brand's model |
| For auth, status polling, credits, webhooks, errors |
| For the full model→endpoint mapping table |
按需查看(无需一次性加载所有文件):
所有内置资源均以技能根目录为相对路径解析。请勿假设特定的机器绝对路径或仓库结构。
| 文件 | 查看时机 |
|---|---|
| 使用特定品牌的模型生成视频时 |
| 处理认证、状态轮询、信用额度、Webhook、错误相关问题时 |
| 需要查看完整的模型→端点映射表时 |