CreateImageRequest class
Request object for the Create image endpoint.
- Annotations
-
- @freezed
Constructors
- CreateImageRequest({required String prompt, @JsonKey.new(includeIfNull: false) @Default.new(CreateImageRequestModelString('dall-e-2')) CreateImageRequestModel? model, @JsonKey.new(includeIfNull: false) @Default.new(1) int? n, @Default.new(ImageQuality.standard) ImageQuality quality, @JsonKey.new(name: 'response_format', includeIfNull: false, unknownEnumValue: JsonKey.nullForUndefinedEnumValue) @Default.new(ImageResponseFormat.url) ImageResponseFormat? responseFormat, @JsonKey.new(includeIfNull: false, unknownEnumValue: JsonKey.nullForUndefinedEnumValue) @Default.new(ImageSize.v1024x1024) ImageSize? size, @JsonKey.new(includeIfNull: false, unknownEnumValue: JsonKey.nullForUndefinedEnumValue) @Default.new(ImageStyle.vivid) ImageStyle? style, @JsonKey.new(includeIfNull: false) String? user})
-
Factory constructor for CreateImageRequest
constfactory
-
CreateImageRequest.fromJson(Map<
String, dynamic> json) -
Object construction from a JSON representation
factory
Properties
-
copyWith
→ $CreateImageRequestCopyWith<
CreateImageRequest> -
Create a copy of CreateImageRequest
with the given fields replaced by the non-null parameter values.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- model → CreateImageRequestModel?
-
The model to use for image generation.
no setterinherited
- n → int?
-
The number of images to generate. Must be between 1 and 10. For
dall-e-3, onlyn=1is supported.no setterinherited - prompt → String
-
A text description of the desired image(s). The maximum length is 1000 characters for
dall-e-2and 4000 characters fordall-e-3.no setterinherited - quality → ImageQuality
-
The quality of the image that will be generated.
hdcreates images with finer details and greater consistency across the image. This param is only supported fordall-e-3.no setterinherited - responseFormat → ImageResponseFormat?
-
The format in which the generated images are returned. Must be one of
urlorb64_json. URLs are only valid for 60 minutes after the image has been generated.no setterinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → ImageSize?
-
The size of the generated images. Must be one of
256x256,512x512, or1024x1024fordall-e-2. Must be one of1024x1024,1792x1024, or1024x1792fordall-e-3models.no setterinherited - style → ImageStyle?
-
The style of the generated images. Must be one of
vividornatural. Vivid causes the model to lean towards generating hyper-real and dramatic images. Natural causes the model to produce more natural, less hyper-real looking images. This param is only supported fordall-e-3.no setterinherited - user → String?
-
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this CreateImageRequest to a JSON map.
inherited
-
toMap(
) → Map< String, dynamic> - Map representation of object (not serialized)
-
toString(
) → String -
A string representation of this object.
inherited
-
validateSchema(
) → String? - Perform validations on the schema property values
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- nDefaultValue → const int
- Validation constants
- nMaxValue → const int
- nMinValue → const int
-
propertyNames
→ const List<
String> - List of all property names of schema