Models
Image generation
Generate and edit images with GPT Image, FLUX, Imagen, Stable Diffusion, Ideogram and more through one API, with prompting tips and production advice.
7 min read · Updated November 1, 2026
AILabStore gives you image models from several providers behind the OpenAI-compatible Images endpoint. You can compare styles and prices across providers without new integrations. Image, audio and video models are included in the Pro package.
Available image models
| Model id | Strengths |
|---|---|
openai/gpt-image-1 |
Strong prompt adherence, in-image text, editing |
black-forest-labs/flux-1.1-pro |
Fast, photorealistic, high detail |
black-forest-labs/flux-1-kontext-pro |
Editing with reference images |
google/imagen-4 |
High fidelity, good typography |
stability/stable-diffusion-3.5-large |
Versatile styles, published weights |
ideogram/ideogram-3 |
Best-in-class text and layouts |
recraft/recraft-v3 |
Brand-consistent and vector output |
xai/grok-2-image |
Quick, creative generations |
Indicative per-image prices are listed on the Models page with the Image filter; live rates are in your portal.
Your first image
Python
import base64, os
from openai import OpenAI
client = OpenAI(base_url="https://api.ailabstore.cc/v1", api_key=os.environ["AILABSTORE_API_KEY"])
result = client.images.generate(
model="black-forest-labs/flux-1.1-pro",
prompt="A ceramic coffee mug on a walnut desk, morning light through a window, "
"shallow depth of field, product photography",
size="1024x1024",
n=1,
)
image = result.data[0]
if image.b64_json:
with open("mug.png", "wb") as f:
f.write(base64.b64decode(image.b64_json))
else:
print(image.url)
Depending on the model, the response contains either base64 data (b64_json) or a temporary url. Handle both, and download URLs promptly because they expire.
TypeScript
import OpenAI from "openai";
import { writeFile } from "node:fs/promises";
const client = new OpenAI({
baseURL: "https://api.ailabstore.cc/v1",
apiKey: process.env.AILABSTORE_API_KEY,
});
const result = await client.images.generate({
model: "openai/gpt-image-1",
prompt: "Flat illustration of a friendly robot watering plants, pastel palette",
size: "1024x1024",
});
const img = result.data?.[0];
if (img?.b64_json) await writeFile("robot.png", Buffer.from(img.b64_json, "base64"));
curl
curl https://api.ailabstore.cc/v1/images/generations \
-H "Authorization: Bearer $AILABSTORE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "ideogram/ideogram-3",
"prompt": "Minimal poster that says \"LAUNCH WEEK\" in bold geometric type, navy and lime",
"size": "1024x1024"
}'
Editing images
Models that support editing accept an input image and a prompt describing the change:
with open("mug.png", "rb") as f:
edited = client.images.edit(
model="openai/gpt-image-1",
image=f,
prompt="Change the mug colour to matte black and add a small steam swirl",
size="1024x1024",
)
For reference-guided edits that keep a subject consistent across images, try black-forest-labs/flux-1-kontext-pro.
Writing effective image prompts
Image models respond best to concrete, visual descriptions. A useful structure:
- Subject: what is in the image, with specific details.
- Setting: where it is and what surrounds it.
- Style: photography, illustration, 3D render, watercolour, and so on.
- Composition: close-up, wide shot, top-down, rule of thirds.
- Lighting and colour: golden hour, studio softbox, muted palette.
Close-up product photo of a stainless steel water bottle with a bamboo cap,
standing on wet river stones, forest blurred in the background, soft overcast
light, natural greens and greys, high detail
Tips:
- Be literal. Describe what you want to see, not abstract concepts.
- Put exact text in quotes and keep it short. Ideogram, GPT Image and Imagen render text most reliably.
- Avoid negatives where possible. "Empty street" works better than "no people".
- Iterate on one change at a time so you learn what each phrase does.
Use an LLM to write better prompts
A chat model can expand short ideas into detailed image prompts:
idea = "hero image for a budgeting app landing page"
prompt = client.chat.completions.create(
model="anthropic/claude-haiku-5.5",
max_tokens=120,
messages=[{
"role": "system",
"content": "Write one detailed image-generation prompt (under 60 words) covering "
"subject, setting, style, composition and lighting. Output only the prompt.",
}, {"role": "user", "content": idea}],
).choices[0].message.content
image = client.images.generate(model="google/imagen-4", prompt=prompt, size="1024x1024")
Comparing models side by side
Because every model shares the same endpoint, comparing them is a loop:
MODELS = ["openai/gpt-image-1", "black-forest-labs/flux-1.1-pro", "google/imagen-4"]
for m in MODELS:
r = client.images.generate(model=m, prompt=prompt, size="1024x1024")
data = r.data[0]
name = m.split("/")[1]
if data.b64_json:
open(f"{name}.png", "wb").write(base64.b64decode(data.b64_json))
Production considerations
- Store results yourself. Save generated images to your own object storage; do not hotlink temporary URLs.
- Moderate inputs and outputs. Providers apply their own safety filters, and requests that violate them return an error. Handle these gracefully and review our Acceptable use policy.
- Check licences. Commercial-use terms differ by model, especially for models with published weights. Review the provider's terms before shipping.
- Control cost. Image pricing is per image and varies with size and quality. Generate small previews first and upscale only the images users choose.
- Run asynchronously. Generation can take several seconds. Use a background job and notify the user when the image is ready.
Running models yourself
If you need full control, Enterprise customers can request ComfyUI, Stable Diffusion WebUI or InvokeAI on dedicated GPUs from Portal → Managed tools, and load models with published weights such as FLUX.1 [schnell] or SDXL from the Hugging Face directory.