toggle menu
http4k
6.9.0.0
jvm
switch theme
search in API
http4k-connect-ai-openai
/
org.http4k.connect.openai.action
/
GenerateImage
Generate
Image
@
JsonSerializable
data
class
GenerateImage
(
val
prompt
:
String
,
val
size
:
Size
=
Size.`1024x1024`
,
val
response_format
:
ImageResponseFormat
=
url
,
val
n
:
Int
=
1
,
val
quality
:
Quality
=
Quality.standard
,
val
style
:
Style
=
Style.vivid
,
val
user
:
User
?
=
null
)
:
NonNullAutoMarshalledAction
<
GeneratedImage
>
,
OpenAIAction
<
GeneratedImage
>
Members
Constructors
Generate
Image
Link copied to clipboard
constructor
(
prompt
:
String
,
size
:
Size
)
constructor
(
prompt
:
String
,
size
:
Size
=
Size.`1024x1024`
,
response_format
:
ImageResponseFormat
=
url
,
n
:
Int
=
1
,
quality
:
Quality
=
Quality.standard
,
style
:
Style
=
Style.vivid
,
user
:
User
?
=
null
)
Properties
n
Link copied to clipboard
val
n
:
Int
=
1
prompt
Link copied to clipboard
val
prompt
:
String
quality
Link copied to clipboard
val
quality
:
Quality
response_
format
Link copied to clipboard
val
response_format
:
ImageResponseFormat
size
Link copied to clipboard
val
size
:
Size
style
Link copied to clipboard
val
style
:
Style
user
Link copied to clipboard
val
user
:
User
?
=
null
Functions
to
Request
Link copied to clipboard
open
override
fun
toRequest
(
)
:
Request
to
Result
Link copied to clipboard
open
override
fun
toResult
(
response
:
Response
)
:
Result
<
GeneratedImage
,
RemoteFailure
>