seedance
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSeedance AI API
Seedance AI API
Advanced video generation capabilities by ByteDance.
You can ask Seedance to handle video generation. Powered by BytePlus via the Pixazo API gateway.
字节跳动提供的高级视频生成能力。
你可以调用Seedance进行视频生成,该能力由BytePlus提供,并通过Pixazo API网关实现。
How to use this skill (agent instructions)
如何使用此技能(Agent操作指南)
When this skill triggers, follow this script. The user should only ever have to give you their API key once.
当触发此技能时,请遵循以下流程。用户只需提供一次API密钥即可。
Step 1 — Make sure you have a Pixazo API key
步骤1 — 确保你拥有Pixazo API密钥
Check for the API key in this order:
- environment variable
PIXAZO_API_KEY - file (one line, just the key)
~/.pixazo/api-key - The current conversation (user pasted it earlier)
If none of those have it, say to the user, verbatim:
I'll need your Pixazo API key once. Get it free at https://api-console.pixazo.ai/api_keys — sign in, click "Create new key", copy it, and paste it here. I'll save it toso you only do this once.~/.pixazo/api-key
When they paste the key, save it to () and proceed. Never ask twice.
~/.pixazo/api-keychmod 600按以下顺序检查API密钥:
- 环境变量
PIXAZO_API_KEY - 文件(单行内容,仅包含密钥)
~/.pixazo/api-key - 当前对话记录(用户之前已粘贴过密钥)
如果以上均未找到密钥,请一字不差地告知用户:
我需要你提供一次Pixazo API密钥。你可以在**https://api-console.pixazo.ai/api_keys**免费获取——登录后点击“Create new key”,复制密钥并粘贴到此处。我会将其保存到,你无需重复操作。~/.pixazo/api-key
当用户粘贴密钥后,将其保存到(设置权限)并继续后续步骤。切勿重复询问。
~/.pixazo/api-keychmod 600Step 2 — Pick the right operation
步骤2 — 选择合适的操作
| Version | Operation | apiId / operationId |
|---|---|---|
| Seedance 2.0 | Text to Video | |
| Seedance 2.0 | Image to video | |
| Seedance 2.0 | Reference to Video (Ref Image + Ref Video + Ref Audio to Video) | |
| Seedance 2.0 | Video to Video (Video Editing) | |
| Seedance 2.0 Fast | Text to Video | |
| Seedance 2.0 Fast | Image to video | |
| Seedance 2.0 Fast | Reference to Video (Ref Image + Ref Video + Ref Audio to Video) | |
| Seedance 2.0 Fast | Video to Video (Video Editing) | |
| Seedance 1.0 Lite | Image to Video (First/Last Frame to Video) | |
| Seedance 1.0 Pro | Image to Video | |
| Seedance 1.0 Pro | Text to Video | |
| 版本 | 操作 | apiId / operationId |
|---|---|---|
| Seedance 2.0 | 文本转视频 | |
| Seedance 2.0 | 图像转视频 | |
| Seedance 2.0 | 参考内容转视频(参考图像+参考视频+参考音频转视频) | |
| Seedance 2.0 | 视频转视频(视频编辑) | |
| Seedance 2.0 Fast | 文本转视频 | |
| Seedance 2.0 Fast | 图像转视频 | |
| Seedance 2.0 Fast | 参考内容转视频(参考图像+参考视频+参考音频转视频) | |
| Seedance 2.0 Fast | 视频转视频(视频编辑) | |
| Seedance 1.0 Lite | 图像转视频(首尾帧转视频) | |
| Seedance 1.0 Pro | 图像转视频 | |
| Seedance 1.0 Pro | 文本转视频 | |
Step 3 — Make the API call
步骤3 — 发起API调用
Endpoints
POST https://gateway.pixazo.ai/seedance-2-0/v1/text-to-videoPOST https://gateway.pixazo.ai/seedance-2-0/v1/first-last-frame-to-videoPOST https://gateway.pixazo.ai/seedance-2-0/v1/reference-to-videoPOST https://gateway.pixazo.ai/seedance-2-0/v1/edit-videoPOST https://gateway.pixazo.ai/seedance-2-0-fast/v1/text-to-video-fastPOST https://gateway.pixazo.ai/seedance-2-0-fast/v1/first-last-frame-to-video-fastPOST https://gateway.pixazo.ai/seedance-2-0-fast/v1/reference-to-video-fastPOST https://gateway.pixazo.ai/seedance-2-0-fast/v1/edit-video-fastPOST https://gateway.pixazo.ai/byteplus/v1/generateFrame2VideoTaskPOST https://gateway.pixazo.ai/byteplus/v1/generateImage2VideoTaskPOST https://gateway.pixazo.ai/byteplus/v1/generateVideoTask
Sample request (primary operation)
bash
curl -X POST 'https://gateway.pixazo.ai/seedance-2-0/v1/text-to-video' \
-H 'Content-Type: application/json' \
-H "Ocp-Apim-Subscription-Key: $PIXAZO_API_KEY" \
-d '{
"content": [{"type": "text", "text": "A cat walking on the beach"}]
}'Python
python
import os, requests
r = requests.post(
"https://gateway.pixazo.ai/seedance-2-0/v1/text-to-video",
headers={
"Ocp-Apim-Subscription-Key": os.environ["PIXAZO_API_KEY"],
"Content-Type": "application/json",
},
json={
"content": [{"type": "text", "text": "A cat walking on the beach"}]
},
timeout=300,
)
r.raise_for_status()
print(r.json())Node.js
js
const res = await fetch('https://gateway.pixazo.ai/seedance-2-0/v1/text-to-video', {
method: 'POST',
headers: {
'Ocp-Apim-Subscription-Key': process.env.PIXAZO_API_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"content": [{"type": "text", "text": "A cat walking on the beach"}]
}),
});
console.log(await res.json());接口地址
POST https://gateway.pixazo.ai/seedance-2-0/v1/text-to-videoPOST https://gateway.pixazo.ai/seedance-2-0/v1/first-last-frame-to-videoPOST https://gateway.pixazo.ai/seedance-2-0/v1/reference-to-videoPOST https://gateway.pixazo.ai/seedance-2-0/v1/edit-videoPOST https://gateway.pixazo.ai/seedance-2-0-fast/v1/text-to-video-fastPOST https://gateway.pixazo.ai/seedance-2-0-fast/v1/first-last-frame-to-video-fastPOST https://gateway.pixazo.ai/seedance-2-0-fast/v1/reference-to-video-fastPOST https://gateway.pixazo.ai/seedance-2-0-fast/v1/edit-video-fastPOST https://gateway.pixazo.ai/byteplus/v1/generateFrame2VideoTaskPOST https://gateway.pixazo.ai/byteplus/v1/generateImage2VideoTaskPOST https://gateway.pixazo.ai/byteplus/v1/generateVideoTask
示例请求(主要操作)
bash
curl -X POST 'https://gateway.pixazo.ai/seedance-2-0/v1/text-to-video' \
-H 'Content-Type: application/json' \
-H "Ocp-Apim-Subscription-Key: $PIXAZO_API_KEY" \
-d '{
"content": [{"type": "text", "text": "A cat walking on the beach"}]
}'Python示例
python
import os, requests
r = requests.post(
"https://gateway.pixazo.ai/seedance-2-0/v1/text-to-video",
headers={
"Ocp-Apim-Subscription-Key": os.environ["PIXAZO_API_KEY"],
"Content-Type": "application/json",
},
json={
"content": [{"type": "text", "text": "A cat walking on the beach"}]
},
timeout=300,
)
r.raise_for_status()
print(r.json())Node.js示例
js
const res = await fetch('https://gateway.pixazo.ai/seedance-2-0/v1/text-to-video', {
method: 'POST',
headers: {
'Ocp-Apim-Subscription-Key': process.env.PIXAZO_API_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"content": [{"type": "text", "text": "A cat walking on the beach"}]
}),
});
console.log(await res.json());Step 4 — Poll until ready, then show the user
步骤4 — 轮询直到任务完成,然后向用户展示结果
Video generation is asynchronous. The first response returns a (or ). Then poll a status endpoint until the video is ready.
task_idrequest_idTypical loop:
python
import time, requests, os
KEY = os.environ["PIXAZO_API_KEY"]
HEADERS = {"Ocp-Apim-Subscription-Key": KEY, "Content-Type": "application/json"}视频生成为异步操作。首次响应会返回(或)。之后需要轮询状态接口,直到视频生成完成。
task_idrequest_id典型轮询循环:
python
import time, requests, os
KEY = os.environ["PIXAZO_API_KEY"]
HEADERS = {"Ocp-Apim-Subscription-Key": KEY, "Content-Type": "application/json"}1) Submit
1) 提交任务
submit = requests.post("https://gateway.pixazo.ai/seedance-2-0/v1/text-to-video", headers=HEADERS, json={...}).json()
task_id = submit.get("task_id") or submit.get("request_id") or submit.get("id")
submit = requests.post("https://gateway.pixazo.ai/seedance-2-0/v1/text-to-video", headers=HEADERS, json={...}).json()
task_id = submit.get("task_id") or submit.get("request_id") or submit.get("id")
2) Poll (every 5–10s; total cap ~10 min for video, ~3 min for music)
2) 轮询(每5-10秒一次;视频生成最长约10分钟,音乐约3分钟)
while True:
status = requests.get(f"https://gateway.pixazo.ai/seedance-2-0/v1/result/{task_id}", headers=HEADERS).json()
if status.get("status") in ("completed", "succeeded", "ready", "done"):
break
if status.get("status") in ("failed", "error"):
raise RuntimeError(status.get("error") or "generation failed")
time.sleep(8)
while True:
status = requests.get(f"https://gateway.pixazo.ai/seedance-2-0/v1/result/{task_id}", headers=HEADERS).json()
if status.get("status") in ("completed", "succeeded", "ready", "done"):
break
if status.get("status") in ("failed", "error"):
raise RuntimeError(status.get("error") or "generation failed")
time.sleep(8)
3) Pull the result URL out (field varies — usually output_url, video_url, audio_url, or url)
3) 提取结果URL(字段可能不同——通常为output_url、video_url、audio_url或url)
result_url = status.get("output_url") or status.get("video_url") or status.get("audio_url") or status.get("url")
The exact polling endpoint and "done" status string vary by model — fetch the full reference for this model's polling shape:
> **Fetch:** `https://www.pixazo.ai/models/seedance.md`
Show the result URL to the user when ready (offer to download, share, or generate variations).
---result_url = status.get("output_url") or status.get("video_url") or status.get("audio_url") or status.get("url")
不同模型的轮询接口和“完成”状态字符串可能不同——请获取该模型的完整参考文档:
> **获取地址:** `https://www.pixazo.ai/models/seedance.md`
当视频生成完成后,向用户展示结果URL(可提供下载、分享或生成变体的选项)。
---When something goes wrong
异常处理
| Status | Meaning | Tell the user |
|---|---|---|
| 401 | API key missing/wrong | "Your Pixazo API key looks invalid. Get a fresh one at https://api-console.pixazo.ai/api_keys" |
| 402 | Out of credits | "Your Pixazo account is out of credits. Top up at https://api-console.pixazo.ai/dashboard" |
| 429 | Rate limited | "Pixazo is rate-limiting — let me wait 5s and retry." (do it once) |
4xx with | Validation issue (e.g. bad prompt or missing field) | Show the error message verbatim and suggest a fix |
| 5xx | Transient | "Pixazo had a hiccup — let me retry." (one retry, then surface the error) |
| 状态码 | 含义 | 告知用户的内容 |
|---|---|---|
| 401 | API密钥缺失或无效 | "你的Pixazo API密钥无效,请在https://api-console.pixazo.ai/api_keys获取新密钥" |
| 402 | 余额不足 | "你的Pixazo账户余额不足,请在https://api-console.pixazo.ai/dashboard进行充值" |
| 429 | 请求频率受限 | "Pixazo正在限制请求频率——我将等待5秒后重试。"(仅重试一次) |
4xx且响应体包含 | 验证错误(如提示词无效或字段缺失) | 直接显示错误信息并建议修复方案 |
| 5xx | 临时服务异常 | "Pixazo服务出现临时故障——我将重试一次。"(仅重试一次,若仍失败则显示错误) |
Cost
费用说明
Per-call cost varies by model and resolution. The user can check their balance and per-call rate at https://api-console.pixazo.ai/dashboard.
每次调用的费用因模型和分辨率而异。用户可在https://api-console.pixazo.ai/dashboard查看账户余额和单次调用费率。
Full reference
完整参考文档
For complete schemas, every parameter, error codes, and per-version differences:
Fetch:https://www.pixazo.ai/models/seedance.md
Load that URL when you need exact parameter names, accepted values, or aren't sure about a field. The HTML version is at .
https://www.pixazo.ai/models/seedance如需完整的参数 schema、所有参数说明、错误码以及版本差异:
获取地址:https://www.pixazo.ai/models/seedance.md
当你需要确切的参数名称、可接受值或对字段存疑时,请加载该URL。HTML版本地址为。
https://www.pixazo.ai/models/seedanceRelated Pixazo skills
相关Pixazo技能
- Other video generation models: ,
happy-horse,p-video,sora,veo,runway,kling,pika,higgsfield,genflare,omnihuman,lucy-edit,grok-imagine,ltx,luma,hailuo,mochi,stable-diffusion,veed,vidu,wan,pixversekandinsky - Want everything?
npx skills add Pixazo-AI/skills --skill '*'
- 其他视频生成模型: ,
happy-horse,p-video,sora,veo,runway,kling,pika,higgsfield,genflare,omnihuman,lucy-edit,grok-imagine,ltx,luma,hailuo,mochi,stable-diffusion,veed,vidu,wan,pixversekandinsky - 获取全部技能:
npx skills add Pixazo-AI/skills --skill '*'