Skip to main content

Pixel Portraits: AI generated trading cards

By Steven Van ·

A v0 template recreates Vercel's event trading-card photobooth in the browser using the AI Gateway, Fal, and GPT Image 1.5 Edit.

Vercel built a v0 template that recreates Pixel Portraits, an AI photobooth activation from Next.js Conf and Ship AI that turned attendees' photos into 16-bit pixel-art trading cards. The template runs end-to-end on the Vercel AI Gateway and the Fal integration, so the same card style can now be generated in a browser.

At the events, a portrait was run through the flux-kontext-lora model with a custom LoRA trained on a 16-bit pixel art style, rendered on a green background, then cleaned up with BRIA's RMBG 2.0 background removal. The Canvas API composited the pixel portrait with the event's brand pattern, and a gradient map applied with the sharp library set the final colour identity. Each card printed on-site in about six seconds, was hand die-cut to a rounded-corner trading-card shape, and sealed in a PSA-inspired sleeve with a serialized grading label. Attendees could also scan a QR code to save a digital version.

The v0 template follows the same steps in the browser: a webcam photo or uploaded image is cropped to a card aspect ratio and paired with a pixel-art style reference, then sent to the GPT Image 1.5 Edit model. The result is background-removed with BRIA and composited onto branded Next.js and Vercel card frames.

Vercel
Vercel
The platform for frontend developers — deploy, preview, and scale web apps and AI agents with zero config.
View Vercel →

Original source

Read Pixel Portraits: AI generated trading cards on Creators Toolbox