How to show an NFT in your app (images only)

Showing an image in your application is simple with Center with our Render NFT endpoint:

  1. Determine the address and token ID of the NFT you would like to show
  2. Determine what size and format you want (see options below)
  3. Construct the appropriate URL
    1. Our rendering URLs are constructed in a predictable manner: https://api.center.dev/v2/{network}/{address}/nft/{tokenID}/render/{filename}
  4. Use this URL to render the media. This will work similarly to a CDN URL.
    1. Include your API key in the header as with any other request: 'X-API-Key: ${apiKey}'

What sizes and formats are available?

The filename parameter tells us how you would like the NFT to be rendered. It should be provided in the following format: size.format.

  • size: This is required. It can either be a preset (small,medium or original) or a specific file dimension (400x400,750x750). The small preset is 200x200 and the medium preset is 1000x1000. original will render the media in its original size and format.
    • Note: Media will be rendered in its original aspect ratio within the bounds of the size that is specified.
  • format: This is optional. It is used to transform media into a desired format. This format can be png,jpg or gif.

Example acceptable filename parameters are: medium,250x250.jpg,small.png,original,650x650.