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
| Property | Returns | Description |
|---|---|---|
| b64Json | String | Generated image data, base64-encoded, when the request asked OpenAI to return inline data rather than a URL. |
| revisedPrompt | 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. |
| url | 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. |
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.