Introducing sanity-plugin-lamina: AI media generation, native to Sanity Studio
Generate on-brand images and video without leaving Sanity Studio. The new Lamina plugin ships an Asset Source, Studio Tool, document actions, a headless API, webhooks, and a CLI.

Lamina Team
Product Team @ Lamina

Today we're shipping sanity-plugin-lamina — the fastest way to generate on-brand images and video for Sanity content. The plugin makes Lamina a first-class part of Sanity Studio: every image and file field gets a "Generate with Lamina" option, every document gets a "Generate all media" action, and the full Lamina editor lives in a top-level Studio tab.
And it doesn't stop at Studio. The same package ships a headless API, a webhook handler, and a CLI — so you can automate generation across pipelines, serverless functions, and CI.
Why we built it
Editorial teams using Sanity told us the same story: writing copy is fast, sourcing the right hero image or product video is slow. Stock libraries miss the brief, briefing a designer breaks flow, and generic AI tools don't know your brand. Sanity is where the content lives — that's where generation should happen.
sanity-plugin-lamina closes that loop. Type a brief, pick a result, and the asset lands in your document with full provenance — every Lamina-generated asset stores its source run so you can re-open it and iterate later.
What ships in v1
Studio surfaces
- Asset Source — "Generate with Lamina" appears in every image and file field dropdown.
- Studio Tool — the full Lamina editor embedded as a top-nav tab, with a postMessage bridge that saves outputs straight back into Sanity.
- Document actions — "Edit in Lamina" jumps to the run that produced an asset; "Generate all media" fills every empty image and file field on a document in a single pass.
- Asset browser — search, filter, and reuse anything you've already generated, with inline video preview.
Programmatic surfaces
- Headless API — createLaminaSanityClient() with generate(), generateForDocument(), fillEmptyMedia(), uploadToSanity(), and scoreAssets().
- Webhook handler — createLaminaWebhookHandler() drops into any serverless function and auto-generates media on Sanity document events.
- CLI — npx sanity-lamina for bulk generation, document filling, asset scoring, and credit checks from your terminal.
Prompt intelligence, on by default
The plugin reads your schema. It knows the field name, the document type, the sibling values, and your brand profile — and quietly enriches every brief with that context. "Hero image" on a product page becomes a brief that already mentions the product, the tone, the aspect ratio, and the brand palette. Typeahead suggests completions; recent briefs are one click away; bulk generation runs variants in parallel.
Get started
Install the plugin in your Sanity Studio:
npm install sanity-plugin-laminaThen add it to your sanity.config.ts:
import {defineConfig} from 'sanity'
import {laminaPlugin} from 'sanity-plugin-lamina'
export default defineConfig({
// ...
plugins: [
laminaPlugin({
apiKey: process.env.SANITY_STUDIO_LAMINA_API_KEY,
}),
],
})Open any document with an image field and you'll see "Generate with Lamina" in the asset source dropdown. That's it.
What's next
We're actively iterating with launch partners. On deck: smarter cross-field consistency for product galleries, deeper brand-profile inference, and per-locale generation for multilingual datasets. If your team uses Sanity and you'd like early access to what we're building next, reach out — we want to hear from you.
— The Lamina Team