openai sora video 视频模型
- 2025.10.02 本站已经支持 openai sora v2 视频模型
- 一般视频格式
- 支持 dalle 格式
/v1/images/generations
参考图/v1/images/edits
- 支持 chat 格式
- 一张狗狗图片生成出来的效果下线视频
- 计费:2000 积分/次
在线测试
在线测试
- 1.访问 https://video.ddaiai.com (如果被墙了,换下二级域名前缀
suibian
) - 2.如果发现被墙了 可以自己换地址
https://suibian.ddaiai.com
把suibian
换其他的 如https://2025.ddaiai.com
都能访问
设置
- 打开 https://video.ddaiai.com/#/video/index?tab=video
- 下图相应的地方设置
- 可灵 接口地址:https://api.openai-hk.com
- 可灵 KEY: hk-你的 apiKey
效果
API
- 约定 header 中含有
Authorization : Bearer hk-你的key
1. 一般视频格式
1.1 发起任务
shell
curl --request POST \
--url https://api.openai-hk.com/sora/v1/video/create \
--header 'Authorization: Bearer hk-your-key' \
--header 'Connection: keep-alive' \
--header 'Content-Type: application/json' \
--data '{
"images": [
"https://www.open-hk.com/res/img/open.png"
],
"model": "sora-2",
"orientation": "landscape",
"size": "large",
"duration": 15,
"prompt": "飞盘在公园飞行"
}'
curl --request POST \
--url https://api.openai-hk.com/sora/v1/video/create \
--header 'Authorization: Bearer hk-your-key' \
--header 'Connection: keep-alive' \
--header 'Content-Type: application/json' \
--data '{
"images": [
"https://www.open-hk.com/res/img/open.png"
],
"model": "sora-2",
"orientation": "landscape",
"size": "large",
"duration": 15,
"prompt": "飞盘在公园飞行"
}'
请求体关键字说明
字段 类型 说明 prompt string 生成视频的提示词 model string 生成视频的模型名称 duration int 10
15
images string[] 生成视频的图片列表 url 或者 base64 orientation string landscape
横屏portrait
竖屏size string large
高清small
一般返回体
json
{
"id": "asdsdssdsdhao",
"status": "pending"
}
{
"id": "asdsdssdsdhao",
"status": "pending"
}
- 关键字说明
字段 | 类型 | 说明 |
---|---|---|
id | string | 任务 id |
status | string | 任务状态 completed failed pending video_generating running |
video_url | string | 视频地址 |
1.2 查询任务状态
shell
curl --request GET \
--url https://api.openai-hk.com/sora/v1/video/feed/asdsdssdsdhao \
--header 'Authorization: Bearer hk-your-hk-key' \
--header 'Content-Type: application/json'
curl --request GET \
--url https://api.openai-hk.com/sora/v1/video/feed/asdsdssdsdhao \
--header 'Authorization: Bearer hk-your-hk-key' \
--header 'Content-Type: application/json'
- 返回体
json
{
"id": "asdsdssdsdhao",
"status": "completed",
"video_url": "https://filesystem.site/cdn/20250806/5VpavR5qkSpnsbFbTbTpC6aVPQMrgi.mp4"
}
{
"id": "asdsdssdsdhao",
"status": "completed",
"video_url": "https://filesystem.site/cdn/20250806/5VpavR5qkSpnsbFbTbTpC6aVPQMrgi.mp4"
}
2. chat 格式
shell
curl 'https://api.open-hk.com/v1/chat/completions' \
-H 'Authorization: Bearer hk-your-api-key' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data '{
"max_tokens": 8192,
"model": "sora_video2",
"temperature": 0.5,
"top_p": 1,
"presence_penalty": 0,
"frequency_penalty": 0,
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "狗狗在草地上打滚"
},
{
"type": "image_url",
"image_url": {
"url": "你的图片url"
}
}
]
}
],
"stream": false
}'
curl 'https://api.open-hk.com/v1/chat/completions' \
-H 'Authorization: Bearer hk-your-api-key' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data '{
"max_tokens": 8192,
"model": "sora_video2",
"temperature": 0.5,
"top_p": 1,
"presence_penalty": 0,
"frequency_penalty": 0,
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "狗狗在草地上打滚"
},
{
"type": "image_url",
"image_url": {
"url": "你的图片url"
}
}
]
}
],
"stream": false
}'
3. dalle 格式
3.1 文生视频
shell
curl https://api.openai-hk.com/v1/images/generations \
-H 'Authorization: Bearer hk-替换为你的key' \
-H "Content-Type: application/json" \
-d '{
"model": "sora_video2",
"prompt": "狗狗在草地上打滚",
"n": 1,
"size": "720x720",
"quality": "low"
}'
curl https://api.openai-hk.com/v1/images/generations \
-H 'Authorization: Bearer hk-替换为你的key' \
-H "Content-Type: application/json" \
-d '{
"model": "sora_video2",
"prompt": "狗狗在草地上打滚",
"n": 1,
"size": "720x720",
"quality": "low"
}'
3.2 图生视频
shell
curl -X POST "https://api.openai-hk.com/v1/images/edits" \
-H "Authorization: Bearer hk-替换为你的key" \
-F "model=sora_video2" \
-F "image[]=@body-lotion.png" \
-F 'prompt=狗狗在草地上打滚'
curl -X POST "https://api.openai-hk.com/v1/images/edits" \
-H "Authorization: Bearer hk-替换为你的key" \
-F "model=sora_video2" \
-F "image[]=@body-lotion.png" \
-F 'prompt=狗狗在草地上打滚'