# Seed for reproducibility
image = client.models.generate_image(
model="black-forest-labs/FLUX.1-schnell",
prompt="A cat in space",
seed=42,
num_inference_steps=4,
guidance=3.5,
)
# Image editing — pass a file path, URL, or base64 string
image = client.models.generate_image(
model="black-forest-labs/FLUX.1-kontext-pro",
prompt="Make the sky purple",
image="./photo.png", # file path (auto base64-encoded)
)
# Image editing with URL
image = client.models.generate_image(
model="Wan-AI/Wan2.6-Image-Edit",
prompt="Remove the background",
image="https://example.com/photo.png", # URL (passed as-is)
)
# ControlNet / Canny
image = client.models.generate_image(
model="some-controlnet-model",
prompt="A building",
control_image="./edges.png",
strength=0.8,
)