Discussions

Ask a Question

error 500, ERR_BAD_RESPONSE when requesting in node.js env

Previously I had success in the Python environment but when I changed to the node.js environment I always got error 500, even though the header and payload were more or less the same, what do you think is wrong? here's my previous python code: <br> ```Text python url = "<https://api.d-id.com/talks"> headers = { "accept": "application/json", "content-type": "application/json", "Authorization" : "Basic " + os.getenv("API_KEY_DID") } print(headers) payload = { "script": { "type": "audio", "audio_url": audio_path }, "source_url": avatar_url } response = requests.post(url, json=payload, headers=headers) ``` and here's my javascript code: <br> ``` try { const url = "<https://api.d-id.com/talks">; const headers = { "accept": "application/json", "content-type": "application/json", "Authorization": "Basic XXX" }; const payload = { "script": { "type": "audio", "audio_url": audioPath }, "source_url": avatarUrl }; const response = await axios.post(url, payload, { headers }); ``` Thank you!

Custom ElevenLabs voice not working for agents

I added a custom voice for elevenlabs together with my request to create an agent by adding ``` "x-api-key-external": "myElevenLabsKey" ``` to the request and the voice in the presenter ``` "presenter": { "type": "talk", "voice": { "type": "elevenlabs", "voice_id": "0d7PmtkKJbIWQv5PVYJW" }, "source_url": "https://test.com/output_image.png", "thumbnail": "https://test.com/output_image.png" }, ``` And it doesn't work. The agent just never speaks.