Image Generation Guide
Overview​
This guide covers image generation using the FlyMyAI platform. We'll walk through available models, parameters, and how to get the best results.
Available Models​
- SDXLTurbo - Ultra-fast image generation
- NanoBananaPro - High-quality image generation
- Flux Dev Fast - Fast development-quality generation
- Flux Schnell Fast - Ultra-fast Flux generation
- Flux Schnell LoRA - Fast customizable generation with LoRA support
- Flux Dev LoRA - Customizable image generation with LoRA support
Basic Usage​
SDXLTurbo (fastest)​
from flymyai import client
import base64
fma_client = client(apikey="fly-***")
response = fma_client.predict(
model="flymyai/SDXLTurbo",
payload={
"prompt": "A beautiful sunset over mountains, digital art",
"negative_prompt": "blurry, low quality",
}
)
# SDXLTurbo returns base64 image under the "sample" key
image_data = base64.b64decode(response.output_data["sample"][0])
with open("output.jpg", "wb") as f:
f.write(image_data)
NanoBananaPro​
from flymyai import client
import base64
fma_client = client(apikey="fly-***")
response = fma_client.predict(
model="flymyai/nano-banana-pro",
payload={
"prompt": "A magical forest with glowing mushrooms and fairies",
"width": 1024,
"height": 1024,
"num_inference_steps": 4,
"seed": 42
}
)
# NanoBananaPro returns base64 image under the "image" key
image_data = base64.b64decode(response.output_data["image"][0])
with open("output.png", "wb") as f:
f.write(image_data)
note
Different models return output under different keys (e.g. sample, image). Check the model page on FlyMy.AI for the exact output schema.
Parameters​
| Parameter | Description |
|---|---|
prompt | Text description of the image you want to generate |
negative_prompt | Elements you want to avoid in the generated image |
width | Image width in pixels |
height | Image height in pixels |
num_inference_steps | Number of denoising steps (higher = better quality but slower) |
guidance_scale | How closely to follow the prompt (higher = more faithful) |
seed | Random seed for reproducibility |
Not all parameters are supported by every model. Check the model page for the exact parameters available.
Best Practices​
- Be specific in your prompts
- Use negative prompts to avoid unwanted elements
- Experiment with different parameters
- Use appropriate image dimensions for your use case
- Save your seeds for reproducible results