Bottom line: if you're generating images from text and that work is one feature among twenty, put it behind a unified API where one key reaches multiple models, then pin the model id in config and move on. If the images are your product, integrate the vendor directly and pay for the extra key.

I've shipped it both ways. The second way cost more than I budgeted.

The search that lands people here usually reads something like "one key, OpenAI, Claude, Gemini, text to image", so it's worth untangling that phrasing before anything else. Claude reads images and writes about them; it doesn't draw. Gemini generates. OpenAI generates. A unified layer therefore isn't handing you three interchangeable text-to-image models today — it's handing you the option to add a fourth vendor later without a new contract, a new SDK and a new secret to rotate. If you're shopping for an OpenAI alternative specifically, that distinction is the whole decision.

Should you route image generation through one unified API key, or call each model directly?

Depends where images sit in your product.