After you have the link, request the link.
try:
response = requests.request("POST", urlApi, headers=header, data=payload)
except:
print ('error')
print (response.status_code)
if response.status_code == 202:
urlVideo = response.text
time.sleep(5) # wait 5 sec then the image is availble
dc_data = eval(response.text)
urlVideo = (dc_data['url'])
resp = requests.request("GET", urlVideo, stream=True)
fn = 'imagename.jpg'
try:
with open(fn, 'wb') as f:
for chunk in resp:
f.write(chunk)
f.close()