REST endpoint to retrieve NFT image using contract address and token ID?

I’ve been struggling to figure out how to fetch NFT images through API calls. I need to retrieve the actual image file for a specific token using just the contract address and token identifier. I’ve experimented with various approaches but haven’t found a reliable REST service that can provide the metadata URI for tokens. Since I can’t get the metadata URI, I’m stuck and unable to access the image files stored on IPFS. Has anyone found a working solution for this? I’m looking for a straightforward HTTP endpoint that can help me get token metadata or direct image URLs.

Had this exact problem last year building a portfolio tracker. Alchemy’s NFT API was a game changer - their /getNFTMetadata endpoint does all the heavy lifting. Just pass it the contract address and token ID, and you get back complete metadata with image URLs. Doesn’t matter if it’s stored on IPFS, Arweave, or regular servers. The best part? It handles the tokenURI contract call and resolves IPFS links through their gateway automatically. You get both the raw metadata URI and processed image URL in one call - no extra IPFS requests needed. Free tier worked fine for development, and response times stayed under 500ms. Works on Ethereum and Polygon too.

Moralis has a solid NFT API if Alchemy doesn’t work out. Their /{address}/{token_id} endpoint is straightforward and handles most chains. I’ve used it for months without issues, though IPFS gateways can be slow during peak times.

Oh this is interesting! I’ve been down this rabbit hole before and it’s definitely trickier than it seems.

Have you tried OpenSea’s API? They have endpoints that pull metadata directly - no IPFS hassle.

What blockchain are you working with? Ethereum mainnet, Polygon, or something else? That’ll affect which services work best.

When you say you experimented with various approaches, did you try hitting the contract directly for the tokenURI first? Sometimes that’s the missing piece - call the tokenURI function on the contract, get back an IPFS hash or metadata URL, then fetch the actual JSON from there. The image URL is usually in that metadata.

What programming language are you using? And are you looking for free or would paid work too? There are some really good indexing services like Moralis or Alchemy that have NFT APIs, but they might have rate limits on free tiers.

Have you run into specific error messages or is it more that you can’t find the right endpoint to start with?