Scaling Creativity: Building an AI-Powered Marketing Engine

Jose Romero
ai
nano banana
gemini flash 2.5
marketing
Scaling Creativity: Building an AI-Powered Marketing Engine

The Scalability Challenge in Modern Marketing

Marketing at scale isn’t just about creating more content — it’s about creating the right content for every audience, in every market, at the right time.

Think about what today’s global brands are up against:

  • Dozens of channels: Instagram, TikTok, YouTube, LinkedIn, regional platforms.
  • Countless formats: Stories, reels, carousels, banners, email headers, landing pages.
  • Hyper-local expectations: What resonates in Los Angeles may feel tone-deaf in Tokyo.

Each campaign needs to be tailored — not just translated. That means adapting imagery, tone, cultural cues, and even the legal fine print to match local expectations.

Traditionally, this requires:

  • Art directors to maintain creative vision.
  • Copywriters to localize messages with nuance.
  • Designers to customize assets for every platform.
  • Legal and compliance checks for every region.

The result? A workflow that’s slow, expensive, and hard to scale. By the time the assets are approved and launched, the cultural moment may already have passed.

The real bottleneck isn’t creativity, it’s scalability.
How do you deliver personalized, hyper-localized campaigns at the speed of digital culture?

This is the problem our AI-Powered Marketing Engine sets out to solve: creating context-aware, on-brand, and regionally relevant assets in seconds — not weeks.

From Idea to Engine: Framing the Product Vision

The goal was never to replace creative teams. It was to give them leverage.

When we set out to design the AI-Powered Marketing Engine, the product vision was clear:
help brands scale their campaigns without sacrificing authenticity, creativity, or cultural relevance.

In practice, this meant solving three big challenges:

  1. Speed vs. Quality
    Most automation tools focus on quantity. But if speed comes at the cost of brand integrity, it’s not worth it. Our vision had to balance both.

  2. Consistency Across Markets
    Every piece of content needed to feel on-brand while still reflecting local culture. That’s more than translation — it’s about cultural fluency.

  3. Strategic Alignment
    Creativity without strategy is noise. Each generated asset had to tie back to a campaign’s goals, target audience, and performance history.

The breakthrough was thinking of the AI not as a “content generator,” but as a creative partner. A partner that:

  • Understands the brand DNA (colors, typography, voice).
  • Adapts to regional strategy (personas, cultural references, legal needs).
  • Generates assets with purpose (designed to perform, not just exist).

The product vision was simple, but ambitious:
Build an engine that transforms a campaign brief into hundreds of context-aware, hyper-localized creative assets in seconds.

This vision became the foundation for everything that followed — from the structured context design to the orchestration system that powers the workflow.

The Secret Weapon: Structured Context

The saying “garbage in, garbage out” applies more than ever in generative AI. A vague prompt will always yield a vague result. The real power of our engine comes from structured context — the campaign brief that guides every creative decision.

We split the brief into two key layers:

  1. Brand Profile

    • Core identity and voice.
    • Approved assets: logos, product shots, typography, and color palettes.
    • The DNA of the brand that never changes.
  2. Campaign Strategy

    • Region-specific goals and target personas.
    • Historical data on what visuals perform best.
    • Local legal disclaimers and compliance rules.

With this structure, we’re not asking the AI to simply “make a shoe ad.”
We’re asking it to act as an art director for a specific brand and campaign.

Example:

Create a lifestyle image for the Fast Running brand, launching the Fall 2025 Collection in Japan, targeted at The Quantified Runner persona. Prioritize dusk urban scenes, since they’ve historically driven engagement.

The difference is night and day. Instead of random creative, we get aligned, repeatable, and trustworthy outputs that reflect both the brand and the market it serves.

Orchestration with Genkit: Turning Chaos into Flow

Designing the workflow wasn’t just about connecting APIs. It was about building a system that could scale reliably. That’s where Genkit, Google’s open-source generative AI framework, became indispensable.

Here’s how it elevated our approach:

  • Simplified Model Interaction
    Calling Gemini 2.5 Flash was reduced to a single ai.generate({...}). Genkit handled the messy details — authentication, parsing, and error handling.

  • Structured Inputs and Outputs
    By integrating with Zod schemas, we defined exactly what the model should return.
    Example:
    ```json { "post_text": "string", "image_overlay_text": "string" }

nstead of parsing messy text, the model responded with clean JSON, making the output predictable and production-ready.

Flow Management Our campaign pipeline wasn’t a single call. It was multi-step: generate base image → create ad copy → compose final asset. With Genkit’s defineFlow, we turned that complexity into clean, testable functions.

Without Genkit, the workflow would have been fragile and error-prone. With it, we built a robust orchestration layer that keeps the system maintainable, scalable, and ready for production.

This shift — from ad-hoc prompts to structured, orchestrated flows — is what made the difference between a cool demo and a production-grade system.

When AI Meets Pixel Precision: Lessons from the Frontline

One of the most ambitious goals of our demo was to have the AI not only create images, but also handle the final graphic composition — adding frames, logos, and overlay text in a pixel-perfect layout.

That’s where we hit the limits of even the most advanced models.

We started with broad prompts like “add a logo and text”. The AI responded by hallucinating its own designs, inventing new logos and styles. As we got stricter with instructions — down to pixel placement and aspect ratios — the results improved, but a new problem appeared: inconsistency.

Even when we required a perfectly square 1024x1024 output, Gemini 2.5 Flash would sometimes generate slightly off dimensions, like 1024x1080. That tiny difference meant frames and logos appeared misaligned or cut off. For a production workflow, this is unacceptable.

The lesson was clear:

  • AI is brilliant at creativity — generating lifestyle imagery, adapting to cultural cues, and capturing the “feel” of a campaign.
  • AI is not yet reliable at geometry — tasks requiring exact placement, consistent ratios, or deterministic design still break down.

Expecting AI to nail precision design is asking the wrong tool to do the job.

The better solution is a hybrid one:

  • Let the AI generate the creative base image.
  • Use deterministic tools (like HTML-to-image libraries or server-side image processors) to guarantee alignment, aspect ratio, and compositional accuracy.

This hybrid approach gave us the best of both worlds: the semantic intelligence of AI and the mathematical precision of code.

The Hybrid Future: AI + Code, Not AI Alone

The most valuable lesson from building this demo is that AI is not a silver bullet.
Its strengths are undeniable — speed, creativity, and context-awareness — but so are its limits.

The real breakthrough comes when we combine AI with deterministic systems:

  • AI for creativity
    Generate hyper-localized images, adapt copy to cultural nuance, and bring campaigns to life in ways that scale.

  • Code for precision
    Ensure layouts, aspect ratios, logos, and overlays are always pixel-perfect, reliable, and compliant with brand standards.

This hybrid approach turns what could have been a fragile experiment into a repeatable, production-ready engine. It respects the role of creative teams while giving them leverage through automation.

The future of marketing isn’t AI vs. humans. It’s AI + humans, supported by robust code.

As product leaders, our job is to guide that balance:

  • Knowing when to lean on AI’s generative power.
  • Knowing when to step in with deterministic safeguards.
  • And always aligning the technology to business outcomes.

This is how we move from “cool demos” to scalable, trusted systems that can support the speed and complexity of modern marketing.

Let's build something great

Let's Build Something Great

Have an idea or a project in mind? I'd love to hear about it.

Contact Me