ByteChef LogoByteChef

AI Image

AI Helper component for image analysis and generation.

Categories: Artificial Intelligence

Type: aiImage/v1


Actions

Generate Image

Name: generateImage

AI generate an image that you prompt.

Properties

NameLabelTypeDescriptionRequired
providerProviderSTRINGtrue
modelModelSTRING
Depends On provider
ID of the model to use.true
modelModelSTRINGID of the model to use.true
promptPromptSTRINGWrite your prompt for generating an image.true
nNumber of ResponsesINTEGERThe number of images to generate. Must be between 1 and 10. For dall-e-3, only n=1 is supported..false
sizeSizeSTRING
Options DALL_E_2_256x256, DALL_E_2_512x512, _1024x1024, DALL_E_3_1792x1024, DALL_E_3_1024x1792
The size of the generated images.true
heightHeightINTEGERHeight of the image to generate, in pixels, in an increment divisible by 64. Engine-specific dimension validation applies.true
widthWidthINTEGERWidth of the image to generate, in pixels, in an increment divisible by 64. Engine-specific dimension validation applies.true
responseFormatResponse formatSTRING
Options URL, B64_JSON
The format in which the generated images are returned.false

Example JSON Structure

{
  "label" : "Generate Image",
  "name" : "generateImage",
  "parameters" : {
    "provider" : "",
    "model" : "",
    "prompt" : "",
    "n" : 1,
    "size" : "",
    "height" : 1,
    "width" : 1,
    "responseFormat" : ""
  },
  "type" : "aiImage/v1/generateImage"
}

Output

Type: OBJECT

Properties

NameTypeDescription
urlSTRINGURL of the generated image.
b64JsonSTRINGBase64 encoded JSON of the generated image.

Output Example

{
  "url" : "",
  "b64Json" : ""
}

How is this guide?

Last updated on

On this page