Reliefs Docs
3D Visualisation SDK

Web

Embed the Reliefs 3D product viewer in a plain web page.

Make sure you've read the Prerequisites first — you'll need your public key (pk_) and a product UUID.

Include the SDK script

Add the Reliefs script to your page, just before the closing </body> tag.

index.html
<script src="https://api.reliefsapp.com/reliefs-sdk.js" async></script>

Initialize the SDK

Call ReliefsSDK.init() once on load with your public key.

index.js
await ReliefsSDK.init('pk_live_your_key', { baseUrl: 'https://api.reliefsapp.com' });

Render a 3D button for a product

Create a container element and pass it, with the product UUID, to renderButton().

index.js
const container = document.getElementById('reliefs-button');
ReliefsSDK.renderButton(container, 'PRODUCT_UUID');

Allowlist your origin

Add your site's origin (e.g. https://my-site.com) to Allowed origins on the key. Requests from any other origin are rejected.

On this page