Divooka Reference

OpenAI Image Generation

2 nodes

On this page 2

Generate Image

Function

Generate image using Dall-E.

Signature
GenerateImage -> Pixel Image
    prompt: Text
    size: Text
    model: Text
    configuration: OpenAIConfiguration
PixelImage GenerateImage(
    string prompt,
    string size = "256x256",
    string model = "dall-e-2",
    OpenAIConfiguration configuration)

Parameters

nametypedefaultdescription
promptText—The user query.
sizeText256x256Output image size. For gpt-image-1, choose from 1024x1024, 1536x1024 (landscape), 1024x1536 (portrait), or auto (default value); For dall-e-2, choose from 256x256, 512x512, or 1024x1024; For dall-e-3, choose from 1024x1024, 1792x1024, or 1024x1792.
modelTextdall-e-2Available models: gpt-image-1, dall-e-2 and dall-e-3
configurationOpenAIConfiguration—The OpenAI configuration settings.

Returns

resultPixel Image
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
OpenAI Image Generation
Package
Generative AI

Generate Image To File

Function

Generate image using Dall-E and save to file.

Signature
GenerateImageToFile -> Pixel Image
    prompt: Text
    filePath: Text
    size: Text
    model: Text
    configuration: OpenAIConfiguration
PixelImage GenerateImageToFile(
    string prompt,
    string filePath,
    string size = "256x256",
    string model = "dall-e-2",
    OpenAIConfiguration configuration)

Parameters

nametypedefaultdescription
promptText—The user query.
filePathText—Path to the file.
sizeText256x256Output image size. For gpt-image-1, choose from 1024x1024, 1536x1024 (landscape), 1024x1536 (portrait), or auto (default value); For dall-e-2, choose from 256x256, 512x512, or 1024x1024; For dall-e-3, choose from 1024x1024, 1792x1024, or 1024x1792.
modelTextdall-e-2Available models: gpt-image-1, dall-e-2 and dall-e-3
configurationOpenAIConfiguration—The OpenAI configuration settings.

Returns

resultPixel Image
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
OpenAI Image Generation
Package
Generative AI