Genkit JS API reference
Preparing search index...
@genkit-ai/vertexai
/
ImagenConfigSchema
Variable ImagenConfigSchema
Const
ImagenConfigSchema
:
z
.
ZodObject
<
{
apiKey
:
z
.
ZodOptional
<
z
.
ZodString
>
;
maxOutputTokens
:
z
.
ZodOptional
<
z
.
ZodNumber
>
;
stopSequences
:
z
.
ZodOptional
<
z
.
ZodArray
<
z
.
ZodString
,
"many"
>
>
;
temperature
:
z
.
ZodOptional
<
z
.
ZodNumber
>
;
topK
:
z
.
ZodOptional
<
z
.
ZodNumber
>
;
topP
:
z
.
ZodOptional
<
z
.
ZodNumber
>
;
version
:
z
.
ZodOptional
<
z
.
ZodString
>
;
}
&
{
addWatermark
:
z
.
ZodOptional
<
z
.
ZodBoolean
>
;
aspectRatio
:
z
.
ZodOptional
<
z
.
ZodEnum
<
[
"1:1"
,
"9:16"
,
"16:9"
,
"3:4"
,
"4:3"
]
>
,
>
;
editConfig
:
z
.
ZodOptional
<
z
.
ZodObject
<
{
editMode
:
z
.
ZodOptional
<
z
.
ZodEnum
<
[
"inpainting-insert"
,
"inpainting-remove"
,
"outpainting"
,
"product-image"
,
]
,
>
,
>
;
guidanceScale
:
z
.
ZodOptional
<
z
.
ZodNumber
>
;
maskDilation
:
z
.
ZodOptional
<
z
.
ZodNumber
>
;
maskMode
:
z
.
ZodOptional
<
z
.
ZodObject
<
{
classes
:
z
.
ZodOptional
<
z
.
ZodArray
<
(...)
,
(...)
>
>
;
maskType
:
z
.
ZodEnum
<
[
(...)
,
(...)
,
(...)
]
>
;
}
,
"strip"
,
z
.
ZodTypeAny
,
{
classes
?:
(...)
[]
;
maskType
:
"background"
|
"foreground"
|
"semantic"
;
}
,
{
classes
?:
(...)
[]
;
maskType
:
"background"
|
"foreground"
|
"semantic"
;
}
,
>
,
>
;
productPosition
:
z
.
ZodOptional
<
z
.
ZodEnum
<
[
"reposition"
,
"fixed"
]
>
>
;
}
,
"passthrough"
,
z
.
ZodTypeAny
,
z
.
objectOutputType
<
{
editMode
:
z
.
ZodOptional
<
z
.
ZodEnum
<
[
"inpainting-insert"
,
"inpainting-remove"
,
"outpainting"
,
"product-image"
,
]
,
>
,
>
;
guidanceScale
:
z
.
ZodOptional
<
z
.
ZodNumber
>
;
maskDilation
:
z
.
ZodOptional
<
z
.
ZodNumber
>
;
maskMode
:
z
.
ZodOptional
<
z
.
ZodObject
<
{
classes
:
z
.
ZodOptional
<
(...)
>
;
maskType
:
z
.
ZodEnum
<
(...)
>
}
,
"strip"
,
z
.
ZodTypeAny
,
{
classes
?:
(...)
|
(...)
;
maskType
:
(...)
|
(...)
|
(...)
}
,
{
classes
?:
(...)
|
(...)
;
maskType
:
(...)
|
(...)
|
(...)
}
,
>
,
>
;
productPosition
:
z
.
ZodOptional
<
z
.
ZodEnum
<
[
"reposition"
,
"fixed"
]
>
>
;
}
,
z
.
ZodTypeAny
,
"passthrough"
,
>
,
z
.
objectInputType
<
{
editMode
:
z
.
ZodOptional
<
z
.
ZodEnum
<
[
"inpainting-insert"
,
"inpainting-remove"
,
"outpainting"
,
"product-image"
,
]
,
>
,
>
;
guidanceScale
:
z
.
ZodOptional
<
z
.
ZodNumber
>
;
maskDilation
:
z
.
ZodOptional
<
z
.
ZodNumber
>
;
maskMode
:
z
.
ZodOptional
<
z
.
ZodObject
<
{
classes
:
z
.
ZodOptional
<
(...)
>
;
maskType
:
z
.
ZodEnum
<
(...)
>
}
,
"strip"
,
z
.
ZodTypeAny
,
{
classes
?:
(...)
|
(...)
;
maskType
:
(...)
|
(...)
|
(...)
}
,
{
classes
?:
(...)
|
(...)
;
maskType
:
(...)
|
(...)
|
(...)
}
,
>
,
>
;
productPosition
:
z
.
ZodOptional
<
z
.
ZodEnum
<
[
"reposition"
,
"fixed"
]
>
>
;
}
,
z
.
ZodTypeAny
,
"passthrough"
,
>
,
>
,
>
;
language
:
z
.
ZodOptional
<
z
.
ZodEnum
<
[
"auto"
,
"en"
,
"es"
,
"hi"
,
"ja"
,
"ko"
,
"pt"
,
"zh-TW"
,
"zh"
,
"zh-CN"
]
,
>
,
>
;
location
:
z
.
ZodOptional
<
z
.
ZodString
>
;
mode
:
z
.
ZodOptional
<
z
.
ZodEnum
<
[
"upscale"
]
>
>
;
negativePrompt
:
z
.
ZodOptional
<
z
.
ZodString
>
;
personGeneration
:
z
.
ZodOptional
<
z
.
ZodEnum
<
[
"dont_allow"
,
"allow_adult"
,
"allow_all"
]
>
,
>
;
safetySetting
:
z
.
ZodOptional
<
z
.
ZodEnum
<
[
"block_most"
,
"block_some"
,
"block_few"
,
"block_fewest"
]
>
,
>
;
seed
:
z
.
ZodOptional
<
z
.
ZodNumber
>
;
storageUri
:
z
.
ZodOptional
<
z
.
ZodString
>
;
upscaleConfig
:
z
.
ZodOptional
<
z
.
ZodObject
<
{
upscaleFactor
:
z
.
ZodEnum
<
[
"x2"
,
"x4"
]
>
}
,
"strip"
,
z
.
ZodTypeAny
,
{
upscaleFactor
:
"x2"
|
"x4"
}
,
{
upscaleFactor
:
"x2"
|
"x4"
}
,
>
,
>
;
}
,
"passthrough"
,
z
.
ZodTypeAny
,
z
.
objectOutputType
<
{
apiKey
:
z
.
ZodOptional
<
z
.
ZodString
>
;
maxOutputTokens
:
z
.
ZodOptional
<
z
.
ZodNumber
>
;
stopSequences
:
z
.
ZodOptional
<
z
.
ZodArray
<
z
.
ZodString
,
"many"
>
>
;
temperature
:
z
.
ZodOptional
<
z
.
ZodNumber
>
;
topK
:
z
.
ZodOptional
<
z
.
ZodNumber
>
;
topP
:
z
.
ZodOptional
<
z
.
ZodNumber
>
;
version
:
z
.
ZodOptional
<
z
.
ZodString
>
;
}
&
{
addWatermark
:
z
.
ZodOptional
<
z
.
ZodBoolean
>
;
aspectRatio
:
z
.
ZodOptional
<
z
.
ZodEnum
<
[
"1:1"
,
"9:16"
,
"16:9"
,
"3:4"
,
"4:3"
]
>
,
>
;
editConfig
:
z
.
ZodOptional
<
z
.
ZodObject
<
{
editMode
:
z
.
ZodOptional
<
z
.
ZodEnum
<
[
"inpainting-insert"
,
"inpainting-remove"
,
"outpainting"
,
"product-image"
,
]
,
>
,
>
;
guidanceScale
:
z
.
ZodOptional
<
z
.
ZodNumber
>
;
maskDilation
:
z
.
ZodOptional
<
z
.
ZodNumber
>
;
maskMode
:
z
.
ZodOptional
<
z
.
ZodObject
<
{
classes
:
z
.
ZodOptional
<
(...)
>
;
maskType
:
z
.
ZodEnum
<
(...)
>
}
,
"strip"
,
z
.
ZodTypeAny
,
{
classes
?:
(...)
|
(...)
;
maskType
:
(...)
|
(...)
|
(...)
}
,
{
classes
?:
(...)
|
(...)
;
maskType
:
(...)
|
(...)
|
(...)
}
,
>
,
>
;
productPosition
:
z
.
ZodOptional
<
z
.
ZodEnum
<
[
"reposition"
,
"fixed"
]
>
>
;
}
,
"passthrough"
,
z
.
ZodTypeAny
,
z
.
objectOutputType
<
{
editMode
:
z
.
ZodOptional
<
z
.
ZodEnum
<
[
(...)
,
(...)
,
(...)
,
(...)
]
>
>
;
guidanceScale
:
z
.
ZodOptional
<
z
.
ZodNumber
>
;
maskDilation
:
z
.
ZodOptional
<
z
.
ZodNumber
>
;
maskMode
:
z
.
ZodOptional
<
z
.
ZodObject
<
{
classes
:
...
;
maskType
:
...
}
,
"strip"
,
z
.
ZodTypeAny
,
{
classes
?:
...
;
maskType
:
...
}
,
{
classes
?:
...
;
maskType
:
...
}
,
>
,
>
;
productPosition
:
z
.
ZodOptional
<
z
.
ZodEnum
<
[
(...)
,
(...)
]
>
>
;
}
,
z
.
ZodTypeAny
,
"passthrough"
,
>
,
z
.
objectInputType
<
{
editMode
:
z
.
ZodOptional
<
z
.
ZodEnum
<
[
(...)
,
(...)
,
(...)
,
(...)
]
>
>
;
guidanceScale
:
z
.
ZodOptional
<
z
.
ZodNumber
>
;
maskDilation
:
z
.
ZodOptional
<
z
.
ZodNumber
>
;
maskMode
:
z
.
ZodOptional
<
z
.
ZodObject
<
{
classes
:
...
;
maskType
:
...
}
,
"strip"
,
z
.
ZodTypeAny
,
{
classes
?:
...
;
maskType
:
...
}
,
{
classes
?:
...
;
maskType
:
...
}
,
>
,
>
;
productPosition
:
z
.
ZodOptional
<
z
.
ZodEnum
<
[
(...)
,
(...)
]
>
>
;
}
,
z
.
ZodTypeAny
,
"passthrough"
,
>
,
>
,
>
;
language
:
z
.
ZodOptional
<
z
.
ZodEnum
<
[
"auto"
,
"en"
,
"es"
,
"hi"
,
"ja"
,
"ko"
,
"pt"
,
"zh-TW"
,
"zh"
,
"zh-CN"
]
,
>
,
>
;
location
:
z
.
ZodOptional
<
z
.
ZodString
>
;
mode
:
z
.
ZodOptional
<
z
.
ZodEnum
<
[
"upscale"
]
>
>
;
negativePrompt
:
z
.
ZodOptional
<
z
.
ZodString
>
;
personGeneration
:
z
.
ZodOptional
<
z
.
ZodEnum
<
[
"dont_allow"
,
"allow_adult"
,
"allow_all"
]
>
,
>
;
safetySetting
:
z
.
ZodOptional
<
z
.
ZodEnum
<
[
"block_most"
,
"block_some"
,
"block_few"
,
"block_fewest"
]
>
,
>
;
seed
:
z
.
ZodOptional
<
z
.
ZodNumber
>
;
storageUri
:
z
.
ZodOptional
<
z
.
ZodString
>
;
upscaleConfig
:
z
.
ZodOptional
<
z
.
ZodObject
<
{
upscaleFactor
:
z
.
ZodEnum
<
[
"x2"
,
"x4"
]
>
}
,
"strip"
,
z
.
ZodTypeAny
,
{
upscaleFactor
:
"x2"
|
"x4"
}
,
{
upscaleFactor
:
"x2"
|
"x4"
}
,
>
,
>
;
}
,
z
.
ZodTypeAny
,
"passthrough"
,
>
,
z
.
objectInputType
<
{
apiKey
:
z
.
ZodOptional
<
z
.
ZodString
>
;
maxOutputTokens
:
z
.
ZodOptional
<
z
.
ZodNumber
>
;
stopSequences
:
z
.
ZodOptional
<
z
.
ZodArray
<
z
.
ZodString
,
"many"
>
>
;
temperature
:
z
.
ZodOptional
<
z
.
ZodNumber
>
;
topK
:
z
.
ZodOptional
<
z
.
ZodNumber
>
;
topP
:
z
.
ZodOptional
<
z
.
ZodNumber
>
;
version
:
z
.
ZodOptional
<
z
.
ZodString
>
;
}
&
{
addWatermark
:
z
.
ZodOptional
<
z
.
ZodBoolean
>
;
aspectRatio
:
z
.
ZodOptional
<
z
.
ZodEnum
<
[
"1:1"
,
"9:16"
,
"16:9"
,
"3:4"
,
"4:3"
]
>
,
>
;
editConfig
:
z
.
ZodOptional
<
z
.
ZodObject
<
{
editMode
:
z
.
ZodOptional
<
z
.
ZodEnum
<
[
"inpainting-insert"
,
"inpainting-remove"
,
"outpainting"
,
"product-image"
,
]
,
>
,
>
;
guidanceScale
:
z
.
ZodOptional
<
z
.
ZodNumber
>
;
maskDilation
:
z
.
ZodOptional
<
z
.
ZodNumber
>
;
maskMode
:
z
.
ZodOptional
<
z
.
ZodObject
<
{
classes
:
z
.
ZodOptional
<
(...)
>
;
maskType
:
z
.
ZodEnum
<
(...)
>
}
,
"strip"
,
z
.
ZodTypeAny
,
{
classes
?:
(...)
|
(...)
;
maskType
:
(...)
|
(...)
|
(...)
}
,
{
classes
?:
(...)
|
(...)
;
maskType
:
(...)
|
(...)
|
(...)
}
,
>
,
>
;
productPosition
:
z
.
ZodOptional
<
z
.
ZodEnum
<
[
"reposition"
,
"fixed"
]
>
>
;
}
,
"passthrough"
,
z
.
ZodTypeAny
,
z
.
objectOutputType
<
{
editMode
:
z
.
ZodOptional
<
z
.
ZodEnum
<
[
(...)
,
(...)
,
(...)
,
(...)
]
>
>
;
guidanceScale
:
z
.
ZodOptional
<
z
.
ZodNumber
>
;
maskDilation
:
z
.
ZodOptional
<
z
.
ZodNumber
>
;
maskMode
:
z
.
ZodOptional
<
z
.
ZodObject
<
{
classes
:
...
;
maskType
:
...
}
,
"strip"
,
z
.
ZodTypeAny
,
{
classes
?:
...
;
maskType
:
...
}
,
{
classes
?:
...
;
maskType
:
...
}
,
>
,
>
;
productPosition
:
z
.
ZodOptional
<
z
.
ZodEnum
<
[
(...)
,
(...)
]
>
>
;
}
,
z
.
ZodTypeAny
,
"passthrough"
,
>
,
z
.
objectInputType
<
{
editMode
:
z
.
ZodOptional
<
z
.
ZodEnum
<
[
(...)
,
(...)
,
(...)
,
(...)
]
>
>
;
guidanceScale
:
z
.
ZodOptional
<
z
.
ZodNumber
>
;
maskDilation
:
z
.
ZodOptional
<
z
.
ZodNumber
>
;
maskMode
:
z
.
ZodOptional
<
z
.
ZodObject
<
{
classes
:
...
;
maskType
:
...
}
,
"strip"
,
z
.
ZodTypeAny
,
{
classes
?:
...
;
maskType
:
...
}
,
{
classes
?:
...
;
maskType
:
...
}
,
>
,
>
;
productPosition
:
z
.
ZodOptional
<
z
.
ZodEnum
<
[
(...)
,
(...)
]
>
>
;
}
,
z
.
ZodTypeAny
,
"passthrough"
,
>
,
>
,
>
;
language
:
z
.
ZodOptional
<
z
.
ZodEnum
<
[
"auto"
,
"en"
,
"es"
,
"hi"
,
"ja"
,
"ko"
,
"pt"
,
"zh-TW"
,
"zh"
,
"zh-CN"
]
,
>
,
>
;
location
:
z
.
ZodOptional
<
z
.
ZodString
>
;
mode
:
z
.
ZodOptional
<
z
.
ZodEnum
<
[
"upscale"
]
>
>
;
negativePrompt
:
z
.
ZodOptional
<
z
.
ZodString
>
;
personGeneration
:
z
.
ZodOptional
<
z
.
ZodEnum
<
[
"dont_allow"
,
"allow_adult"
,
"allow_all"
]
>
,
>
;
safetySetting
:
z
.
ZodOptional
<
z
.
ZodEnum
<
[
"block_most"
,
"block_some"
,
"block_few"
,
"block_fewest"
]
>
,
>
;
seed
:
z
.
ZodOptional
<
z
.
ZodNumber
>
;
storageUri
:
z
.
ZodOptional
<
z
.
ZodString
>
;
upscaleConfig
:
z
.
ZodOptional
<
z
.
ZodObject
<
{
upscaleFactor
:
z
.
ZodEnum
<
[
"x2"
,
"x4"
]
>
}
,
"strip"
,
z
.
ZodTypeAny
,
{
upscaleFactor
:
"x2"
|
"x4"
}
,
{
upscaleFactor
:
"x2"
|
"x4"
}
,
>
,
>
;
}
,
z
.
ZodTypeAny
,
"passthrough"
,
>
,
>
= ...
See
https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/imagen-api
.
Deprecated
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
Genkit JS API reference
Loading...
See https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/imagen-api.