Skip to content

.NET API

AiImageApi

AI images with fal.ai, the engine of Generative AI Studio and of the Assistant’s generate_image: a photoreal render of the viewport, an edit of an image file, or an image from a prompt alone. Runs on the user’s fal.ai key (Options > Integrations) and every call is billed by fal.ai.

from ArtisanPlugin.Scripting import AiImageApi

See also the Python package, ra.ai_image.

Methods

Method
GenerateGenerates one image with fal.ai and saves it.

Generate

AiImageResult AiImageApi.Generate(
    string prompt,
    string source = null,
    string preset = null,
    string path = null)

Generates one image with fal.ai and saves it. source: “viewport” (default; captures the active viewport), “none” (the prompt alone) or the path of an image file to edit. preset: “photoreal_render” (a photographic jewelry render of the source, or of the description with no source), “try_on” (the piece worn) or omitted (the prompt says what to do). path: where to save it (default: a new file under the user folder’s Falai\Generated). Takes from a few seconds to a minute; each call is billed to the user’s fal.ai account.

ParameterTypeDefault
promptstringrequired
sourcestringnull
presetstringnull
pathstringnull

Returns AiImageResult.