Skip to content
2dto3D
← Docs

Embedding the viewer

Every generation gets a self-contained embed viewer built on Google’s <model-viewer>. No auth required, and it’s safe to iframe on any origin.

<iframe
  src="https://api.2dto3d.app/embed/{modelId}"
  width="600"
  height="400"
  frameborder="0"
  allow="xr-spatial-tracking"
  style="border-radius: 8px"
></iframe>
<p style="margin:4px 0 0;font-size:11px;font-family:system-ui,sans-serif;">
  <a href="https://2dto3d.app" style="color:inherit;">Made with 2dto3D</a>
</p>

The caption under the iframe is optional. Keeping it helps other people discover the tool that made your model, and you can remove it if it does not fit your page.

Query parameters

  • ?autoRotate=false: disable auto-rotation (default: true)
  • ?bg=f0f0f0: background color hex, without the # (default: ffffff)

AR

The embedded viewer ships with AR enabled by default. On a supported phone, a visitor taps the AR button and sees the model at real size in their own space. No extra configuration needed.

Next

See getting started for generating your first model, or the full interactive API reference for every endpoint.