Serverless · WebGPU · Zero assets

3D OpenGraph Image Generator

GET /api/og-3d renders a Three.js primitive on a headless WebGPU device, encodes the frame as a PNG in-process, and serves it with immutable caching. No GLTF files, no textures, no headless browser — the whole scene is generated in memory from the query string.

Examples

defaults
(no parameters)
polished metal knot
shape=torusknot&color=c0c6d4&metalness=1&roughness=0.15
matte indigo sphere
shape=sphere&color=6366f1&roughness=0.9&metalness=0
transparent background
shape=icosahedron&color=22c55e&bg=transparent
wireframe torus
shape=torus&color=f97316&wireframe=1&bg=0b1020
named color + rotation
shape=capsule&color=cyan&rx=-35&ry=60&zoom=0.9
square, tighter crop
shape=dodecahedron&color=eab308&w=800&h=800&zoom=0.8
low light, high metal
shape=cone&color=f43f5e&light=0.6&metalness=0.85

Parameters

ParameterAliasAcceptsFallback
shapescube, sphere, torus, torusknot, cone, cylinder, capsule, icosahedron, octahedron, tetrahedron, dodecahedron, ring, planecube
colorcrrggbb, rgb, or a named colorffffff
bgbackgroundrrggbb, or transparent0b1020
roughnessr0 – 10.35
metalnessm0 – 10.15
widthw64 – 20481200
heighth64 – 2048630
rx / ry / rzrotx, roty, rotzdegrees, -360 – 360-20 / 35 / 0
zoomz0.25 – 41
lightl0 – 41
wireframewire0 or 1off
sssupersample1 – 32

Every parameter is optional and every invalid value falls back to its default, so a bare request always returns an image. Crawlers do not retry a failed OpenGraph fetch.