FLUX 3 Image and Vercel AI Gateway: a dev-friendly batch backend for Bubble bulk catalogs via BIAIG
After the FLUX 3 launch promo (~Oct 8), the story I care about is the integration pattern: my Bubble orchestrator owns layout-box and multi-ref routing; Vercel AI Gateway holds credentials and the REST leg—native Gateway batch does not cover images, so bulk means Schedule API Workflow on a list.
Context after the promo window
Black Forest Labs shipped FLUX 3 Image on 2026-10-01: a single async endpoint (POST https://api.bfl.ai/v1/flux-3-image), poll via polling_url, then fetch result.sample (signed URLs expire in about an hour). The documented launch 50% discount ended around 2026-10-08 (~15:00 UTC); list pricing applies afterward (e.g. 1k ≈ $0.048/image in BFL release notes—4k is far higher).
On 2026-10-08, Vercel added bfl/flux-3-image to AI Gateway: one AI_GATEWAY_API_KEY, no separate BFL account. For Bubble I wire the OpenAI-compatible POST https://ai-gateway.vercel.sh/v1/images/generations (Bearer auth, b64_json) through the API Connector on backend workflows.
Gateway batch processing (beta, async, discounted on many text models) explicitly excludes type: 'image'. I still call this setup a “dev-friendly batch backend” because it gives managed auth, billing, and REST to FLUX—but Vercel does not run my catalog parallelization. Bulk is app-level in Bubble.
What “BIAIG” means in this article
Public docs do not define BIAIG; I use it as editorial shorthand for BulkImagen + AI Gateway in a multi-leg bulk stack (digest context: e.g. Batch Banana, then FLUX as a second leg). I verify catalogs before production: BulkImagen’s published API listed flux-2-pro, not flux-3-image, when the Scout packet was assembled—route FLUX 3 through Gateway until the vendor catalog catches up. A closer look: Batch Banana FLUX 3 Image.
Responsibility split (integration pattern)
| Layer | Owner | Job |
|---|---|---|
| Connector | API Connector | Headers, Gateway key, optional BulkImagen key—server-side only (BulkImagen: no browser/CORS). |
| Orchestrator | Backend / API workflow | Catalog rows, consistency controls, bounding-box JSON embedded in prompt, multi-ref (up to 10 images), leg-1 vs leg-2 routing. |
| Inference leg | Gateway → BFL | Text-to-image and edit in one call; resolutions 768sq–4k; optional grounding (default on). |
| Bulk mechanics | Bubble | Schedule API Workflow on a list, with intervals to reduce 429s—your fan-out, not Gateway image batch. |
Layout-box and multi-ref stay in the orchestrator. BFL appends box JSON to the prompt string (no separate box parameter). Multi-ref supports up to ten images; placement boxes are strong hints, not guaranteed clips—set catalog QA expectations accordingly.
A practical bulk-catalog flow
- Leg 1 (optional): BulkImagen
POST /v1/batches+ poll for drafts or ref chains where their model catalog fits. - Leg 2 (FLUX 3): For rows needing edit + layout, the orchestrator builds the long prompt (bbox rows per BFL docs) and refs (URLs on BFL; Gateway AI SDK examples use
prompt.images—confirm whether the OpenAI-compatible Connector path covers your multi-ref/bbox payloads; this remains an open question in the research packet). - Call Gateway, receive
b64_jsonor upstream URLs, then persist immediately to your storage/CDN. - 429 / 402: Free Gateway tiers carry lower per-model caps; paid tiers remove Gateway-side caps but upstream BFL limits remain. Spend budgets can return 402—use alongside backoff.
API Connector vs editor logic
I define one named call to images/generations; I keep complex JSON (bbox arrays, ref URL lists) in orchestrator state (Things, JSON fields), not scattered frontend logic.
| Name | What it is for | What it is not for |
|---|---|---|
| API Connector (one named call) | Calling images/generations |
Complex JSON (bbox arrays, ref URL lists) |
| Orchestrator state (Things, JSON fields) | Complex JSON such as bbox arrays and ref URL lists | |
| Scattered frontend editor logic | Complex JSON (bbox arrays, ref URL lists) |
Consistency across providers
Multi-leg stacks split billing and ref semantics. I centralize in the orchestrator: one prompt template version, pinned model id (bfl/flux-3-image), a resolution policy (mass 1k vs hero 4k—post-promo cost drift is real), and explicit leg1 output → leg2 ref chains.
Risks (short)
- Calling Gateway a native “image batch API” overstates the product.
- Aggressive parallel schedules trigger 429 from Gateway (free) or BFL—use intervals.
- Gateway’s flat $0.024/image listing may not match BFL resolution tiers—budget on actual tiers.
- Product imagery may touch provider retention policies—check compliance needs.
Takeaway
After Oct 8, I write about the pattern, not another launch promo: as a Bubble founder I do not build a GPU layer—I build a catalog orchestrator, use Vercel AI Gateway as the FLUX 3 leg (keys, REST, limits), and BulkImagen where its batch catalog still fits. Image bulk is Bubble parallel backend workflows + async polling, not Gateway’s native batch API. Worth reading next: After 8 Oct: FLUX 3.
Sources (Scout packet): docs.bfl.ml (FLUX 3 overview, bounding boxes, multi-ref, release notes); vercel.com (Oct 8 changelog, batch docs excluding images, OpenAI image REST, rate limits); manual.bubble.io (API Connector, schedule on a list); bulkimagen.com/docs/api. A closer look: FLUX 3 Image 50% off.