Request a callbackBook a call
← All posts

Self-Host AI Image Generation: Open Models, Brand LoRAs, GPU Costs and Break-Even (2026)

TL;DR
  • Image APIs charge $0.006 to $0.211 per 1024-pixel image in September 2026, with most production tiers between $0.02 and $0.067. At 200,000 images a month that is $4,000 to $13,400, the budget a self-hosted stack has to beat.
  • Qwen-Image-2512 (Apache 2.0) scores level with Imagen 4 Ultra on the Artificial Analysis arena, and Z-Image Turbo (Apache 2.0, 16 GB) beats Imagen 4 Standard. FLUX.2 [dev], Ideogram 4.0 and the new Qwen-Image-2.1 are open weights that need a paid licence or forbid commercial use.
  • Modelled with two always-on L40S GPUs and engineering time, self-hosting costs about $5,633 a month. It beats Imagen 4 above about 141,000 images a month, but BFL's own $0.014 FLUX.2 [klein] API only above about 402,000.
The six layers of a self-hosted image generation feature
1 · Product surface

Scene templates, a brand picker, four variants per request, edit and retry. A merchant should see on-brand options within seconds.

where the value is
2 · Gateway and result cache

Auth, quotas and a hash of model, LoRA, prompt, seed and size. An identical request returns the stored image without touching a GPU.

cache hit: no GPU time
3 · Prompt policy

A policy classifier on the text and a consent check on uploaded faces, before any GPU time is spent.

fails: abuse at scale
4 · Queue and GPU workers

Z-Image Turbo or Qwen-Image-2512 with the brand's LoRA, four variants per batch, weights resident in memory.

under 1 s an image on an H800 (vendor)
5 · Output safety and provenance

An image safety classifier on every output, an invisible watermark and a signed C2PA manifest.

EU marking duty from 2 Aug 2026
6 · Storage, delivery and ledger

WebP files in object storage behind signed CDN URLs, and one ledger row per image with seed, versions and cost.

R2 egress: $0
The GPU is one layer of six. The cache in layer two and the LoRA in layer four do more for the unit economics and the product than any model swap.

What does it cost to add AI image generation with an API?

A feature that puts a merchant's product into on-brand scenes pays $0.006 to $0.211 per 1024-pixel image. OpenAI's gpt-image-2 is $0.006 at low quality, $0.053 at medium and $0.211 at high; Google's Imagen 4 is $0.02 to $0.06 and Nano Banana 2 $0.067; FLUX.2 [pro] starts at $0.03; Ideogram 4.0 costs $0.03 to $0.10.

Start with the feature. The common version is an image generator inside a product people already use: a merchant uploads a packshot and gets it on a marble counter in morning light, in the brand's colours, four variants at a time; an interior-design app renders a client's room in three styles; a CRM turns a campaign brief into ad creatives. Take 2,000 merchants making 100 images each a month: 200,000 images. That is $13,400 a month on Nano Banana 2, $10,600 on gpt-image-2 at medium quality, $8,000 on Imagen 4, $6,000 on FLUX.2 [pro], $4,000 on Imagen 4 Fast and $2,800 on FLUX.2 [klein] 4B.

The per-image fee is only one reason teams look at their own model. The others are a style you own and a model nobody retires. A brand look coaxed out of a hosted model with prompts drifts every time the vendor ships a new version, and versions end: OpenAI shut DALL·E 2 and 3 on 12 May 2026 and retires gpt-image-1.5 and gpt-image-1-mini on 1 December 2026, per its deprecations page, and Google shuts Gemini 2.5 Flash Image on 2 October 2026. A LoRA trained on open weights you host keeps producing the same look until you decide otherwise.

As with every reference design on this site, the numbers are published list prices and benchmarks checked on 23 September 2026 and linked, or my own arithmetic with the inputs printed. I have not run this exact stack for a client, and where I estimate, I say so.

