启航 AI
  1. 视频生成模型
启航 AI
  • 启航 AI 简介
  • 启航 AI 基本介绍
    • 快速上手
    • 联系客服
    • 接口地址
  • 聊天模型
    • 聊天请求
      POST
  • 绘图模型
    • 绘图(Image 格式)
      POST
    • 绘图(Chat 格式)
      POST
    • 改图(Chat 格式)
      POST
  • 语音生成模型
    • 文本转音频
      POST
  • 视频生成模型
    • Sora 视频生成
      POST
  • 语音克隆
    • 创建语音模型
  • 嵌入模型
    • 创建嵌入
      POST
  • 重排序模型
    • 创建重排序
      POST
  • 语音识别模型
    • 音频转文本
      POST
  • Suno 音乐生成
    • 创建音乐生成任务
      POST
    • 查询音乐生成任务
      GET
  • 聚合 API 接口
    • 接口速查表
  • 其他 API 接口
    • 获取模型列表
      GET
  1. 视频生成模型

Sora 视频生成

POST
/v1/chat/completions
通常生成时间 120s+,耐心等待

请求参数

Header 参数

Body 参数application/json

示例
{
    "model": "sora-2",
    "messages": [
        {
            "role": "user",
            "content": "飞机起飞"
        }
    ],
    "stream": true,
    "stream_options": {
        "include_usage": true
    }
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/v1/chat/completions' \
--header 'Authorization: {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "sora-2",
    "messages": [
        {
            "role": "user",
            "content": "飞机起飞"
        }
    ],
    "stream": true,
    "stream_options": {
        "include_usage": true
    }
}'

返回响应

🟢200成功
application/json
Body

示例
data: {
    "id": "",
    "object": "chat.completion.chunk",
    "created": 0,
    "model": "sora-2",
    "system_fingerprint": null,
    "choices": [
        {
            "index": 0,
            "delta": {
                "role": "assistant"
            },
            "logprobs": null,
            "finish_reason": null
        }
    ],
    "usage": {}
}

data: {
    "id": "",
    "object": "chat.completion.chunk",
    "created": 0,
    "model": "sora-2",
    "system_fingerprint": null,
    "choices": [
        {
            "index": 0,
            "delta": {
                "content": "```json\n{\n    \"prompt\": \"飞机起飞\",\n    \"mode\": \"横屏模式\"\n}\n```\n\n"
            },
            "logprobs": null,
            "finish_reason": null
        }
    ],
    "usage": {}
}

data: {
    "id": "",
    "object": "chat.completion.chunk",
    "created": 0,
    "model": "sora-2",
    "system_fingerprint": null,
    "choices": [
        {
            "index": 0,
            "delta": {
                "content": "\u003e ⌛️ 任务正在队列中,请耐心等待...\n\n"
            },
            "logprobs": null,
            "finish_reason": null
        }
    ],
    "usage": {}
}

data: {
    "id": "",
    "object": "chat.completion.chunk",
    "created": 0,
    "model": "sora-2",
    "system_fingerprint": null,
    "choices": [
        {
            "index": 0,
            "delta": {
                "content": "\u003e 🏃 进度:36.0%\n\n"
            },
            "logprobs": null,
            "finish_reason": null
        }
    ],
    "usage": {}
}

data: {
    "id": "",
    "object": "chat.completion.chunk",
    "created": 0,
    "model": "sora-2",
    "system_fingerprint": null,
    "choices": [
        {
            "index": 0,
            "delta": {
                "content": "\u003e 🏃 进度:44.0%\n\n"
            },
            "logprobs": null,
            "finish_reason": null
        }
    ],
    "usage": {}
}

data: {
    "id": "",
    "object": "chat.completion.chunk",
    "created": 0,
    "model": "sora-2",
    "system_fingerprint": null,
    "choices": [
        {
            "index": 0,
            "delta": {
                "content": "\u003e 🏃 进度:52.4%\n\n"
            },
            "logprobs": null,
            "finish_reason": null
        }
    ],
    "usage": {}
}

data: {
    "id": "",
    "object": "chat.completion.chunk",
    "created": 0,
    "model": "sora-2",
    "system_fingerprint": null,
    "choices": [
        {
            "index": 0,
            "delta": {
                "content": "\u003e 🏃 进度:60.2%\n\n"
            },
            "logprobs": null,
            "finish_reason": null
        }
    ],
    "usage": {}
}

data: {
    "id": "",
    "object": "chat.completion.chunk",
    "created": 0,
    "model": "sora-2",
    "system_fingerprint": null,
    "choices": [
        {
            "index": 0,
            "delta": {
                "content": "\u003e 🏃 进度:67.3%\n\n"
            },
            "logprobs": null,
            "finish_reason": null
        }
    ],
    "usage": {}
}

data: {
    "id": "",
    "object": "chat.completion.chunk",
    "created": 0,
    "model": "sora-2",
    "system_fingerprint": null,
    "choices": [
        {
            "index": 0,
            "delta": {
                "content": "\u003e 🏃 进度:73.8%\n\n"
            },
            "logprobs": null,
            "finish_reason": null
        }
    ],
    "usage": {}
}

data: {
    "id": "",
    "object": "chat.completion.chunk",
    "created": 0,
    "model": "sora-2",
    "system_fingerprint": null,
    "choices": [
        {
            "index": 0,
            "delta": {
                "content": "\u003e 🏃 进度:80.0%\n\n"
            },
            "logprobs": null,
            "finish_reason": null
        }
    ],
    "usage": {}
}

data: {
    "id": "",
    "object": "chat.completion.chunk",
    "created": 0,
    "model": "sora-2",
    "system_fingerprint": null,
    "choices": [
        {
            "index": 0,
            "delta": {
                "content": "\u003e 🏃 进度:81.0%\n\n"
            },
            "logprobs": null,
            "finish_reason": null
        }
    ],
    "usage": {}
}

data: {
    "id": "",
    "object": "chat.completion.chunk",
    "created": 0,
    "model": "sora-2",
    "system_fingerprint": null,
    "choices": [
        {
            "index": 0,
            "delta": {
                "content": "\u003e 🏃 进度:90.0%\n\n"
            },
            "logprobs": null,
            "finish_reason": null
        }
    ],
    "usage": {}
}

data: {
    "id": "",
    "object": "chat.completion.chunk",
    "created": 0,
    "model": "sora-2",
    "system_fingerprint": null,
    "choices": [
        {
            "index": 0,
            "delta": {
                "content": "\u003e 🏃 进度:94.3%\n\n"
            },
            "logprobs": null,
            "finish_reason": null
        }
    ],
    "usage": {}
}

data: {
    "id": "",
    "object": "chat.completion.chunk",
    "created": 0,
    "model": "sora-2",
    "system_fingerprint": null,
    "choices": [
        {
            "index": 0,
            "delta": {
                "content": "\u003e 🏃 进度:96.1%\n\n"
            },
            "logprobs": null,
            "finish_reason": null
        }
    ],
    "usage": {}
}

data: {
    "id": "",
    "object": "chat.completion.chunk",
    "created": 0,
    "model": "sora-2",
    "system_fingerprint": null,
    "choices": [
        {
            "index": 0,
            "delta": {
                "content": "\u003e 🏃 进度:97.4%\n\n"
            },
            "logprobs": null,
            "finish_reason": null
        }
    ],
    "usage": {}
}

data: {
    "id": "",
    "object": "chat.completion.chunk",
    "created": 0,
    "model": "sora-2",
    "system_fingerprint": null,
    "choices": [
        {
            "index": 0,
            "delta": {
                "content": "\u003e ✅ 视频生成成功,[点击这里](https://midjourney-plus.oss-us-west-1.aliyuncs.com/sora/31aa3388-5219-4098-a1af-2fb42f524d20.mp4) 查看视频~~~\n\n"
            },
            "logprobs": null,
            "finish_reason": null
        }
    ],
    "usage": {}
}

data: {
    "id": "",
    "object": "chat.completion.chunk",
    "created": 0,
    "model": "sora-2",
    "system_fingerprint": null,
    "choices": [
        {
            "index": 0,
            "delta": {},
            "logprobs": null,
            "finish_reason": "stop"
        }
    ],
    "usage": {
        "prompt_tokens": 12,
        "completion_tokens": 257,
        "total_tokens": 269,
        "prompt_tokens_details": {
            "cached_tokens": 0,
            "audio_tokens": 0,
            "text_tokens": 0,
            "image_tokens": 0
        },
        "completion_tokens_details": {
            "reasoning_tokens": 0,
            "audio_tokens": 0,
            "text_tokens": 0
        },
        "input_tokens": 0,
        "output_tokens": 0,
        "input_tokens_details": null
    }
}

data: [DONE
]
修改于 2025-10-24 08:32:09
上一页
文本转音频
下一页
创建语音模型
Built with