INSTEAD OF an api key lumalabs uses Bearer value in the auth header. I have added LUMALABS_BEARER to the .env file. Refactor lumalabService to use it instead. lumalabs initial request should post:
{
“prompt”: “{{ $(‘vars’).item.json.image_prompt }}”,
“keyframes”: {
“frame0”: {
“type”: “image”,
“url”: “{{ $json.guid.rendered }}”
}
},
“aspect_ratio”: “1:1”,
“loop”: false,
“model”: “ray-2”
}

that post request will return and id. we must wait 30 seconds then do a get to https://api.lumalabs.ai/dream-machine/v1/generations/${id} to check if the video is ready, if that check returns status = completed, then it will also contain a assets.video value which is the url for us to download the new video with get. remember we are going to need to eventually save this video to cloudinary and our db ultimately returning the url to the generated video on our cloudinary server.


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *