A single generated image returned by OpenAI's Image Generation endpoint, delivered as either a URL or inline base64-encoded data depending on how the request was made. Nested inside ImageResponse as one entry of its data list.


Properties

PropertyReturnsDescription
b64JsonStringGenerated image data, base64-encoded, when the request asked OpenAI to return inline data rather than a URL.
revisedPromptStringPrompt OpenAI actually used to generate the image, after it revised the caller's original prompt. Only returned for models that perform prompt revision.
urlStringTemporary URL where the generated image can be downloaded, when the request asked OpenAI to return a URL rather than inline data. OpenAI expires these URLs after a short time.

Methods

getUrl()

Returns: String

Temporary URL where the generated image can be downloaded, when the request asked OpenAI to return a URL rather than inline data. OpenAI expires these URLs after a short time.

getRevisedPrompt()

Returns: String

Prompt OpenAI actually used to generate the image, after it revised the caller's original prompt. Only returned for models that perform prompt revision.

getB64Json()

Returns: String

Generated image data, base64-encoded, when the request asked OpenAI to return inline data rather than a URL.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.