Provider and modelPrice per imageArtificial Analysis EloNotes
OpenAI GPT Image 2.5 (Sunburst, Flare)$0.006 low to $0.211 max1,196 (Sunburst, max)Same $30 per million image output tokens as gpt-image-2; five quality tiers
OpenAI gpt-image-2$0.006 / $0.053 / $0.2111,171 (high)Low, medium and high at 1024 by 1024
Google Nano Banana 2 (Gemini 3.1 Flash Image)$0.067 at 1K1,122$0.034 through the batch API
Google Nano Banana 2 Lite$0.0336 at 1K1,092Released June 2026
Google Nano Banana Pro$0.134 at 1K or 2K1,100$0.24 at 4K
Google Imagen 4 Ultra / Standard / Fast$0.06 / $0.04 / $0.02997 / 910 / 883Vertex AI list prices
Black Forest Labs FLUX.2 [pro]From $0.031,002Priced by megapixel
Black Forest Labs FLUX.2 [klein] 4BFrom $0.014864The same Apache 2.0 model you can self-host
Ideogram 4.0 Turbo / Default / Quality$0.03 / $0.06 / $0.101,004 to 1,011Weights are also published, non-commercial
What the APIs charge per image
$ per 1024-pixel image, September 2026 list priceslower is better
gpt-image-2, low quality$0.006
FLUX.2 [klein] 4B (BFL API)an Apache 2.0 model its maker also hosts$0.014
Imagen 4 Fast$0.02
FLUX.2 [pro]$0.03
Nano Banana 2 Lite$0.034
Imagen 4reference price in the break-even below$0.04
gpt-image-2, medium$0.053
Nano Banana 2$0.067
Ideogram 4.0 Quality$0.10
gpt-image-2, high$0.211
Sources: OpenAI's pricing page and image generation guide ($30 per million image output tokens; 196, 1,756 and 7,024 tokens for a low, medium and high 1024 by 1024 image), Google's Gemini API and Vertex AI pricing, Black Forest Labs' docs, and Ideogram's API prices as published on 22 June 2026. Arena scores are Artificial Analysis, 23 September 2026.

Which open-weights image models can you use commercially in 2026?

Six are free for commercial use under Apache 2.0 or MIT and worth shortlisting: Qwen-Image-2512, Z-Image Turbo, HiDream-O1-Image, ERNIE-Image Turbo, FLUX.2 [klein] 4B and FLUX.1 [schnell]. FLUX.2 [dev], FLUX.2 [klein] 9B, Ideogram 4.0 and Qwen-Image-2.1 are open weights that need a paid licence, or forbid commercial use outright.

The direction of travel is toward tighter licences, not looser ones. Qwen released Qwen-Image-2512 under Apache 2.0 in December 2025, then Qwen-Image-2.1 in September 2026 under a research-only licence that requires a separate commercial agreement. Ideogram published Ideogram 4.0's weights in June 2026 under a non-commercial licence and sells a self-serve commercial licence from $300 a month for 10,000 images. Black Forest Labs keeps FLUX.2 [dev] and FLUX.2 [klein] 9B non-commercial and sells weights licences whose Platform tier includes FLUX.2 [dev] and 100,000 images a month. Stable Diffusion 3.5 is free only while your organisation earns under $1 million a year.

On quality, the permissive models now sit in the middle of the API range. On the Artificial Analysis text-to-image arena, Qwen-Image-2512 scores 998, level with Imagen 4 Ultra at 997 and just under FLUX.2 [pro] at 1,002. Z-Image Turbo, at 6B parameters, scores 942 and beats Imagen 4 Standard (910) and Imagen 4 Fast (883). The ceiling is still closed: GPT Image 2.5 Sunburst leads at 1,196, gpt-image-2 at high quality scores 1,171 and Nano Banana 2 1,122. If the feature lives on dense typography or photoreal people at the very top of the range, expect an open model to lose side-by-side tests.

