Skip to content
Yashwanth
All writing
4 min

Adopting a new AI API without overcommitting to it

Integrating Google's Gemini API for text-to-image generation was a good reminder that a new model API deserves the same scrutiny as a new cloud service — not more, not less.

  • AI tooling
  • Practice

I recently integrated Google's Gemini API into a compliance learning platform to generate images from text directly inside the product. The interesting engineering question was not "can it generate a good image" — it was where that capability should live in a system that already had opinions about caching, cost, and failure handling.

Treat it like a dependency, not a feature

It is tempting to wire a model API straight into the request path because the demo looks great. I treated it the way I would treat adding any external service: what happens when it is slow, what happens when it is down, and what it costs per call at the volume this feature will actually see once it ships. Generated images got the same treatment as any other user-facing asset — queued, retried, and cached like anything else backed by S3.

The permanent-place test

The same question I ask about a new cloud service applies here: does this earn a permanent place in the stack, or did it just solve one problem well enough that we stop noticing it? A few months in, the honest answer is that it is still earning its keep — which is a better sign than either extreme.