(apiKey, params)
| 151 | } |
| 152 | |
| 153 | export async function processV2V(apiKey, params) { |
| 154 | const modelInfo = getV2VModelById(params.model); |
| 155 | const endpoint = modelInfo?.endpoint || params.model; |
| 156 | const videoField = modelInfo?.videoField || 'video_url'; |
| 157 | const payload = { [videoField]: params.video_url }; |
| 158 | if (modelInfo?.imageField && params.image_url) { |
| 159 | payload[modelInfo.imageField] = params.image_url; |
| 160 | } |
| 161 | if (modelInfo?.hasPrompt && params.prompt) { |
| 162 | payload.prompt = params.prompt; |
| 163 | } |
| 164 | return submitAndPoll(endpoint, payload, apiKey, params.onRequestId, 900); |
| 165 | } |
| 166 | |
| 167 | export async function processLipSync(apiKey, params) { |
| 168 | const modelInfo = getLipSyncModelById(params.model); |
no test coverage detected