Package com.azure.ai.openai.models
Class ImageGenerationData
java.lang.Object
com.azure.ai.openai.models.ImageGenerationData
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ImageGenerationData>
public final class ImageGenerationData
extends Object
implements com.azure.json.JsonSerializable<ImageGenerationData>
A representation of a single generated image, provided as either base64-encoded data or as a URL from which the image
may be retrieved.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ImageGenerationDatafromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ImageGenerationData from the JsonReader.Get the base64Data property: The complete data for an image, represented as a base64-encoded string.Get the contentFilterResults property: Information about the content filtering results.Get the promptFilterResults property: Information about the content filtering category (hate, sexual, violence, self_harm), if it has been detected, as well as the severity level (very_low, low, medium, high-scale that determines the intensity and risk level of harmful content) and if it has been filtered or not.Get the revisedPrompt property: The final prompt used by the model to generate the image.getUrl()Get the url property: The URL that provides temporary access to download the generated image.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Method Details
-
getUrl
Get the url property: The URL that provides temporary access to download the generated image.- Returns:
- the url value.
-
getBase64Data
Get the base64Data property: The complete data for an image, represented as a base64-encoded string.- Returns:
- the base64Data value.
-
getRevisedPrompt
Get the revisedPrompt property: The final prompt used by the model to generate the image. Only provided with dall-3-models and only when revisions were made to the prompt.- Returns:
- the revisedPrompt value.
-
getContentFilterResults
Get the contentFilterResults property: Information about the content filtering results.- Returns:
- the contentFilterResults value.
-
getPromptFilterResults
Get the promptFilterResults property: Information about the content filtering category (hate, sexual, violence, self_harm), if it has been detected, as well as the severity level (very_low, low, medium, high-scale that determines the intensity and risk level of harmful content) and if it has been filtered or not. Information about jailbreak content and profanity, if it has been detected, and if it has been filtered or not. And information about customer block list, if it has been filtered and its id.- Returns:
- the promptFilterResults value.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<ImageGenerationData>- Throws:
IOException
-
fromJson
Reads an instance of ImageGenerationData from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ImageGenerationData if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IOException- If an error occurs while reading the ImageGenerationData.
-