Docs/Features/Image generation
Features

Image generation

Generate images from a text prompt right in the chat β€” the picture rides the assistant's own reply on every channel and client, no separate bubble. Powered by FAL (FLUX, Stable Diffusion, Recraft, Ideogram); bring your own FAL key, pick a model in setup, and the agent calls the image_generate tool whenever you ask for a picture.

Ask Flowly for an image and it appears inline in the reply β€” no separate message, no link to click. Generation runs through FAL with a model you choose, the file is downloaded to your Flowly home, and Flowly's media-delivery layer surfaces it on whatever surface you're talking from: a Telegram photo, an inline image in the desktop/iOS chat, or an attachment fetched over the gateway.

It's an opt-in tool: it registers only when tools.image_generation is enabled and has an API key. Bring your own FAL key β€” there's no hosted image quota in the open-source build.

Quick start

> draw a watercolor fox sleeping under a maple tree, autumn light
… Flowly: Here's the watercolor fox β€” soft autumn palette, curled up under
  the maple. (image attached)

The agent decides to call image_generate on its own when your message asks for a picture. You never invoke the tool directly.

Setup

The tool is gated behind the FAL Image Generation integration card. Configure it any of three ways:

1. Setup wizard (recommended)

flowly setup            # full wizard β€” pick "FAL Image Generation", paste a key, choose a model

Get a key at fal.ai/dashboard/keys.

2. Desktop / remote β€” open Connections, find FAL Image Generation, enter your key and pick a model. This works for local, relay, and self-hosted gateway bots through the same connection RPC.

3. By hand β€” edit ~/.flowly/config.json (keys are camelCase):

{
  "tools": {
    "imageGeneration": {
      "enabled": true,
      "apiKey": "fal-...",
      "model": "fal-ai/flux/dev"
    }
  }
}

Restart the gateway / start a new session after enabling β€” the tool is wired at agent boot.

Models

FAL has no clean "list all image models" API, so Flowly ships a curated short list of popular, known-good models. You pick the default in setup; the agent can override it per call via the model parameter.

Model idLabelBest for
fal-ai/flux/schnellFLUX.1 [schnell]Fastest & cheapest
fal-ai/flux/devFLUX.1 [dev]Balanced quality/speed (default)
fal-ai/flux-pro/v1.1FLUX1.1 [pro]Highest quality
fal-ai/stable-diffusion-v35-largeStable Diffusion 3.5 LargeOpen, versatile
fal-ai/recraft-v3Recraft V3Strong typography & logos
fal-ai/ideogram/v2Ideogram v2Best in-image text

You can also pass any FAL text-to-image model id as the model argument β€” the curated list is just what the picker shows.

The image_generate tool

ParameterTypeNotes
promptstring (required)The image description. Always written in English β€” the agent translates your request if you asked in another language, because most image models understand English best.
image_sizestringsquare_hd Β· square Β· portrait_4_3 Β· portrait_16_9 Β· landscape_4_3 (default) Β· landscape_16_9
num_imagesintegerHow many to generate, 1–4 (clamped).
modelstringOptional β€” override the configured default with any FAL model id.
Prompts are always sent in English. If you write "kar altΔ±nda bir kedi Γ§iz", the agent translates the description to English before calling the model β€” non-English prompts produce noticeably worse results on most image models.

How delivery works

The generated file is downloaded to ~/.flowly/media/img-<id>.png and then rides the assistant's own reply β€” there is no separate "here's your image" message. The same picture reaches every surface through Flowly's existing media path:

  • Messaging channels (Telegram, WhatsApp, …) β€” sent as a native photo/attachment.
  • Relay-connected apps (iOS / desktop / web) β€” uploaded and surfaced from the conversation.
  • Direct gateway clients (self-hosted iOS / desktop) β€” delivered as an inline thumbnail with the reply, with the full-resolution original served on demand from GET /api/media?id=… (tap to zoom). No relay/S3 needed.

Because the file lives on disk, a generated image still shows correctly when you re-open a past conversation.

Configuration reference

Everything lives under tools.imageGeneration in ~/.flowly/config.json:

KeyTypeMeaning
enabledboolMaster switch. The tool is registered only when this is true and apiKey is set.
apiKeystringYour FAL API key (fal-…). Stored on the bot; remote clients only ever see "configured", never the secret.
modelstringDefault model id (one of the curated list, or any FAL model). Defaults to fal-ai/flux/dev.

Notes & limits

  • Bring your own key β€” image generation bills to your FAL account; there is no hosted quota in the open-source build.
  • Synchronous β€” Flowly calls FAL's sync endpoint (POST https://fal.run/{model}), which suits images (a few seconds). Errors (auth, network, malformed response) come back as a short, user-facing message.
  • num_images is capped at 4 per call.
  • Image-editing (image-to-image) is not wired yet β€” the model catalog records an edit_endpoint for FLUX [dev] for a future image_edit tool, but there's no edit tool in this version.