Skip to content

🎬 视频模型 luma

  • 2024.06.24 本站已经支持 视频模型 luma
  • luma 本身无api, 跟GPTs 一样是通过逆向得来,
  • 支持 文生视频 图生视频
  • 计费是按次数,一次一个视频
  • 价格分2种 relaxpro 可查阅版本接入点
  • 当前默认 relax 有水印需队列等待, pro无水印无需队列等待
  • 如何使用 访问 https://luma.ddaiai.com 看下面的 在线测试

在线测试

1.访问 https://luma.ddaiai.com (如果被墙了,换下二级域名前缀 suibian)
2.如果发现被墙了 可以自己换地址 https://suibian.ddaiai.comsuibian 换其他的 如 https://2024.ddaiai.com 都能访问

版本接入点

设置

luma

效果

得到效果 luma

Luma API

创建视频任务

post https://api.openai-hk.com/luma/generations/

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": "特斯拉飞速在公路上"
}
{
    "aspect_ratio": "16:9",
    "expand_prompt": true,
    "loop": false, 
    "image_url": "",
    "image_end_url": "",
    "user_prompt": "特斯拉飞速在公路上"
}
字段类型说明
user_promptstring提示词
image_urlstring关键帧 开始图片url 支持 base64
image_end_urlstring关键帧 图片url 支持 base64
aspect_ratiostring视频宽高比
expand_promptboolean是否扩展提示词
loopboolean是否循环 首尾呼应

返回体

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)

post https://api.openai-hk.com/luma/generations/{id}/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_urlstring关键帧 开始图片url 支持 base64
image_end_urlstring关键帧 图片url 支持 base64
aspect_ratiostring视频宽高比
expand_promptboolean是否扩展提示词
loopboolean是否循环 首尾呼应

返回体

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
  }
}

获取无水印视频链接

  • 仅支持pro版本
  • relex版本也能获取,但还是有水印
  • 得到的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"
}

获取任务状态

get https://api.openai-hk.com/luma/generations/{id}

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 版本有区别
  1. download_url 上的视频有无水印,注意保存这个地址可能过期失效
  2. pro 无需队列等待