Skip to content

openai sora video モデル

  • 2025.10.02 このサイトは openai sora v2 動画モデルに対応しました
  • 標準動画フォーマット
  • dalle フォーマット /v1/images/generations と参照画像 /v1/images/edits に対応
  • チャットフォーマットに対応
  • 犬の画像から生成されたサンプル動画: サンプル動画
  • 料金: sora-2 2000 クレジット/リクエスト、sora-2-pro 30000 クレジット/リクエスト

オンラインテスト

オンラインテスト

    1. https://video.ddaiai.com にアクセス(ブロックされている場合は、suibian など別のサブドメインプレフィックスをお試しください)
    1. ブロックされている場合は、アドレスを自分で変更できます:https://suibian.ddaiai.comsuibian を別の文字列に置き換えてください。例:https://2025.ddaiai.com、すべて動作します

設定

google-veo

結果

sora-2

API

  • すべてのリクエストはヘッダーに Authorization: Bearer hk-your-key を含める必要があります

1. 標準動画フォーマット

  • 標準フォーマットは2ステッププロセスです
  • タスクを送信して task_id を取得
  • task_id を使用してタスクステータスを照会

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-pro",
    "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-pro",
    "orientation": "landscape",
    "size": "large",
    "duration": 15,
    "prompt": "飞盘在公园飞行"
}'
  • sora-2-produrationsize パラメータに対応しています

  • sora-2 はデフォルトで非HDで10秒間です

  • リクエストボディのフィールド説明

    フィールド説明
    promptstring動画生成用プロンプト
    modelstringモデル名: sora-2 sora-2-pro
    durationint10 15;pro は 25 にも対応
    imagesstring[]動画生成用画像リスト、URL または base64
    orientationstringlandscape 横向き、portrait 縦向き
    sizestringlarge HD、small 標準 — pro のみ
    character_urlstringキャラクター作成用動画URL;動画に実在の人物が含まれていると失敗します
    character_timestampsstringキャラクターが現れる時間範囲(秒)、フォーマット {start},{end}、end-start は 1〜3秒
  • キャラクター付きの例

json
{
  "images": [],
  "model": "sora-2-pro",
  "orientation": "portrait",
  "prompt": "make animate",
  "duration": 15,
  "character_url": "https://filesystem.site/cdn/20251030/javYrU4etHVFDqg8by7mViTWHlMOZy.mp4",
  "character_timestamps": "1,3"
}
{
  "images": [],
  "model": "sora-2-pro",
  "orientation": "portrait",
  "prompt": "make animate",
  "duration": 15,
  "character_url": "https://filesystem.site/cdn/20251030/javYrU4etHVFDqg8by7mViTWHlMOZy.mp4",
  "character_timestamps": "1,3"
}
  • レスポンスボディ
json
{
  "id": "asdsdssdsdhao",
  "status": "pending"
}
{
  "id": "asdsdssdsdhao",
  "status": "pending"
}
  • フィールド説明
フィールド説明
idstringタスクID
statusstringタスクステータス: completed failed pending video_generating running
video_urlstring動画URL

1.2 タスクステータス照会

get https://api.openai-hk.com/sora/v1/video/feed/{id}

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. チャットフォーマット

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=狗狗在草地上打滚'

4. OpenAI 動画フォーマット

4.1 タスク作成

shell
curl --request POST \
  --url https://api.openai-hk.com/v1/videos \
  --header 'Authorization: Bearer hk-your-key' \
  --header 'content-type: multipart/form-data' \
  --form 'prompt=让画面动起来' \
  --form 'seconds=15' \
  --form 'input_reference=@body-lotion.png' \
  --form model=sora-2
curl --request POST \
  --url https://api.openai-hk.com/v1/videos \
  --header 'Authorization: Bearer hk-your-key' \
  --header 'content-type: multipart/form-data' \
  --form 'prompt=让画面动起来' \
  --form 'seconds=15' \
  --form 'input_reference=@body-lotion.png' \
  --form model=sora-2
  • レスポンス
json
{
  "id": "task_id",
  "object": "video",
  "model": "sora-2",
  "status": "queued",
  "progress": 0,
  "created_at": 1760698075017,
  "seconds": "15"
}
{
  "id": "task_id",
  "object": "video",
  "model": "sora-2",
  "status": "queued",
  "progress": 0,
  "created_at": 1760698075017,
  "seconds": "15"
}

4.2 タスクステータス照会

get https://api.openai-hk.com/v1/videos/{task_id}

  • レスポンス
json
{
  "id": "task_id",
  "object": "video",
  "model": "sora-2",
  "status": "queued",
  "progress": 0,
  "created_at": 1760698075017,
  "seconds": "15"
}
{
  "id": "task_id",
  "object": "video",
  "model": "sora-2",
  "status": "queued",
  "progress": 0,
  "created_at": 1760698075017,
  "seconds": "15"
}