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
Parameters
| Parameter | Alias | Accepts | Fallback |
|---|---|---|---|
shape | s | cube, sphere, torus, torusknot, cone, cylinder, capsule, icosahedron, octahedron, tetrahedron, dodecahedron, ring, plane | cube |
color | c | rrggbb, rgb, or a named color | ffffff |
bg | background | rrggbb, or transparent | 0b1020 |
roughness | r | 0 – 1 | 0.35 |
metalness | m | 0 – 1 | 0.15 |
width | w | 64 – 2048 | 1200 |
height | h | 64 – 2048 | 630 |
rx / ry / rz | rotx, roty, rotz | degrees, -360 – 360 | -20 / 35 / 0 |
zoom | z | 0.25 – 4 | 1 |
light | l | 0 – 4 | 1 |
wireframe | wire | 0 or 1 | off |
ss | supersample | 1 – 3 | 2 |
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.