Integration
Lamina + Shopify
Push generated product, lifestyle, and try-on assets straight into Shopify product variants, collections, and metafields.
The Lamina + Shopify integration pushes generated assets straight into product variants, collections, and metafields. From a creative-app run, you call lamina.distribute with a Shopify target and the API uses Shopify's GraphQL Admin API — productCreateMedia or stagedUploadsCreate — to attach images. No human download-and-upload step in the loop.
What you can do
- •Push generated images to product variants via productCreateMedia
- •Stage and upload large media (3D, video) via stagedUploadsCreate
- •Write brand-fit scores and run ids to product metafields
- •Create or update collections with on-brand banner art
- •Trigger generation runs from Shopify Flow on product create / inventory change
Setup
- 1
Install the Lamina app from the Shopify App Store
Authenticate against your store. Lamina requests write_products, write_files, and write_collections scopes.
- 2
Bind a brand kit to your store
In the Lamina dashboard, attach a brand kit to the Shopify store id. All future runs to this destination inherit the kit.
- 3
Distribute a run to Shopify
Call lamina.distribute with target { kind: 'shopify', store, productId, role: 'variant' | 'collection' | 'metafield' }.
- 4
Trigger generation from Shopify Flow (optional)
Add the 'Lamina: generate product shoot' action to a Flow on 'product created' or 'inventory updated'.
Example
shopify-distribute.ts
import { Lamina } from "@lamina/sdk";
const lamina = new Lamina({ apiKey: process.env.LAMINA_KEY });
const shoot = await lamina.apps.productShoot({
brief: "sage linen tee, weathered teak, north light",
brand: "homestead",
variants: 4,
ratios: ["1:1", "4:5"],
});
await lamina.distribute(shoot.assets, {
targets: [{
kind: "shopify",
store: "homestead.myshopify.com",
productId: "gid://shopify/Product/1234567890",
role: "variant",
}],
});How it works
When you call lamina.distribute with a Shopify target, Lamina uses Shopify's GraphQL Admin API to attach the generated assets. For images that fit Shopify's URL-import path, productCreateMedia is used. For larger media — video, 3D, hi-res banners — Lamina runs stagedUploadsCreate first, uploads bytes to Shopify's staging service, and then attaches them. Brand-fit scores from the Lamina evaluator are written to a product metafield so your merchandising team can sort by them.
When to use it
Use this integration when you want generated creative on the storefront within seconds of a product being created — catalog launches, SS / FW drops, daily refreshes, or replenishment. Conversion uplift on virtual-try-on PDPs runs ~25–35% across recent benchmarks; the same delivery path works for try-on, lifestyle, and ad-variant runs.