llms.txt

GPT-Image 1.5

GPT Image 1.5 generates high-fidelity images with strong prompt adherence, preserving composition, lighting, and fine-grained detail.

Overview

Pricing

Your request will cost different amounts based on the number of images, quality, and size.

For more details, see fal.ai pricing.

API Information

This model can be used via our HTTP API or more conveniently via our client libraries. See the input and output schema below, as well as the usage examples.

Input Schema

The API accepts the following input parameters:

Required Parameters Example:

{
  "prompt": "create a realistic image taken with iphone at these coordinates 41°43′32″N 49°56′49″W 15 April 1912"
}

Full Example:

{
  "prompt": "create a realistic image taken with iphone at these coordinates 41°43′32″N 49°56′49″W 15 April 1912",
  "image_size": "1024x1024",
  "background": "auto",
  "quality": "high",
  "num_images": 1,
  "output_format": "png"
}

Output Schema

The API returns the following output format:

Example Response:

{
  "images": [
    {
      "width": 1024,
      "file_name": "EnWrO3XWjPE0nxBDpaQrj.png",
      "content_type": "image/png",
      "url": "https://v3b.fal.media/files/b/0a869129/EnWrO3XWjPE0nxBDpaQrj.png",
      "height": 1024
    }
  ]
}

Usage Examples

cURL

curl --request POST \
  --url https://fal.run/fal-ai/gpt-image-1.5 \
  --header "Authorization: Key $FAL_KEY" \
  --header "Content-Type: application/json" \
  --data '{
     "prompt": "create a realistic image taken with iphone at these coordinates 41°43′32″N 49°56′49″W 15 April 1912"
   }'

Python

Ensure you have the Python client installed:

pip install fal-client

Then use the API client to make requests:

import fal_client

def on_queue_update(update):
    if isinstance(update, fal_client.InProgress):
        for log in update.logs:
           print(log["message"])

result = fal_client.subscribe(
    "fal-ai/gpt-image-1.5",
    arguments={
        "prompt": "create a realistic image taken with iphone at these coordinates 41°43′32″N 49°56′49″W 15 April 1912"
    },
    with_logs=True,
    on_queue_update=on_queue_update,
)
print(result)

JavaScript

Ensure you have the JavaScript client installed:

npm install --save @fal-ai/client

Then use the API client to make requests:

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

const result = await fal.subscribe("fal-ai/gpt-image-1.5", {
  input: {
    prompt: "create a realistic image taken with iphone at these coordinates 41°43′32″N 49°56′49″W 15 April 1912"
  },
  logs: true,
  onQueueUpdate: (update) => {
    if (update.status === "IN_PROGRESS") {
      update.logs.map((log) => log.message).forEach(console.log);
    }
  },
});
console.log(result.data);
console.log(result.requestId);