🎬 ビデオモデル luma
- 2024.06.24 このサイトは現在、ビデオモデル
lumaをサポートしています lumaには公式APIがありません。GPTsと同様にリバースエンジニアリングで取得していますtext-to-videoとimage-to-videoをサポート- 課金は生成ごと、1リクエストにつき1ビデオ
- 2つの料金プラン:
relaxとpro— バージョンエンドポイント を参照 - デフォルトは
relax(ウォーターマーク付き、キュー待ちあり)。proはウォーターマークなし、キュー待ちなし - 使用方法:https://luma.ddaiai.com にアクセスし、以下の
オンラインテストセクションを参照
オンラインテスト 1. https://luma.ddaiai.com にアクセス(ブロックされている場合は、サブドメインプレフィックスを suibian に変更してみてください)
2. ブロックされている場合は、アドレスを自分で変更できます:https://suibian.ddaiai.com — suibian を他のものに置き換えてください。例:https://2024.ddaiai.com、すべて動作します
バージョンエンドポイント
- デフォルトのrelaxバージョン:https://api.openai-hk.com/luma
- Proバージョン:https://api.openai-hk.com/pro/luma
- 両モードともproレートで課金されます
- 2024.10.9 relaxモードは廃止されました(lumaが提供を終了)。課金はレートとなります
セットアップ
- https://luma.ddaiai.com を開く
- 下の画像に示されているフィールドを設定
- luma APIエンドポイント:https://api.openai-hk.com
- luma pro APIエンドポイント:https://api.openai-hk.com/pro
- Luma KEY:hk-your-apiKey

