fifth-domain/光之湖/ICE-GL-SF001-朔风/SF-REF-API-MANUAL-短剧三引擎-20260715.hdlp

158 lines
5.2 KiB
Plaintext
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# SF-REF-API-MANUAL-短剧三引擎-20260715
> 朔风·短剧第1集视频生成API调用手册
> 创建时间2026-07-15T13:52 CST
> 版本v1.0
> 湖灯连接:待创建
---
## 一、引擎总览
| 引擎 | 类型 | 端点 | 本地令牌路径 |
|------|------|------|-------------|
| 火山方舟 | 生图/视频/LLM | `https://ark.cn-beijing.volces.com/api/v3` | `~/.guanghu-tokens/volcano-ark.token` |
| 可灵 | 视频 | `https://openapi.klingai.com` | `~/.guanghu-tokens/kling.token` |
| 万相(百炼) | 视频/图片 | `https://dashscope.aliyuncs.com` | `~/.guanghu-tokens/wanxiang.token` |
---
## 二、火山方舟Ark
### 2.1 生图 - 即梦3.0Seedream 4.0
**模型名**`doubao-seedream-4-0-250828`
**额度**1000张需控制台查看余量
**端点**`POST https://ark.cn-beijing.volces.com/api/v3/images/generations`
```bash
curl -X POST "https://ark.cn-beijing.volces.com/api/v3/images/generations" \
-H "Authorization: Bearer $(cat ~/.guanghu-tokens/volcano-ark.token)" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seedream-4-0-250828",
"prompt": "古风仙侠,一位白发老者站在山巅,衣袂飘飘,水墨风格",
"n": 1,
"size": "1024x1024"
}'
```
### 2.2 视频 - Seedance
| 模型 | 用途 | 价格 |
|------|------|------|
| `doubao-seedance-2-0-mini-260615` | 日常主力(便宜) | 低 |
| `doubao-seedance-2-0-260128` | 中等质量 | 中 |
| `doubao-seedance-1-0-pro-250528` | 大场景/复杂运镜 | 高 |
**端点**`POST https://ark.cn-beijing.volces.com/api/v3/video/generations`(待确认)
### 2.3 LLM - 小云雀Seed 2.1 Pro
**模型名**`doubao-seed-2-1-pro-260628`
**用途**:剧本解析、提示词优化、镜头描述生成
**端点**`POST https://ark.cn-beijing.volces.com/api/v3/chat/completions`
```bash
curl -X POST "https://ark.cn-beijing.volces.com/api/v3/chat/completions" \
-H "Authorization: Bearer $(cat ~/.guanghu-tokens/volcano-ark.token)" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seed-2-1-pro-260628",
"messages": [{"role": "user", "content": "解析这段剧本..."}]
}'
```
---
## 三、可灵Kling
### 3.1 文生视频
**模型名**`kling-v2-5-turbo`std模式
**端点**`POST https://openapi.klingai.com/v1/videos/text2video`
**查询**`GET https://openapi.klingai.com/v1/videos/text2video/{task_id}`
**积分**1.5积分/5秒96→94.57月21日到期
```bash
# 创建任务
curl -X POST "https://openapi.klingai.com/v1/videos/text2video" \
-H "Authorization: Bearer $(cat ~/.guanghu-tokens/kling.token)" \
-H "Content-Type: application/json" \
-d '{
"model_name": "kling-v2-5-turbo",
"prompt": "写实风格,武侠打斗,刀光剑影",
"duration": "5",
"mode": "std"
}'
# 查询结果
curl -s "https://openapi.klingai.com/v1/videos/text2video/{task_id}" \
-H "Authorization: Bearer $(cat ~/.guanghu-tokens/kling.token)"
```
**返回字段**`data.task_status`submitted→processing→succeed`data.task_result.videos[0].url`
---
## 四、万相 / 百炼DashScope
### 4.1 文生视频Wan2.7
**模型名**`wan2.7-t2v-2026-06-12`
**端点**`POST https://dashscope.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis`
**查询**`GET https://dashscope.aliyuncs.com/api/v1/tasks/{task_id}`
**协议**异步X-DashScope-Async: enable
```bash
# 创建任务
curl -X POST "https://dashscope.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis" \
-H "X-DashScope-Async: enable" \
-H "Authorization: Bearer $(cat ~/.guanghu-tokens/wanxiang.token)" \
-H "Content-Type: application/json" \
-d '{
"model": "wan2.7-t2v-2026-06-12",
"input": {"prompt": "仙侠世界,云雾缭绕的山峰,御剑飞行"},
"parameters": {"duration": 5, "resolution": "720P"}
}'
# 查询结果
curl -s "https://dashscope.aliyuncs.com/api/v1/tasks/{task_id}" \
-H "Authorization: Bearer $(cat ~/.guanghu-tokens/wanxiang.token)"
```
**返回字段**`output.task_status`PENDING→RUNNING→SUCCEEDED`output.video_url`
### 4.2 图片生成Wan2.7
**模型名**`wan2.7-image` / `wan2.7-image-pro`
**端点**`POST https://dashscope.aliyuncs.com/api/v1/services/aigc/image-generation/generation`
```bash
curl -X POST "https://dashscope.aliyuncs.com/api/v1/services/aigc/image-generation/generation" \
-H "X-DashScope-Async: enable" \
-H "Authorization: Bearer $(cat ~/.guanghu-tokens/wanxiang.token)" \
-H "Content-Type: application/json" \
-d '{
"model": "wan2.7-image",
"input": {"prompt": "古风角色立绘,白衣剑客,水墨背景"}
}'
```
---
## 五、视频生成优先级策略
| 优先级 | 引擎 | 模型 | 场景 |
|--------|------|------|------|
| 1 | 可灵 | kling-v2-5-turbo | 优先消耗7/21到期 |
| 2 | 万相 | wan2.7-t2v | 大场景/运镜 |
| 3 | 火山 | seedance-2-0-mini | 日常/便宜兜底 |
| 3 | 火山 | seedance-1-0-pro | 复杂运镜(贵) |
## 六、图片生成优先级策略
| 优先级 | 引擎 | 模型 | 额度 |
|--------|------|------|------|
| 1 | 火山 | doubao-seedream-4-0 | 即梦3.0·1000张 |
| 2 | 万相 | wan2.7-image / pro | 按量计费 |