XenoGuard 4.0 Documentation

Sketch To Image

ActionStep Reference » OpenAI » Image » Sketch To Image

The OpenAI Sketch To Image ActionStep turns simple sketches into fully realized images. By providing a sketch and specifying desired dimensions, users can harness the power of OpenAI's API to bring their visions to life.

Example: The drawing of the three flowers is converted into a realistic image:

[-] Hide
  1. Open the OpenAI node in the Workspace Explorer.
  2. In the Image node, select the Sketch To Image ActionStep.

Parameters:

The ActionStep has the following input parameters:


Name Description
API Key
The OpenAI API key.

Allowed Context Scopes
 [Fixed, Local, Global, Reference]
Allowed Context Types [Fixed, Variable, Parameter, Result, Enum]
Allowed Context Values [String]
Sketch
The file path of sketch.

Allowed Context Scopes
 [Fixed, Local, Global, Reference]
Allowed Context Types [Fixed, Variable, Parameter, Result, Enum]
Allowed Context Values [String]
Width
The width of the image.

Allowed Context Scopes
 [Fixed, Local, Global, Reference]
Allowed Context Types [Fixed, Variable, Parameter, Result, Enum]
Allowed Context Values [Int64]
Height
The height of the image.

Allowed Context Scopes
 [Fixed, Local, Global, Reference]
Allowed Context Types [Fixed, Variable, Parameter, Result, Enum]
Allowed Context Values [Int64]
Timeout
The duration in ms before the API request times out.

Allowed Context Scopes
 [Fixed, Local, Global, Reference]
Allowed Context Types [Fixed, Variable, Parameter, Result, Enum]
Allowed Context Values [Int64]

Results:

The ActionStep returns the following results:

name Description
Success
A Boolean indicator that confirms the success of the image generation process.

Allowed Context Scopes
 [Fixed, Local, Global, Reference]
Allowed Context Types [Fixed, Variable, Parameter, Result, Enum]
Allowed Context Values [Boolean]
Image Pathname
The pathname of the created image.

Allowed Context Scopes
 [Fixed, Local, Global, Reference]
Allowed Context Types [Fixed, Variable, Parameter, Result, Enum]
Allowed Context Values [String]
Image
The created image.

Allowed Context Scopes
 [Fixed, Local, Global, Reference]
Allowed Context Types [Fixed, Variable, Parameter, Result, Enum]
Allowed Context Values [Bitmap]

Example 1 (Convert sketch into realistic image):

This example illustrates an ActionScript where an initial step loads an image from a specified path, and then the 'OpenAI Sketch to Image' ActionStep uses the OpenAI API to transform the sketch into a detailed image. The parameters set include the API key, the path to the sketch, and the desired dimensions of the output image. Upon successful execution, the resultant image is saved at a specified location on the user's system, as indicated by the 'Image Pathname' in the result list.

See other operations:

Generate Image
Vision