I would have expected an API like:
let imageId = api.generateImage(prompt)
let {url, isFinished} = api.imageInfo(id)
But instead it's:
let bytes = api.generateImage(prompt)
It's interesting to me how AI APIs let you hold such a persistent, active connection. I'm so used to anything that takes more than a second becoming an async background process where you notify the recipient when it's ready.
With Netflix, it makes sense that you can open a connection to some static content and receive gigabytes over it.
But streaming tokens from a GPU is a much more active process. Especially in this case where you're waiting tens of seconds for an image to generate.