Skip to Content

Quick start

Create a secret key and import your first 3D model with the Node.js SDK.

You need a Vizbl account, Node.js 20 or later and a 3D file in .glb format.

Create a secret key

Sign in at core-ar.vizbl.com, open Settings → API Keys and choose Create secret key. The key starts with sk_live_ and is shown in full only once, so copy it now. API keys covers access, storage and rotation.

Put the key in an environment variable

export VIZBL_API_KEY="sk_live_…"

The SDK reads the key from VIZBL_API_KEY when you don't pass one. Keep it out of your source code.

Create a project

mkdir vizbl-quickstart && cd vizbl-quickstart
npm init -y
npm install --save-exact @vizbl/node

Copy your 3D file into the folder as chair.glb.

Import the model

import.mjs
import Vizbl from '@vizbl/node';

const vizbl = new Vizbl();

const object = await vizbl.objects.importModel({
  file: './chair.glb',
  name: 'Chair',
  wait: true,
});

console.log('tinuuid:', object.tinuuid);
console.log('url:', object.url);

importModel uploads the file, starts the import and, with wait: true, waits until the object is ready. That takes from seconds to a few minutes.

Run it

node import.mjs
Output
tinuuid: …
url: …

The tinuuid is the id of your new object, and the url is its public showcase page, which opens once the object is published: see Publishing.

Next steps

On this page