Discussions

Ask a Question
Back to All

Internal Server Error when trying to upload image via API

I have purchased the lite plan with a goal of testing to validate a concept and potentially move on to a larger plan, however I have not been able to call the API despite triple checking that I am using my API keys correctly. Here is my specific error:

The exact error message is: Error uploading image. Status code: 500, Response: {"kind":"UnknownError","description":"Internal Server Error"}

I'm developing in Python, my code looks something like this and the api key provided is set as the correct variable in my local environment.

with open("image.png", "rb") as image_file:
files = {"file": image_file}
url = "https://api.d-id.com/images",
headers = {
"accept": "application/json",
"content-type": "multipart/form-data",
"authorization": f"Basic {d_id_api_key}"
}

image_upload_response = requests.post("https://api.d-id.com/images", files=files, headers=headers)

Why can't I get a response from your API?