For a product feature, three picks cover most needs. Z-Image Turbo for volume: 6B parameters, 8 function evaluations, fits in 16 GB, and its maker claims sub-second generation on an H800. Qwen-Image-2512 for quality and text rendering at 20B, where the cost per image rises steeply, as the next section shows. [FLUX.2 [klein] 4B](https://huggingface.co/black-forest-labs/FLUX.2-klein-4B) for interactive editing in 13 GB, with one caveat that matters for the break-even: Black Forest Labs also sells it through its API from $0.014 an image. If one of the three disappoints on your prompts, HiDream-O1-Image (MIT, 8B, up to 2,048 by 2,048) and ERNIE-Image Turbo (Apache 2.0, 8 steps, 24 GB) are the next two to test.

ModelReleasedSizeLicenceCommercial usePublished VRAMArena Elo
Ideogram 4.0Jun 20269.3BIdeogram 4 Non-CommercialPaid: from $300 a month for 10,000 imagesFP8 and NF4 builds published1,011 (Quality)
FLUX.2 [dev]Nov 202532BFLUX Non-CommercialPaid BFL licence, price on requestOver 80 GB in bf16; about 20 GB in 4-bit1,000
Qwen-Image-2512Dec 202520BApache 2.0YesAbout 40 GB of bf16 weights (2 bytes per parameter)998
HiDream-O1-ImageMay 20268BMITYesNot published979
HunyuanImage 3.0Sep 202580B MoE, 13B activeTencent Hunyuan CommunityNot in the EU, UK or South KoreaFour GPUs in the default setup944
Z-Image TurboNov 20256BApache 2.0Yes16 GB942
FLUX.2 [klein] 9BJan 20269BFLUX Non-CommercialPaid BFL licenceNot published940
ERNIE-Image TurboApr 20268BApache 2.0Yes24 GB923
FLUX.2 [klein] 4BJan 20264BApache 2.0Yes13 GB864
Stable Diffusion 3.5 LargeOct 20248BStability AI CommunityFree under $1M annual revenueNot published839
FLUX.1 [schnell]Aug 202412BApache 2.0YesNot published804
Qwen-Image-2.1Sep 20267B generatorQwen ResearchNo: research and evaluation onlyNot publishedNot ranked

How many images per minute does one GPU produce?

On one H100 at 1024 by 1024 pixels: about 130 a minute for FLUX.1 [schnell] at 4 steps and 21 for FLUX.1 [dev] at 28 steps, both after PyTorch's compile and FP8 optimisations. Z-Image Turbo's sub-second claim implies 60 or more. A 20B model at 50 guided steps manages one or two.

The two estimates in the table need their working shown. Qwen-Image-2512 has 20 billion parameters against FLUX.1 [dev]'s 12 billion, and with true classifier-free guidance it runs two transformer passes per step: 100 passes at 50 steps against FLUX.1 [dev]'s 28. Scaling the measured 7.3 seconds by 20/12 and by 100/28 gives about 43 seconds an image. The Lightning LoRA from the LightX2V team cuts that to 8 unguided passes, which scales to about 3.5 seconds. Both ignore the text encoder and the VAE, so measure before you plan capacity.

Step count dominates here too, as it does for video. The PyTorch and Hugging Face optimisations (torch.compile, fused projections, FlashAttention 3 and dynamic FP8) cut FLUX.1 [dev] from 7.3 to 2.9 seconds on an H100, a 2.5-fold gain. Moving from a 28-step model to a 4-step one gives more than that without touching the stack. For a product the practical order is: pick a few-step model, then compile, then quantise, then batch.

Batching matters more for images than for video, because the product usually wants four variants and one forward pass can produce all four. Measure throughput at batch 4 on your card, not batch 1. And size for the peak: 200,000 images a month averages under five images a minute, but the requests arrive in office hours, in bursts, from people watching a spinner. If the busiest hour runs at four times the average, that is about 19 images a minute: comfortable for one H100 on a few-step model, and about 13 H100s for Qwen-Image-2512 at 50 guided steps on my estimate above. That second number is the real argument for distilled models.

Model and settingsGPUSeconds per imageImages per minuteSource
FLUX.1 [schnell], 4 steps, bf16H1001.13253PyTorch and Hugging Face
FLUX.1 [schnell], 4 steps, compiled with FP8H1000.463130PyTorch and Hugging Face
FLUX.1 [dev], 28 steps, bf16H1007.3008PyTorch and Hugging Face
FLUX.1 [dev], 28 steps, compiled with FP8H1002.88721PyTorch and Hugging Face
Z-Image Turbo, 8 function evaluationsH800Under 160 or moreTongyi-MAI (vendor claim)
FLUX.2 [klein] 4B, bf16GB200Under 0.5120 or moreBlack Forest Labs (vendor claim)
Qwen-Image-2512, 50 steps with CFGH100About 43About 1.4My estimate, scaled from FLUX.1 [dev]
Qwen-Image-2512, 8-step Lightning LoRAH100About 3.5About 17My estimate, scaled from FLUX.1 [dev]

How do you teach an open image model your brand style?

Train a LoRA, a small adapter on top of the base model, on 9 to 50 curated images of the style. Hosted trainers price it per step: $2 per 1,000 steps for Qwen-Image on fal, $2.26 for Z-Image Turbo and $6.40 for FLUX.2. The real cost is a designer's curation time and a fixed prompt set to judge checkpoints.

The data is the work. For a style, my rule of thumb is 20 to 50 images that share the look but vary the subject, so the adapter learns palette, lighting and composition rather than one product; fal suggests 9 to 50 for its FLUX.2 trainer. For a single subject, such as one product or a mascot, far fewer will do: [Modal's FLUX.1 [dev] example](https://modal.com/docs/examples/diffusers_lora_finetune) fine-tunes on 3 to 10 photos, 500 steps on one A100 80GB inside a 30-minute limit. Caption every image, add a trigger word for the style, and remove anything you do not hold the rights to.

Evaluation decides whether a LoRA ships. Fix a grid before training: 50 prompts covering the scenes your users actually request, 4 seeds each, rendered at every saved checkpoint. Have the brand owner score the grid blind against the base model, pick the checkpoint, and version it with the hash of the base model it was trained on. A LoRA trained on one base checkpoint is not guaranteed to transfer to the next, so a base-model upgrade means retraining every brand.

Serving many brands is cheaper than it sounds. Keep one base model resident and load each customer's adapter per request; diffusers can load and switch LoRA adapters on a live pipeline, and the ledger records which adapter produced which image. Watch the licence here as well: a LoRA trained on FLUX.2 [dev] inherits its non-commercial terms, which is why BFL's paid tiers spell out fine-tuning rights. If you would rather not host at all, BFL bills fine-tuned FLUX.2 [klein] 9B endpoints at the base rate, from $0.015 an image, during its public beta.

One brand LoRA, from folder to production
  1. Day 1
    Curate and caption

    20 to 50 images with rights cleared, varied subjects, one trigger word. A designer's day, not an engineer's.

  2. Day 2
    Train

    1,000 to 3,000 steps with checkpoints saved every few hundred. $2 to $19 on fal, depending on base model and step count.

  3. Day 3
    Judge the grid

    50 prompts, 4 seeds, every checkpoint, scored blind by the brand owner against the base model.

  4. Week 2
    Ship behind a flag

    Version the adapter with its base-model hash, route a slice of traffic, and watch retry and download rates.

About three days of work per brand, most of it human judgement. The GPU bill for training is the smallest line on the page.

What does the serving architecture for self-hosted image generation look like?

A gateway that checks a result cache first, a prompt policy step, a queue, GPU workers that batch four variants and swap in the brand's LoRA, then output moderation, watermarking and C2PA signing, object storage behind a CDN, and a ledger row per image. With a few-step model, the target is a few seconds end to end.

The cache is the cheapest GPU you will ever buy. Key it on a hash of model version, LoRA version, prompt, negative prompt, seed, size and step count. An identical request, whether a retry, a double-click or a template everyone opens with the same default prompt, returns the stored file without GPU time, and changing any part of the key invalidates the entry by construction. Expect a low hit rate on free-text prompts and a high one on template-driven features, and measure it per template before you count it in capacity planning. The same idea applied to LLM calls is in LLM routing and caching.

Run two paths. Interactive requests hold the connection for a few seconds and return four images; bulk jobs, such as a catalogue of 5,000 products or a campaign in 40 sizes, go through the queue at lower priority and report by webhook. Workers keep the base model resident, batch to four, and pin versions: checkpoint hash, LoRA hash, sampler, steps and seed. Use plain diffusers for text-to-image with a LoRA, and reach for ComfyUI when designers own multi-stage graphs such as ControlNet, inpainting and upscaling chains.

Storage is a rounding error if you choose it well. At an assumed 300 KB per 1024-pixel WebP, 200,000 images is 60 GB a month, or $0.90 of new storage on Cloudflare R2 at $0.015 per GB-month, with no egress fees. Serve through signed URLs, keep drafts on a short lifecycle, and write one ledger row per image with prompt, seed, versions, cost and moderation verdicts. That row is what you search when a takedown request arrives with a 48-hour clock.

The serving stack
Architecture of a self-hosted image generation feature. Your app sends a generate request to API gateway, which looks up a hash in Result cache; a hit returns the stored image URL straight to Your app. On a miss the request passes Prompt policy, enters Job queue and reaches GPU workers as a batch of four, with the brand adapter loaded from LoRA registry. GPU workers write seed and cost to Image ledger and send four images to Output check; passing images go to C2PA signer, then as signed WebP files to Storage and CDN, which returns signed URLs to Your app and stores the cache key. Application steps are violet; data and infrastructure are teal.
The cache sits in front of everything, so repeated requests never reach the GPU.
The request path
One request for four on-brand imagesAppGatewayCachePolicyQueueWorkerSafety + C2PAStorage
generate: prompt, brand id, 4 variants
lookup hash(model, LoRA, prompt, seed, size)
miss
policy check on prompt and any upload
approved, interactive lane
batch of 4 with the brand LoRA
base model resident
4 images, seed and versions recorded
classify, watermark, sign C2PA
blocked images are deleted
4 signed WebP files
store key for the next identical request
4 signed URLs
Ten messages, one of which uses a GPU. For repeated template prompts the cache answers and the GPU never wakes up.

Is self-hosting image generation cheaper than an API, and where is the break-even?

Only with volume. Two always-on L40S GPUs plus engineering time come to about $5,633 a month in my model, so self-hosting overtakes Nano Banana 2 at about 84,000 images a month and Imagen 4 at about 141,000, but BFL's own $0.014 FLUX.2 [klein] API only above about 402,000.

The floor, itemised. Two L40S cards on RunPod at $1.09 an hour, always on so a crash or a deploy does not take the feature down: $1,591 a month. Three engineer-days a month of upkeep at $1,000 a day (a $250,000 fully loaded salary over 250 working days): $3,000. A five-week build at the same rate, $25,000, amortised over 24 months: $1,042. Total $5,633. Storage and CDN add about a dollar at this volume. If you want H100s for headroom instead, two on RunPod at $3.49 an hour raise the GPU line to $5,095 and the floor to about $9,137. Change the day rate and everything scales with it.

Capacity is not the constraint. An L40S has about 37% of an H100's dense BF16 throughput (362 against about 990 teraFLOPS on NVIDIA's spec sheets), so if Z-Image Turbo takes about a second on an H100-class card, I assume about 3 seconds on an L40S. That is an estimate, not a benchmark. At 3 seconds and 40% utilisation, two cards produce about 700,000 images a month, which covers every volume in the table. The marginal GPU cost is about $0.0009 an image at full load and $0.0023 at 40%, which is why the fixed floor decides the answer.

Then divide the floor by the API price. At the 200,000-image example, self-hosting saves money against Imagen 4 and every tier above it, roughly breaks even with FLUX.2 [pro], and loses to Imagen 4 Fast, to gpt-image-2 at low quality and to FLUX.2 [klein] 4B on BFL's API. That last row is the uncomfortable one: when the maker of an Apache 2.0 model sells it at $0.014 an image, self-hosting the same model needs about 400,000 images a month to pay, and at lower GPU utilisation the case only gets weaker. Run your own inputs through the AI product cost estimator.

API and tierPrice per imageBreak-even images a monthAPI bill at 200,000 imagesSelf-hosted at 200,000
gpt-image-2, high$0.21126,700$42,200$5,633
Nano Banana 2$0.06784,100$13,400$5,633
gpt-image-2, medium$0.053106,300$10,600$5,633
Imagen 4$0.04140,800$8,000$5,633
FLUX.2 [pro]$0.03187,800$6,000$5,633
Imagen 4 Fast$0.02281,700$4,000$5,633
FLUX.2 [klein] 4B, BFL API$0.014402,400$2,800$5,633
gpt-image-2, low$0.006938,800$1,200$5,633
Self-hosted floor against three API prices
45,02433,76822,51211,256025k50k100k200k400k600kMonthly cost ($)Images generated per month
Imagen 4 at ~141k; FLUX.2 [klein] API at ~402k
Nano Banana 2, $0.067 an imageImagen 4, $0.04 an imageFLUX.2 [klein] 4B API, $0.014 an imageSelf-hosted: 2x L40S plus people
The self-hosted line stays flat up to roughly 700,000 images a month on my L40S estimate. Quality is not equal across these lines: Z-Image Turbo scores above Imagen 4 Standard and Fast on the arena, but below Nano Banana 2, so compare against the API you would really use.
The four numbers for the business case
$5,633
modelled monthly floor: two L40S GPUs, upkeep and an amortised five-week build
~141,000
images a month to break even against Imagen 4 at $0.04
~402,000
images a month to break even against BFL's FLUX.2 [klein] 4B API at $0.014
~700,000
images a month two L40S cards can serve at 40% utilisation (estimate)
Every figure is modelled from the inputs printed in this section. The engineer-day rate is the input most worth replacing with your own.

Screen prompts and uploads before generation, classify every output, embed an invisible watermark and sign a C2PA manifest with the trainedAlgorithmicMedia source type. EU AI Act Article 50(2) has required machine-readable marking since 2 August 2026, and the TAKE IT DOWN Act requires reported intimate deepfakes to come down within 48 hours.

Before the GPU, run a policy model on the prompt. gpt-oss-safeguard-20b is Apache 2.0, needs 16 GB and classifies against a policy you write, so brand rules such as no competitor logos, no real people or no alcohol for a family brand become enforceable alongside the generic categories. Detect faces in uploaded images and route real people through a consent step, because edited photos of real people are how an image feature ends up producing non-consensual imagery. After the GPU, run every image through a classifier such as ShieldGemma 2, a 4B model covering sexually explicit, dangerous and violent content.

Some duties are absolute. US providers must report apparent child sexual abuse material to NCMEC's CyberTipline under 18 U.S.C. 2258A; treat generated imagery the same way. The TAKE IT DOWN Act, Public Law 119-12, requires covered platforms to remove reported non-consensual intimate images, AI-generated ones included, within 48 hours, with FTC enforcement from 19 May 2026. Build the takedown path, the ledger search and the reporting flow before launch; they are cheap to build and impossible to improvise.

Then label. Article 50(2) of the EU AI Act requires providers of systems that generate images to mark outputs in a machine-readable, detectable way from 2 August 2026, and California's AI Transparency Act, as amended by AB 853, applies from the same date to generative systems with over 1,000,000 monthly users, at $5,000 per violation with each day counted separately. In practice, sign a C2PA manifest with c2pa-rs, which supports JPEG, PNG and WebP, and add an invisible watermark such as Adobe's open-source TrustMark, which ships an example of declaring the watermark inside a C2PA manifest. The wider threat model is covered under LLM security.

Six controls, five of them for v1
Before the first customer image
  • Policy model on every prompt, with your own written policyGeneric categories miss brand rules; a custom policy catches both.
  • Face detection and consent routing on uploadsEdited photos of real people are the route to non-consensual imagery.
  • Safety classifier on every output imageBlocked images are deleted, not stored, and the ledger records why.
  • C2PA manifest plus invisible watermark on every filetrainedAlgorithmicMedia source type; the watermark survives the screenshot that strips metadata.
  • 48-hour takedown path and CyberTipline reporting flowLegal duties with clocks attached. Build them before launch, not after the first report.
  • Per-brand allow and block lists on promptsUseful in month two, once you can see what customers actually ask for.
None of the six needs a GPU. They are the difference between an image feature you can defend and one you have to switch off after the first incident.

When should you not self-host image generation?

When you generate fewer than about 100,000 images a month, when you need the very top of the quality range, or when the model you would host is sold by its maker at $0.014 an image. Then use the API, keep prompts and style references portable, and revisit when volume or a data rule changes the arithmetic.

Hosted fine-tuning closes much of the gap that used to justify self-hosting. BFL bills fine-tuned FLUX.2 [klein] 9B endpoints at the base rate during its public beta, and fal trains Z-Image Turbo LoRAs for $2.26 per 1,000 steps. If a brand look is the only reason you wanted your own model, try one of those first: you will learn whether a LoRA captures the style for tens of dollars instead of a five-week build. A hybrid is often the right second step: self-host the high-volume, low-stakes path such as drafts and thumbnails, and send the final hero image to the best closed model.

Self-host when one of three things is true: the images or the uploads cannot leave your network (medical, legal, unreleased products), your volume is well past the break-even for the API tier you would otherwise use, or you need a pipeline no API offers, such as per-tenant LoRAs chained with ControlNet, inpainting and upscaling under your own policy. The same arithmetic applies to any AI feature in an existing product: price the floor, not the marginal cost.

If you decide to build it, Axionry builds this kind of feature at $0: the work is split into checkpoints with acceptance criteria agreed before work starts, and each one is invoiced only after you have seen it and accepted it. Private model hosting sits under private LLM infrastructure.

Build or buy, by situation
Should you self-host image generation?
Under ~100,000 images a month and no data restriction
Use an API

Imagen 4, FLUX.2 [pro] or Nano Banana 2 costs less than a $5,633 monthly floor at that volume.

The model you want is FLUX.2 [klein] 4B
Use BFL's API below ~400,000 images

Its maker sells it from $0.014 an image; self-hosting the same weights pays only at high volume.

Uploads or outputs cannot leave your network
Self-host Z-Image Turbo or Qwen-Image-2512

Apache 2.0, no per-image fee, and arena scores level with Imagen 4 Ultra (Qwen-Image-2512) or above Imagen 4 Standard (Z-Image Turbo).

Hundreds of brands, each with its own LoRA
Self-host with adapter hot-swap

One resident base model serves every brand, and the ledger records which adapter made which image.

You need FLUX.2 [dev] or Ideogram 4.0 weights
Buy the commercial licence first

Both are non-commercial as downloaded; Ideogram's self-serve licence starts at $300 a month.

Two branches end at an API. The strongest reasons to self-host are data control and many-brand customisation, not the per-image fee.

Self-hosting AI image generation: common questions

→How much does it cost to self-host an image generation model?

In my model, about $5,633 a month before the first image: two L40S GPUs on RunPod at $1,591, three engineer-days of upkeep at $3,000 and a five-week build amortised at $1,042. The GPU cost per image on top of that floor is a fraction of a cent for a few-step model such as Z-Image Turbo, so volume, not the per-image cost, decides whether it pays.

→Which open-source image model can I use commercially in 2026?

Qwen-Image-2512, Z-Image Turbo, ERNIE-Image Turbo, FLUX.2 [klein] 4B and FLUX.1 [schnell] are Apache 2.0, and HiDream-O1-Image is MIT. Qwen-Image-2512 scores 998 on the Artificial Analysis arena, level with Imagen 4 Ultra. FLUX.2 [dev], FLUX.2 [klein] 9B, Ideogram 4.0 and Qwen-Image-2.1 need a paid licence or forbid commercial use.

→Can I use FLUX.2 [dev] in a commercial product?

Not under the licence it ships with. FLUX.2 [dev] is released under Black Forest Labs' non-commercial licence, and BFL does not offer it on its hosted API. Commercial use needs a paid weights licence; BFL's Platform tier includes FLUX.2 [dev], FLUX.2 [klein] Base 9B, fine-tuning rights and 100,000 images a month, with pricing through sales.

→How many images do I need to train a brand-style LoRA?

For a style, 20 to 50 curated images that share the look but vary the subject is a sound starting point, and fal recommends 9 to 50 for its FLUX.2 trainer. A single product or character needs fewer: Modal's example uses 3 to 10. Training costs $2 to $6.40 per 1,000 steps on fal; curation and evaluation take far longer than the training run.

→Do AI-generated images need a watermark or C2PA label?

In the EU, providers must mark AI-generated images in a machine-readable, detectable way under AI Act Article 50(2) from 2 August 2026. California's AI Transparency Act requires latent disclosures from generative systems with over 1,000,000 monthly users from the same date. A signed C2PA manifest with the trainedAlgorithmicMedia source type plus an invisible watermark covers both.

→What GPU do I need to self-host image generation?

For a few-step 4B to 8B model such as FLUX.2 [klein] 4B (13 GB) or Z-Image Turbo (16 GB), a 24 GB or 48 GB card is enough, and an L40S rents for $1.09 an hour on RunPod. FLUX.2 [dev] needs over 80 GB in bf16 or about 20 GB in 4-bit, and a 20B model like Qwen-Image-2512 is happiest on an 80 GB H100.

Take this into your own chat

Open the article in your assistant with one click and ask it how this applies to your product.

Ready to talk numbers?

Twenty minutes, straight to the engineer. No sales rep, no deck.