> ## Documentation Index
> Fetch the complete documentation index at: https://fliqr.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate and edit images with AI

> Generate images from text with OpenAI, Google Gemini, or xAI in Fliqr AI Flows — and edit images with Gemini when supported.

Image generation turns a text description into an image URL or file you can send back in the chat. Some providers also support image editing.

## Providers

| Provider          | Capabilities in Flows                  |
| ----------------- | -------------------------------------- |
| **OpenAI**        | Generate image from prompt             |
| **Google Gemini** | Generate image; edit an existing image |
| **xAI**           | Generate image from prompt             |

Connect keys under [AI Providers](/docs/core-concepts/ai-agents/ai-providers).

## Generate an image

<Steps>
  <Step title="Collect the prompt">
    Use **User Input** (or a static prompt) and save the description to a custom field.
  </Step>

  <Step title="Add the provider action">
    Choose **Generate image** for OpenAI, Gemini, or xAI.
  </Step>

  <Step title="Map input and output">
    Pass the prompt field in; save the result URL/file to another custom field.
  </Step>

  <Step title="Send the image">
    Use an **Image** / Message block that references the output field.
  </Step>
</Steps>

## Edit an image (Gemini)

1. Collect the source image into a custom field.
2. Collect edit instructions (“remove background”, “add a red circle”).
3. Run the Gemini **edit image** action with both fields.
4. Send the edited output.

## Quality tips

* Be specific about subject, style, aspect, and what to avoid
* Remind the model about brand constraints in the prompt
* Verify channel [media limits](/docs/troubleshooting/platform-limits) before sending large outputs
* Keep a fallback message if generation fails

<Warning>
  Generated images may be inappropriate or off-brand. Add moderation/review steps for customer-facing creative workflows.
</Warning>

## Next

<CardGroup cols={2}>
  <Card title="Vision" icon="eye" href="/docs/core-concepts/ai-agents/vision">
    Analyze images customers upload.
  </Card>

  <Card title="Rich responses" icon="icons" href="/docs/core-concepts/ai-agents/rich-responses">
    Send carousels and buttons around generated media.
  </Card>
</CardGroup>
