Video Generation API is now live!
GPT Image 2Image API

GPT Image 2 APIfor developers.

Generate high-fidelity images, product shots, UI mockups, and typography-heavy assets with fal.ai's GPT Image 2 endpoints.One model family for text-to-image, edit flows, mask support, and production-ready queue handling.

see more

Modes

Generate, edit, masked edit

Text-to-image plus image-to-image editing through the companion edit endpoint

Resolution

Preset sizes up to 4K

Custom dimensions supported, with both edges in multiples of 16

Quality

Low, medium, high

Use low for iteration and high for final photoreal or text-heavy assets

Output

JPEG, PNG, WebP

Choose the format that fits your delivery, preview, or asset pipeline

Reference inputs

URL-based image editing

Edit mode accepts source image URLs and optional masks for targeted changes

Pricing

From roughly $0.01 / image

fal.ai publishes pricing by size and quality level, with larger 4K-class renders priced higher

Available Endpoints

Start building with the GPT Image 2 API

Multiple endpoints for text-to-video, image-to-video, fast preview flows, and async job retrieval. This section is laid out more like a product catalog than raw docs so users can scan what to use first.

NewGenerate

Endpoint

Text-to-Image

fal-ai/gpt-image-2

Core endpointText-to-imageTypographyPhotoreal

Generate a new image from a prompt with explicit size, quality, format, and image count settings.

Best for: Best for net-new visuals, infographics, product shots, UI mockups, posters, and marketing creative.

NewEdit

Endpoint

Image Edit

openai/gpt-image-2/edit

Image-to-imageMask supportEdit modeReference images

Edit one or more source images with change-preserve instructions, optional masks, and auto or custom output sizing.

Best for: Use this for relighting, object replacement, cleanup, packaging revisions, background changes, or virtual try-on style workflows.

New

Endpoint

Queue Status

https://queue.fal.run/{model_id}/requests/{request_id}/status

Queue APIStatus pollingAsync workflow

Check whether a request is in queue, in progress, or completed, with optional logs in queue-based workflows.

Best for: Needed when you submit requests asynchronously and want to reflect progress in your backend or product UI.

New

Endpoint

Fetch Result

https://queue.fal.run/{model_id}/requests/{request_id}

Result retrievalRequest lifecycleProduction flow

Retrieve the finished output payload once the generation or edit request has completed.

Best for: Use this after status polling or webhook confirmation to read the final image URLs and usage metadata.

Get started today

Ready to integrate GPT Image 2?

Try the API directly in the console, or reach out to the team for onboarding, pricing, and enterprise setup.

API Documentation

How to get access to GPT Image 2 API

The official fal.ai client supports both direct subscribe-style workflows and queue-aware production patterns. Start with generation, then add edit mode and explicit polling when you need more control.

Selected endpoint

fal-ai/gpt-image-2

Use the text-to-image endpoint for first-pass generation, then switch to the edit endpoint when your workflow needs preserve/change instructions or mask-based updates.

Best for net-new visuals, infographics, product shots, UI mockups, posters, and marketing creative.

import { fal } from "@fal-ai/client";

fal.config({
  credentials: process.env.FAL_KEY
});

const result = await fal.subscribe("fal-ai/gpt-image-2", {
  input: {
    prompt: "A premium bottled matcha drink ad with clean typography, mint green palette, condensation on the bottle, soft studio reflections, and a headline that reads 'ENERGY THAT FEELS CLEAN'",
    image_size: "landscape_4_3",
    quality: "high",
    num_images: 1,
    output_format: "png"
  },
  logs: true,
  onQueueUpdate(update) {
    if (update.status === "IN_PROGRESS") {
      update.logs?.forEach((log) => console.log(log.message));
    }
  }
});

console.log(result.data.images[0].url);

Async flow

  1. 1

    Choose the generation or edit endpoint based on whether you are creating from scratch or modifying an existing image.

  2. 2

    Submit the request with prompt, size, quality, and output format settings, then store the returned request id if you are using the queue API.

  3. 3

    Poll the status endpoint or rely on the client subscribe helper until the request reaches COMPLETED.

  4. 4

    Read the final output URLs and usage metadata, then pass the finished assets into your own review, storage, or publishing workflow.

What Makes It Different

What makes the GPT Image 2 API different

This section is laid out to read more like a product narrative than a feature list. Each row shows a capability, why it matters, and what that looks like in a real workflow.

Preview

Pixel-perfect typography