結果
サンプル出力 
Luma API
- リクエストヘッダーに
Authorization: Bearer hk-your-keyを含める必要があります - relaxバージョンエンドポイント:https://api.openai-hk.com/luma
- proバージョンエンドポイント:https://api.openai-hk.com/pro/luma
- 以下の例ではrelaxバージョンを使用しています
ビデオタスクの作成
shell
curl 'https://api.openai-hk.com/luma/generations/' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer hk-你的key' \
--data '{"aspect_ratio":"16:9","expand_prompt":true,"image_url":"","user_prompt":"特斯拉飞速在公路上"}'curl 'https://api.openai-hk.com/luma/generations/' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer hk-你的key' \
--data '{"aspect_ratio":"16:9","expand_prompt":true,"image_url":"","user_prompt":"特斯拉飞速在公路上"}'リクエストボディ
json
{
"aspect_ratio": "16:9",
"expand_prompt": true,
"loop": false,
"image_url": "",
"image_end_url": "",
"user_prompt": "特斯拉飞速在公路上",
"resolution": "720p",
"duration": "5s",
"model_name": "ray-v1"
}{
"aspect_ratio": "16:9",
"expand_prompt": true,
"loop": false,
"image_url": "",
"image_end_url": "",
"user_prompt": "特斯拉飞速在公路上",
"resolution": "720p",
"duration": "5s",
"model_name": "ray-v1"
}| フィールド | タイプ | 説明 |
|---|---|---|
| user_prompt | string | プロンプトテキスト |
| image_url | string | キーフレーム開始画像URL、base64対応 |
| image_end_url | string | キーフレーム終了画像URL、base64対応 |
| aspect_ratio | string | ビデオアスペクト比 |
| expand_prompt | boolean | プロンプトを拡張するかどうか |
| loop | boolean | ループするかどうか(シームレスな開始から終了) |
| resolution | string | 720p または 1080p、デフォルトは 720p |
| duration | string | 長さ:5s または 10s |
| model_name | string | モデル:ray-v1 ray-v2 ray-v3(公式ではray1.6 ray2 ray3として表示) |
レスポンスボディ
json
{
"created_at": "2024-06-24T03:40:47.505420Z",
"estimate_wait_seconds": "",
"id": "50deb9e0-d135-4173-a530-82ed3449a7b9",
"liked": "",
"prompt": "特斯拉飞速在公路上",
"state": "pending",
"video": {
"height": 0,
"thumbnail": "",
"url": "",
"download_url": "",
"width": 0
}
}{
"created_at": "2024-06-24T03:40:47.505420Z",
"estimate_wait_seconds": "",
"id": "50deb9e0-d135-4173-a530-82ed3449a7b9",
"liked": "",
"prompt": "特斯拉飞速在公路上",
"state": "pending",
"video": {
"height": 0,
"thumbnail": "",
"url": "",
"download_url": "",
"width": 0
}
}ビデオの延長(extend)
shell
curl 'https://api.openai-hk.com/luma/generations/50deb9e0-d135-4173-a530-82ed3449a7b9/extend' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer hk-你的key' \
--data '{ "expand_prompt":true,"image_url":"","user_prompt":"后面跟着一辆卡车"}'curl 'https://api.openai-hk.com/luma/generations/50deb9e0-d135-4173-a530-82ed3449a7b9/extend' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer hk-你的key' \
--data '{ "expand_prompt":true,"image_url":"","user_prompt":"后面跟着一辆卡车"}'リクエストボディ
json
{
"expand_prompt": true,
"loop": false,
"image_url": "",
"image_end_url": "",
"user_prompt": "后面跟着一辆卡车"
}{
"expand_prompt": true,
"loop": false,
"image_url": "",
"image_end_url": "",
"user_prompt": "后面跟着一辆卡车"
}| フィールド | タイプ | 説明 |
|---|---|---|
| image_url | string | キーフレーム開始画像URL、base64対応 |
| image_end_url | string | キーフレーム終了画像URL、base64対応 |
| aspect_ratio | string | ビデオアスペクト比 |
| expand_prompt | boolean | プロンプトを拡張するかどうか |
| loop | boolean | ループするかどうか(シームレスな開始から終了) |
レスポンスボディ
json
{
"created_at": "2024-06-24T03:40:47.505420Z",
"estimate_wait_seconds": "",
"id": "50deb9e0-d135-4173-a530-82ed3449a7b9",
"liked": "",
"prompt": "特斯拉飞速在公路上",
"state": "pending",
"video": {
"height": 0,
"thumbnail": "",
"url": "",
"download_url": "",
"width": 0
}
}{
"created_at": "2024-06-24T03:40:47.505420Z",
"estimate_wait_seconds": "",
"id": "50deb9e0-d135-4173-a530-82ed3449a7b9",
"liked": "",
"prompt": "特斯拉飞速在公路上",
"state": "pending",
"video": {
"height": 0,
"thumbnail": "",
"url": "",
"download_url": "",
"width": 0
}
}ウォーターマークなしビデオURLの取得
- proバージョンでのみサポート
- relaxバージョンでもこのエンドポイントを呼び出せますが、ビデオにはウォーターマークが付きます
- 返されるURLには有効期限があります — すぐにファイルをダウンロードして保存してください
get https://api.openai-hk.com/pro/luma/generations/{id}/download_video_url
shell
curl 'https://api.openai-hk.com/luma/generations/50deb9e0-d135-4173-a530-82ed3449a7b9/download_video_url' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer hk-your-key'curl 'https://api.openai-hk.com/luma/generations/50deb9e0-d135-4173-a530-82ed3449a7b9/download_video_url' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer hk-your-key'レスポンスボディ
json
{
"url": "https://dc53a917a6f427706a8ca3ecc7d70ea4.r2.cloudflarestorage.com/ai-lumalabs-storage-private/lit_lite_inference_im2vid_v1.0/410586f1-f2b9-447a-9651-66e502cf10da/410586f1-f2b9-447a-9651-66e502cf10da_raw_video_1_video0593ab596eb51488a8f5e00fcb5401b93.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=60bf44f30d45b472f9dd032de33e15d1%2F20240630%2Fauto%2Fs3%2Faws4_request&X-Amz-Date=20240630T165615Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=205ac50f173f7f6b260bc5026b9f6b3719c7c690f27fccec8cce0b4b43491750"
}{
"url": "https://dc53a917a6f427706a8ca3ecc7d70ea4.r2.cloudflarestorage.com/ai-lumalabs-storage-private/lit_lite_inference_im2vid_v1.0/410586f1-f2b9-447a-9651-66e502cf10da/410586f1-f2b9-447a-9651-66e502cf10da_raw_video_1_video0593ab596eb51488a8f5e00fcb5401b93.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=60bf44f30d45b472f9dd032de33e15d1%2F20240630%2Fauto%2Fs3%2Faws4_request&X-Amz-Date=20240630T165615Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=205ac50f173f7f6b260bc5026b9f6b3719c7c690f27fccec8cce0b4b43491750"
}タスクステータスの取得
shell
curl 'https://api.openai-hk.com/luma/generations/50deb9e0-d135-4173-a530-82ed3449a7b9' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer hk-your-key'curl 'https://api.openai-hk.com/luma/generations/50deb9e0-d135-4173-a530-82ed3449a7b9' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer hk-your-key'レスポンスボディ
json
{
"created_at": "2024-06-24T03:40:47.505420Z",
"estimate_wait_seconds": "",
"id": "50deb9e0-d135-4173-a530-82ed3449a7b9",
"liked": "",
"prompt": "特斯拉飞速在公路上",
"state": "processing",
"video": {
"height": 0,
"thumbnail": "",
"url": "",
"download_url": "pro版本无水印在这个地址, 注意保存这个地址可能过期失效",
"width": 0
}
}{
"created_at": "2024-06-24T03:40:47.505420Z",
"estimate_wait_seconds": "",
"id": "50deb9e0-d135-4173-a530-82ed3449a7b9",
"liked": "",
"prompt": "特斯拉飞速在公路上",
"state": "processing",
"video": {
"height": 0,
"thumbnail": "",
"url": "",
"download_url": "pro版本无水印在这个地址, 注意保存这个地址可能过期失效",
"width": 0
}
}stateがcompletedの場合、タスクは完了しています —video.download_urlにリンクが含まれますstateがfailedの場合、生成は失敗しています- proバージョンとrelaxバージョンの違い:
download_urlのビデオにはウォーターマークがありません。このURLは有効期限切れになる可能性があることに注意してください- proバージョンはキュー待ちが不要です
OpenAi-HK