Image Studio TemplatePro
Generation as an async job, not a chat: a server-enforced state machine, polling that never re-downloads pixels, blocked vs failed as different outcomes, and a simulated backend for keyless development.
Image Studio
Async generation jobs — queue, poll, gallery
Nothing generated yet
Write a prompt on the left and press Generate.
A scripted replay of three jobs — one queued, generated and settled, one that failed (retryable; nothing was charged) and one blocked by policy (not retryable — rephrase). The result card and both notices are the real components the template ships, but there is no model or worker behind this page; the “generated” image is an inline placeholder.
Every file in it
The full file list, with line counts — nothing is hidden about what you are getting, only the contents are.
26 files, 1,804 lines
Every file below is real and readable once you have Pro — downloaded as a zip, installed with one shadcn command, or read here in the browser. $49 once, for this and every other Pro item.
Built on these components
All free, all documented on their own pages. The template is what wires them together.
The result card for AI-generated images, audio and video — queue and stage states, variants, download and regenerate, and a safety block that isn't an error.
Moderation FlagWhat to show when the content filter fires — a stopped stream that keeps its partial text, or a blocked prompt, with a false-positive path.
Error & RetryWhat to show when a generation fails — a plain-English reason, a retry button, and a countdown for rate limits.
Running it
- Download the zip and unpack it, or install it with the shadcn command above — either way the app lands in its own directory. Then
npm install. - Add an
AI_GATEWAY_API_KEYto.env.local— one key reaches every model the template uses. npm run dev. To use a provider directly instead, install its package and change one line in the chat route.