CreateImageRequest class
Constructors
- CreateImageRequest({required String prompt, int? n = 1, CreateImageRequestSizeEnum? size = const CreateImageRequestSizeEnum._('1024x1024'), CreateImageRequestResponseFormatEnum? responseFormat = const CreateImageRequestResponseFormatEnum._('url'), String? user})
- Returns a new CreateImageRequest instance.
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- n ↔ int?
-
The number of images to generate. Must be between 1 and 10.
getter/setter pair
- prompt ↔ String
-
A text description of the desired image(s). The maximum length is 1000 characters.
getter/setter pair
- responseFormat ↔ CreateImageRequestResponseFormatEnum?
-
The format in which the generated images are returned. Must be one of
url
orb64_json
.getter/setter pair - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size ↔ CreateImageRequestSizeEnum?
-
The size of the generated images. Must be one of
256x256
,512x512
, or1024x1024
.getter/setter pair - user ↔ String?
-
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more.
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
fromJson(
dynamic value) → CreateImageRequest? -
Returns a new CreateImageRequest instance and imports its values from
value
if it's a Map, null otherwise. -
listFromJson(
dynamic json, {bool growable = false}) → List< CreateImageRequest> ? -
mapFromJson(
dynamic json) → Map< String, CreateImageRequest> -
mapListFromJson(
dynamic json, {bool growable = false}) → Map< String, List< CreateImageRequest> >
Constants
-
requiredKeys
→ const Set<
String> - The list of required keys that must be present in a JSON.