
Weekend Creative Challenge: Mood Poem Card
Type a mood, get an AI-written poem and a generative art card to match, built on Amazon Bedrock after Nova Canvas turned out to be inaccessible.
Vision & What the App Does
Mood Poem Card takes one short phrase — a mood, a memory, a season — and turns it into a small piece of art. Type "a rainy morning" or "初めての一人暮らし" and the app writes a short original poem, then designs a card around it: a color palette and a visual motif chosen to match the poem's imagery, rendered live as generative art. You can download the result as a PNG and it's genuinely yours — nobody else typing the same three words gets quite the same card, because the shapes are drawn fresh from a random seed each time.
The creative output is meant to feel personal rather than templated. It's not a poem generator bolted onto a stock photo. Every card is a one-off composition: the AI writes the words, then acts as an art director picking colors and a motif, and the browser paints it. The UI switches between Japanese and English, since I wanted to test the poem quality in both languages I actually use day to day.

How You Built It
The original plan was simpler than what shipped. I wanted three creative channels — words, an AI-generated image, and a spoken reading — using Amazon Bedrock's Nova Canvas for the image half. That plan lasted about twenty minutes.
Calling
amazon.nova-canvas-v1:0 returned a ResourceNotFoundException : "This Model is marked by provider as Legacy and you have not been actively using the model in the last 30 days." It showed up in list-foundation-models , so I'd assumed it was invokable — it wasn't. I checked for a newer Canvas version, Titan Image Generator, and the Stability models available on the account. No plain text-to-image model was reachable; the Stability lineup on this account is all specialized editing tools (inpaint, outpaint, upscale, style transfer), which need a source image, not a text prompt.With the challenge clock running, I didn't have room to file for model access and wait. So the image half got redesigned instead of dropped. Rather than asking a diffusion model for pixels, I asked the LLM for structure: alongside the poem, it now returns a JSON object with a three-color palette and a motif keyword — flower, wave, mountain, star, leaf, moon, rain, or cloud — picked to fit the poem's imagery. An SVG renderer on the client turns that into the card, using a seed hashed from the poem text so the shape layout varies per poem without needing any extra model call. It's still generative — just generative geometry instead of generative pixels, and it sidesteps a model-access problem entirely.
The rest was ordinary Next.js work: one Route Handler calling Bedrock's Converse API with a system prompt asking for a fixed JSON shape, and a page that renders the response as SVG and exports it to PNG client-side with
html-to-image . I tested both languages against the live model before deploying, not just the happy-path English case — testing "遠くの祭りの音" and "nostalgia for a city I have never lived in" side by side caught a few prompt-wording issues that pure English testing would have missed.AWS Services Used / Architecture Overview
The only AWS service in the request path is Amazon Bedrock, calling
amazon.nova-pro-v1:0 through the Converse API. Everything else is Vercel: a Next.js 16 Route Handler as the server-side function, and static hosting for the front end.Browser (form input) │ ▼Next.js Route Handler on Vercel ──► Amazon Bedrock (Nova Pro, Converse API, us-east-1) │ │ │ ◄─────────────── JSON: poem + palette + motif ▼Browser renders SVG card ──► html-to-image ──► downloadable PNGAccess to Bedrock is scoped through an IAM user restricted to
bedrock:InvokeModel on that one model ARN — nothing broader, since the app only ever needs to make that single kind of call.
What You Learned
The clearest lesson: a model showing up in
list-foundation-models doesn't mean it's callable. "Legacy" access denial isn't documented anywhere obvious in the console; you find out at invoke time. Given a 72-hour window, chasing model access wasn't worth it, so building a fallback that didn't depend on Bedrock's image models at all turned a blocker into what I think is actually a more interesting design — the "art direction" is explicit and inspectable JSON, not a black-box image.I also came away with more respect for testing non-English output as a first-class case, not an afterthought bolted on after the English version ships. The poem quality in Japanese and English differs in subtle ways — line rhythm mostly — that only show up if you actually generate a few and read them, not just check that the API returns 200.
Link to App or Repo
- Live app: https://mood-poem-card.vercel.app
- Source (public): https://github.com/yama3133/mood-poem-card
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article