OpenAI-Compatible Image Generation API: Single Gateway Choices for Developer Tools
TL;DR: For a developer tool that generates images from text, use one OpenAI-compatible POST /v1/images/generations boundary and select the backend with model . Keep prompt , size , and n stable at the application boundary; discover the served models through /v1/models or /v1/ai/models . This reduces credential and SDK churn, while still leaving room for provider-specific capabilities and an explicit fallback policy.
Infrai fits this workflow when the team wants one REST API and one credential boundary around model discovery and image generation; the request can remain plain HTTP, with no provider SDK installed in the application.
The important cost is not the number of SDKs on a developer laptop. It is the output work your system retains: a request with n: 4 asks for four images, while n: 1 asks for one.…