내용 업데이트: 2026-06-30
통합 비디오 API
Crazyrouter는 통합 비디오 생성 인터페이스를 제공하며, 여러 비디오 모델을 동일한 API 형식으로 호출할 수 있습니다.Seedance 현재 통합 /v1/video/* 프로토콜은 권장되지 않습니다; 원본 /volc/v1/contents/generations/tasks를 사용하세요. Seedance를 참조하세요.지원 모델
| 모델 | 설명 |
|---|---|
veo-3.1-fast | Google Veo 3.1 Fast |
veo-3.1-quality | Google Veo 3.1 Quality |
wan2.2-t2v-plus | Wan 텍스트-비디오 |
wan2.5-t2v-preview | Wan 텍스트-비디오 |
비디오 생성
POST /v1/video/create
요청 파라미터
| 파라미터 | 타입 | 필수 | 설명 |
|---|---|---|---|
model | string | 예 | 모델 이름 |
prompt | string | 예 | 비디오 설명 프롬프트 |
aspect_ratio | string | 아니오 | 가로세로 비율: 16:9, 9:16, 1:1 |
size | string | 아니오 | 비디오 크기, 예: 1280x720 |
images | array | 아니오 | 현재 공개된 이미지-비디오 기능에는 1 장의 이미지 URL을 주로 전달합니다 |
duration | integer | 아니오 | 비디오 길이(초) |
요청 예시
curl -X POST https://api.crazyrouter.com/v1/video/create \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "veo-3.1-quality",
"prompt": "一只金毛犬在海滩上奔跑,慢动作,电影级画质",
"aspect_ratio": "16:9"
}'
import requests
response = requests.post(
"https://api.crazyrouter.com/v1/video/create",
headers={
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_KEY"
},
json={
"model": "veo-3.1-quality",
"prompt": "一只金毛犬在海滩上奔跑,慢动作,电影级画质",
"aspect_ratio": "16:9"
}
)
data = response.json()
task_id = data["task_id"]
print(f"任务 ID: {task_id}")
생성 응답
{
"task_id": "video_task_abc123",
"status": "processing"
}
이미지-비디오
images 파라미터에 참고 이미지를 입력하세요:
cURL
curl -X POST https://api.crazyrouter.com/v1/video/create \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "wan-ai/wan2.1-i2v-14b-720p",
"prompt": "图片中的人物开始微笑并挥手",
"images": ["https://example.com/portrait.jpg"],
"aspect_ratio": "16:9"
}'
작업 조회
GET /v1/video/query?id={task_id}
요청 예시
cURL
curl "https://api.crazyrouter.com/v1/video/query?id=video_task_abc123" \
-H "Authorization: Bearer YOUR_API_KEY"
조회 응답(처리 중)
{
"code": "success",
"message": "",
"data": {
"task_id": "video_task_abc123",
"status": "processing",
"url": ""
}
}
조회 응답(완료)
{
"code": "success",
"message": "",
"data": {
"task_id": "video_task_abc123",
"status": "SUCCESS",
"url": "https://media.crazyrouter.com/task-artifacts/example.mp4",
"artifact_url": "https://media.crazyrouter.com/task-artifacts/example.mp4"
}
}
작업 상태
| 상태 | 설명 |
|---|---|
queued | 대기 중 |
processing | 처리 중 |
SUCCESS | 완료 |
failed | 실패 |
전체 과정 예시
Python
import requests
import time
API_KEY = "YOUR_API_KEY"
BASE_URL = "https://api.crazyrouter.com"
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {API_KEY}"
}
# 1. 创建视频任务
resp = requests.post(f"{BASE_URL}/v1/video/create", headers=headers, json={
"model": "veo-3.1-quality",
"prompt": "一只金毛犬在海滩上奔跑,慢动作",
"aspect_ratio": "16:9"
})
task_id = resp.json()["task_id"]
print(f"任务已创建: {task_id}")
# 2. 轮询查询状态
while True:
resp = requests.get(f"{BASE_URL}/v1/video/query?id={task_id}", headers=headers)
result = resp.json().get("data", resp.json())
status = result["status"]
print(f"状态: {status}")
if status == "SUCCESS":
print(f"视频地址: {result.get('artifact_url') or result.get('url')}")
break
elif status == "failed":
print("视频生成失败")
break
time.sleep(10)
비디오 생성에는 보통 1-5분이 소요되며, 10초 간격으로 폴링을 권장합니다.