ARTICLE

OpenAI image Batch API (−50%, 24h) vs Flare: high-volume Bubble bulk through BIAIG

Same gpt-image-2.5-flare SKU supports sync (IPM-capped) and batch (~50% off, up to 24h). For catalog SKU grids: job sizing, Bubble URL handoff, and BIAIG routing so you do not pay twice.

Context

OpenAI’s Batch API runs async image work at roughly 50% lower cost than synchronous calls, on a separate rate-limit pool, with a fixed completion_window of 24 hours (often finishing sooner). Image batch jobs use /v1/images/generations or /v1/images/edits via JSONL: up to 50,000 lines, 200 MB, one model per file, and custom_id to join results back to your catalog.

GPT Image 2.5 Flare and Sunburst (2026-09-08): Flare is positioned for fast, high-volume everyday generation; Sunburst for edit precision. The Flare model page lists Batch (v1/batch) among supported endpoints—the fork is orchestration (batch vs sync), not a different model SKU. A closer look: Flare, Sunburst, and WaveSpeedAI: routing. A closer look: Flare, Sunburst, and WaveSpeedAI: routing.

Sync Flare throughput is capped by images per minute (IPM) by billing tier (model docs cite up to ~250 IPM at Tier 5). Large SKU grids with an acceptable 24h SLA belong on batch; same-day or interactive work belongs on sync.

When to use batch vs sync Flare

Criterion Batch (24h) Sync Flare
SLA Up to 24h; misses → batch_expired in error file Minutes, bounded by IPM tier
Cost ~50% vs sync (batch guide) Full model token rates
Volume JSONL limits (50k lines / 200 MB) IPM cap
Model mix One model per JSONL file Per request

When to use batch vs sync Flare

Use Sunburst in batch only when the grid needs edit fidelity on the first pass; otherwise batch Flare followed by a paid Sunburst re-gen is a common quality mismatch cost.

OpenAI does not publish a universal break-even grid size (images × resolution × quality vs tier IPM plus Bubble upload overhead)—model that for your tier and pipeline.

Bubble handoff: persist Bubble-native URLs

Image API examples center on b64_json. Bubble image/file fields store CDN URLs on Bubble storage. The Data API accepts either an external file URL or a base64 upload object (filename, contents, private, attach_to); community patterns document /fileupload for server-side ingestion—validate in staging; it is not first-party manual.

Typical bulk pipeline:

  1. Build JSONL with custom_id = stable SKU or catalog row id.
  2. Submit batch → read output file → decode b64 (or fetch bytes as returned).
  3. Upload to Bubble storage → obtain a durable URL.
  4. Write URL to the catalog record; tie job status to custom_id.

Do not treat transient external URLs as catalog truth without re-hosting.

BIAIG routing (editorial rules—no public BIAIG spec found)

At the gateway/router layer (BIAIG in your brief), the goal is one paid path per SKU grid unless policy explicitly allows re-runs.

Suggested rules:

  1. Lane lock: If deadline > 24h and line_count exceeds what sync can clear at your IPM tier → batch Flare only until complete or batch_expired; do not mirror the same custom_id on sync without idempotency.
  2. Sync escape hatch: Only for error-file or expired lines, with the same custom_id and a retry_reason flag; orchestrator checks whether a Bubble URL already exists for that SKU.
  3. Dedupe key: custom_id ↔ catalog SKU ↔ hash(prompt + model + size + quality)—block new jobs when the asset is already settled.
  4. Model lock: One JSONL, one model; mixing Flare and Sunburst in one batch file is invalid.
  5. Input sizing: Prefer image_url for reference images in JSONL, not embedded base64, to stay under the 200 MB cap.
  6. Provider lock: Do not run the same grid in parallel through third-party routers without shared dedupe—same double-pay risk as batch + sync duplication. Same topic: gpt-image-2 batch discount: unit economics. Same topic: gpt-image-2 batch discount: unit economics.

Operational checklist

  • Monitor batch status; parse the error file; retry by line, not blind whole-grid resubmit.
  • gpt-image-2 vs gpt-image-2.5-flare in batch: changelog tied explicit image batch discount to gpt-image-2; 2.5 Flare also lists Batch—decide product imagery on sampled SKUs, not slogans.
  • Low-tier IPM (e.g. ~5 IPM at Tier 1 in model docs) makes “line throughput” meaningless without tier context.

Operational checklist

Sources (primary)

OpenAI Batch guide and Create batch API; API changelog (2026-09-08, 2026-04, 2026-02); gpt-image-2.5-flare/sunburst model pages; image generation and pricing docs; Bubble API manual (files); Bubble files help guide. Worth reading next: GPT Image 2.5 at 250. Worth reading next: GPT Image 2.5 at 250.

← All articles