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
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)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_urlat 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
draftwins 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 duplicatecustom_idwithin your organization returns409. Leave it out and the product takes its own id as one; you can set yours later withproducts.update. - Prefer explicit
dimensionswhen 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:
product = client.products.create(
ProductCreateRequest(
resume_token=parked.resume_token,
draft=ProductDraft(title="Oak coffee table", price=349.0, currency="EUR"),
)
)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.