Python package
ra.ai_image
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.
import rhinoartisan as ra
Wraps ArtisanPlugin.Scripting.AiImageApi.
Functions
| Function | |
|---|---|
generate() | Generates one image with fal.ai and saves it. |
ra.ai_image.generate()
ra.ai_image.generate(prompt: str, source=None, preset=None, path=None) -> AiImageResult
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.
| Parameter | Type | |
|---|---|---|
prompt | str | required |
source | str | optional — None = the tool default |
preset | str | optional — None = the tool default |
path | str | optional — None = the tool default |