Viewrium Docs
Guides

Generate from a product URL

Turn a product page into catalog images and a GLB model with source_url.

Pass a source_url pointing at a single product page. Viewrium reads the page for product images and metadata (title, price, and dimensions when the page exposes them), then works from them exactly as it would from images you supplied yourself.

Ask for the quote

Python
from viewrium import ProductCreateRequest, ProductDraft, Viewrium

client = Viewrium("sk_live_...")

parked = client.products.create(
    ProductCreateRequest(
        source_url="https://shop.example.com/products/oak-coffee-table",
        draft=ProductDraft(custom_id="sku-oak-coffee-table"),
    )
)
print(parked.title, parked.subject, parked.cost.total_credits)
TypeScript
import { Viewrium } from "@viewrium/sdk";

const client = new Viewrium({ apiKey: "sk_live_..." });

const parked = await client.products.create({
  source_url: "https://shop.example.com/products/oak-coffee-table",
  draft: { custom_id: "sku-oak-coffee-table" },
});

The parked response carries what was read off the page - title, description, subject, dimensions - which is exactly what makes this source worth reviewing before you commit.

Notes

  • One product per call. Point source_url at a single product page, not a category or search results page.
  • Metadata is inferred, not guaranteed. Title, price, and dimensions are taken from the page when present. Anything you set in draft wins over what was read - on the quote and on the resume, so you can correct the scraped title right before committing.
  • Give a custom_id (your SKU) so a page you re-read maps to the same product and repeat calls stay idempotent - a duplicate custom_id within your organization returns 409. Leave it out and the product takes its own id as one; you can set yours later with products.update.
  • Prefer explicit dimensions when you know them; many pages do not publish real-world size.

Then

Post resume_token back through products.create to commit - editing the draft on the way if the page got something wrong:

Python
product = client.products.create(
    ProductCreateRequest(
        resume_token=parked.resume_token,
        draft=ProductDraft(title="Oak coffee table", price=349.0, currency="EUR"),
    )
)
TypeScript
if (parked.status !== "parked") throw new Error("unexpected: already committed");
const product = await client.products.create({
  resume_token: parked.resume_token,
  draft: { title: "Oak coffee table", price: 349, currency: "EUR" },
});

Wait for display_status to leave generating by polling or webhooks, then read product.model.glb_url and product.images.

On this page