AIYun-Router 上游
平台已接入 AIYun-Router (New API 聚合网关)作为上游供应商。客户仍只使用本平台 https://www.openmodels.com.cn/v1 与平台 API Key,无需持有 AIYun Key。
上游资料
- 控制台 / 登录
- API 文档(Apifox)
- 使用教程(飞书)
- 上游请求地址:
https://cnapi.aiyunrouter.com
客户侧可用接口(本平台)
| 本平台 API | 上游映射 | 说明 |
|---|---|---|
| POST /v1/chat/completions | POST /v1/chat/completions | 文本对话(OpenAI 兼容,支持流式) |
| GET /v1/models | 同步自上游 /v1/models | 返回平台已挂路由的模型 |
| POST /v1/images/generations | POST /v1/images/generations | 图像生成(已上线) |
| POST /v1/videos/generations | POST /api/v3/contents/generations/tasks | Seedance 2.0 异步视频 |
| GET /v1/videos/generations/{id} | GET /api/v3/contents/generations/tasks/{id} | 视频任务查询 |
| GET /v1/videos/generations | GET /api/v3/contents/generations/tasks | 视频任务列表 |
| DELETE /v1/videos/generations/{id} | DELETE /api/v3/contents/generations/tasks/{id} | 取消排队或删除已结束任务 |
聊天示例(默认扁平 id,与其它家一致)
curl -X POST "https://www.openmodels.com.cn/v1/chat/completions" \
-H "Authorization: Bearer <OPENMODELS_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"model": "<model-id>",
"messages": [{"role":"user","content":"你好"}]
}'Seedance 视频示例
curl -X POST "https://www.openmodels.com.cn/v1/videos/generations" \
-H "Authorization: Bearer <OPENMODELS_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seedance-2-0-filter-off",
"content": [
{"type":"text","text":"一只猫在草地上奔跑"},
{"type":"image_url","image_url":{"url":"https://example.com/frame.jpg"},"role":"first_frame"}
],
"duration": 5,
"resolution": "720p",
"ratio": "16:9",
"generate_audio": true
}'图像示例
curl -X POST "https://www.openmodels.com.cn/v1/images/generations" \
-H "Authorization: Bearer <OPENMODELS_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-1",
"prompt": "水彩风格的山间小屋",
"n": 1,
"size": "1024x1024"
}'说明
- 默认用扁平 model id;老客户参数无需因接入新上游而修改
- 目录已有同名模型时,新上游挂为备路(priority 更大),不抢主路
- 对客路由别名用 opaque lane(如 lane-aurora),不暴露进货渠道真名
- 可选定点:lane-aurora/{id} 或 Header x-pengyoo-provider: lane-aurora
- 可用模型以定价页 / GET /v1/models 为准
- Kling / Sora / 即梦等上游专有格式暂经平台统一契约暴露;优先使用上表已上线接口
- 素材库使用本平台 /v1/assets;默认移动云/火山。jade-test-seedance-2.0 须传 provider=jade,与视频同租户才能引用 asset://
- 多上游约定详见 模型 ID 与多上游路由