Can't download NFT image using Infura IPFS endpoint

I’m trying to download NFT image from IPFS using Infura Api.
Here is my Python code:

get_image_url = ‘{ipfs_path}
img_path = ‘QmR36VFfo1hH2RAwVs4zVJ5btkopGip5cW7ydY4jUQBrKW’

response =, auth=auth)

I expect to receive png image in response content, but in response headers i can see that content-type is text/plain and when saving content bytes to file i get invalid image. I manage to retrieve image from this response by skipping first 512 bytes, but it seems kind of weird (can i depend on that value, is it fixed length header).
When using public gateways (e.g. ‘’) there is no such problem and response content contains only png image.

@Shpack_Band are there any additional error codes returned? Any chance you could share more of your code or a public repo of your code?

Kind regards,
Alex | Infura Support | Consensys