That makes it more useful for infographics, packaging mockups, landing page banners, UI screenshots, posters, and ad creative where readable text matters.

Capability

Pixel-perfect typography

GPT Image 2 is unusually strong at dense text, small labels, and text-forward layouts compared with typical image generation models.

That makes it more useful for infographics, packaging mockups, landing page banners, UI screenshots, posters, and ad creative where readable text matters.

Example scenario

A product marketing team generates launch visuals with exact headline copy, pricing callouts, and feature bullets that remain legible in the first pass.

Capability

Photoreal image quality

The model is positioned by fal.ai as a quality-first image model with strong realism, material rendering, and lighting fidelity.

Developers can use it for customer-facing product imagery, campaign stills, editorial scenes, or polished concept visuals without defaulting to stylized output.

Example scenario

An ecommerce workflow produces higher-fidelity product hero shots for PDP experiments without scheduling a fresh studio shoot.

Preview

Photoreal image quality

Developers can use it for customer-facing product imagery, campaign stills, editorial scenes, or polished concept visuals without defaulting to stylized output.

Preview

Editing and mask support

This is especially useful for background swaps, cleanup, product variation tests, ad localization, and iterative asset refinement.

Capability

Editing and mask support

The edit endpoint supports image URLs, optional masks, and preserve/change instructions for finer-grained revisions.

This is especially useful for background swaps, cleanup, product variation tests, ad localization, and iterative asset refinement.

Example scenario

A design ops tool lets a team preserve a bottle label while changing only the background, lighting mood, and prop styling.

Capability

Flexible production sizing

fal.ai documents preset image sizes plus custom dimensions up to 4K-class outputs, with width/height rules for production-safe rendering.

Teams can use one model family across square catalog assets, portrait ads, landscape landing pages, and larger campaign exports.

Example scenario

A growth team generates portrait social ads, square app store artwork, and landscape hero banners from one shared prompt system.

Preview

Flexible production sizing

Teams can use one model family across square catalog assets, portrait ads, landscape landing pages, and larger campaign exports.

Unified API Platform

Two API tiers for different use cases

Pick the right balance of quality, speed, and cost for your workflow. The section stays data-driven, but the presentation is closer to a clean product comparison table.

Feature
Low
MediumRecommended
High
Best forFast prompt iteration and idea findingBalanced quality and costBest photorealism and typography
SpeedFastestModerateSlowest
QualityBest for rough creative loopsGood for many product-facing assetsHighest fidelity
CostLowestMid-tierHighest
Recommended usePrompt tuning, early mockups, and workflows where you plan to rerender the winnersEditorial images, marketing drafts, and regular production use when you want better fidelity without the highest costFinal campaign exports, text-heavy layouts, premium product stills, and assets where details must hold up under review
API endpointsfal-ai/gpt-image-2, openai/gpt-image-2/editfal-ai/gpt-image-2, openai/gpt-image-2/editfal-ai/gpt-image-2, openai/gpt-image-2/edit

Use Cases

Industries using the GPT Image 2 API

This section keeps the same reusable data model, but the presentation is closer to a grid of industry cards instead of long narrative boxes.

Content teams, publishers, and marketing designers

Infographics and educational visuals

Generate diagrams, explainers, posters, and information-dense layouts with readable text and deliberate hierarchy.

GPT Image 2 is a better fit than many image models when text is part of the artifact instead of an afterthought.

Merchandising teams and product marketers

Ecommerce product photography

Produce clean packshots, styled product scenes, and label-accurate launch visuals for catalog and campaign workflows.

The model is positioned for photoreal quality and brand-consistent product imagery, which matters for commercial assets.

Design systems teams and product designers

UI mockups and design comps

Create interface mockups, dashboard concepts, and marketing screenshots with clearer layout and text behavior.

Readable buttons, chips, headings, and interface labels make the model much more usable for product-oriented design ideation.

Creative ops teams and asset production pipelines

Image editing and cleanup workflows

Update backgrounds, remove clutter, localize copy, preserve products, or change only selected regions with masks.

The edit endpoint gives you preserve/change control instead of forcing every asset through a full regeneration pass.

Paid media teams and performance marketers

Ad creative and localization

Generate variant campaigns with exact headlines, offer text, and different aspect ratios for channels and regions.

Text rendering plus flexible sizing reduces the number of manual resize and redesign steps after generation.

Brand teams, agencies, and packaging designers

Brand packaging and label visualization

Prototype product labels, bottle art, box fronts, and shelf-ready concepts with readable brand and ingredient text.

