Skip to main content
Endpoint: POST https://fal.run/fal-ai/ideogram/v2/edit Endpoint ID: fal-ai/ideogram/v2/edit

Try it in the Playground

Run this model interactively with your own prompts.

Quick Start

import fal_client

def on_queue_update(update):
    if isinstance(update, fal_client.InProgress):
        for log in update.logs:
           print(log["message"])

result = fal_client.subscribe(
    "fal-ai/ideogram/v2/edit",
    arguments={
        "prompt": "A knight in shining armour holding a greatshield with \"FAL\" on it",
        "image_url": "https://storage.googleapis.com/falserverless/flux-lora/example-images/knight.jpeg",
        "mask_url": "https://storage.googleapis.com/falserverless/flux-lora/example-images/mask_knight.jpeg"
    },
    with_logs=True,
    on_queue_update=on_queue_update,
)
print(result)

Capabilities

  • Text prompt input
  • Image input
  • Inpainting (mask support)
  • Reproducible generation (seed)
  • Synchronous mode

API Reference

Input Schema

prompt
string
required
The prompt to fill the masked part of the image.
image_url
string
required
The image URL to generate an image from. Needs to match the dimensions of the mask.
mask_url
string
required
The mask URL to inpaint the image. Needs to match the dimensions of the input image.
seed
integer
Seed for the random number generator
style
StyleEnum
default:"auto"
The style of the generated image Default value: "auto"Possible values: auto, general, realistic, design, render_3D, anime
expand_prompt
boolean
default:"true"
Whether to expand the prompt with MagicPrompt functionality. Default value: true
sync_mode
boolean
default:"false"
If True, the media will be returned as a data URI and the output data won’t be available in the request history.

Output Schema

images
list<File>
required
seed
integer
required
Seed used for the random number generator

Input Example

{
  "prompt": "A knight in shining armour holding a greatshield with \"FAL\" on it",
  "image_url": "https://storage.googleapis.com/falserverless/flux-lora/example-images/knight.jpeg",
  "mask_url": "https://storage.googleapis.com/falserverless/flux-lora/example-images/mask_knight.jpeg",
  "style": "auto",
  "expand_prompt": true,
  "sync_mode": false
}

Output Example

{
  "images": [
    {
      "url": "https://fal.media/files/monkey/cNaoxPl0YAWYb-QVBvO9F_image.png"
    }
  ],
  "seed": 123456
}

Limitations

  • style restricted to: auto, general, realistic, design, render_3D, anime