This is one of the clearest cases where typography quality and photoreal rendering need to work together in one output.

Examples

GPT Image 2 API examples

This section supports future video or image previews, but it also renders cleanly from prompt-only data. That keeps the template reusable even when a page launches before media assets are ready.

Demo

Scientific infographic

Text-heavy generation

Use a structured prompt when you need diagrams, labels, and compact copy to survive the first render without broken typography.

A scientific infographic explaining battery chemistry with labeled cell layers, molecular callouts, clean arrows, white background, precise hierarchy, readable small text, and a polished editorial style.

infographictext renderingeditorial
Demo

UI homepage mockup

UI generation

A strong fit for interface mockups when buttons, navigation labels, and repeated text elements need to look coherent.

A pixel-perfect video platform homepage mockup with left sidebar, top navigation, category chips, thumbnail grid, realistic labels, and clean spacing throughout the interface.

uimockuplayout
Demo

Brand product shot

Product photography

Good for premium ecommerce or launch creative where the packaging text and material finish both matter.

A premium product photo of a black perfume bottle on wet stone with silver label text, subtle mist, realistic reflections, controlled studio lighting, and a luxury campaign aesthetic.

productphotorealpackaging
Demo

Storefront cleanup edit

Preserve-and-change edit

This is the kind of scoped edit where the preserve list keeps the model from drifting outside the requested change.

Remove every advertising sign and poster from the storefront windows. Preserve the awning, brick facade, mullions, reflections, sidewalk, and all people exactly. Reconstruct the glass naturally with no ghosting or adhesive marks.

editcleanupmask-ready

How To Use This API

How to use GPT Image 2 API

This quick-start walkthrough is written to rank for integration-style searches while staying concise enough for busy developers and operators.

  1. 1

    Create your fal.ai account

    Set up a fal.ai account so you can access the playground, model endpoints, and your API key from the dashboard.

  2. 2

    Store your FAL_KEY securely

    Set `FAL_KEY` in your server environment and avoid exposing it from client-side code or public browser sessions.

  3. 3

    Choose generate or edit mode

    Use the core GPT Image 2 endpoint for new images and the edit endpoint when your workflow starts from one or more reference images.

  4. 4

    Set size, quality, and format

    Pick a preset or custom size, choose low/medium/high quality based on budget and fidelity needs, and return the asset as JPEG, PNG, or WebP.

  5. 5

    Use the queue for production flows

    Submit requests to the queue, keep the returned request id, and poll status or results when you need durable asynchronous handling.

FAQ

Frequently asked questions about GPT Image 2 API

FAQs stay compact and skimmable here. The content is still data-driven for SEO, but the layout is cleaner and less visually heavy.

What is GPT Image 2 API?

It is fal.ai's hosted API surface for OpenAI's GPT Image 2 model family, covering text-to-image generation and image editing workflows.

What is GPT Image 2 especially good at?

fal.ai positions GPT Image 2 around three standout strengths: stronger text rendering, high-fidelity photorealism, and more reliable product photography with readable labels and packaging.

Does GPT Image 2 support image editing?

Yes. fal.ai documents a companion edit endpoint for image-to-image workflows, including reference images, auto sizing from the input, and optional mask-based changes.

What sizes are supported?

fal.ai documents both preset sizes and custom dimensions up to 4K-class outputs, with width and height constrained to multiples of 16 and aspect-ratio limits for valid requests.

What output formats can I request?

The documented output formats are JPEG, PNG, and WebP, so you can choose based on asset quality, transparency, or delivery constraints.

How do queue-based requests work?

You submit a request, receive a request id, then use the queue status and result endpoints to track progress and fetch the final image payload once the request is completed.

Can I use GPT Image 2 for commercial work?

The fal.ai model pages indicate commercial use is supported, but you should still verify your own legal, brand, and platform requirements before publishing assets at scale.

Where can I find prompting guidance?

fal.ai publishes a dedicated prompting guide for GPT Image 2 covering generation, editing, preserve/change logic, and structured prompt templates.

Model Directory

Browse the full model market before you choose your route.

Use the `/models` catalog to scan providers, modalities, reasoning support, context windows, and pricing metadata from a local OpenRouter snapshot. It is the fastest way to compare what exists before you decide which models should be prioritized on ImaRouter.

Get Started

Start with GPT Image 2 on fal.ai, then productionize the workflow you validate

Use the playground to test prompts, move into the text-to-image or edit API when the workflow is stable, and adopt queue polling when you need request ids, status visibility, and durable async handling.