{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Image Generator & Bulk Editor – Nano Banana, GPT Image",
    "description": "AI image generator and bulk editor with Nano Banana (Gemini 2.5 Flash Image), Nano Banana Pro and GPT Image: text-to-image from prompts, background swap, restyle, product photos and variations from URLs, CSV or datasets. No API key.",
    "version": "0.1",
    "x-build-id": "M7HUTcWm2yz8c6NSE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/gazidev~bulk-ai-image-editor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-gazidev-bulk-ai-image-editor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/gazidev~bulk-ai-image-editor/runs": {
      "post": {
        "operationId": "runs-sync-gazidev-bulk-ai-image-editor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/gazidev~bulk-ai-image-editor/run-sync": {
      "post": {
        "operationId": "run-sync-gazidev-bulk-ai-image-editor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "prompts": {
            "title": "Prompt(s)",
            "type": "array",
            "description": "What the model should do. With input images, each image is edited with each prompt (e.g. 3 prompts = 3 background variants per product). Without input images, each prompt generates new images. Use {{column}} placeholders (e.g. {{title}}) to fill in values from CSV/dataset rows. Only edit images you own or have the right to edit.",
            "items": {
              "type": "string"
            }
          },
          "imageUrls": {
            "title": "Input image URLs",
            "type": "array",
            "description": "Public image URLs (JPG, PNG, WebP, GIF...). One job per image per prompt. Large images are downscaled to 2048 px before sending.",
            "items": {
              "type": "string"
            }
          },
          "datasetIds": {
            "title": "Apify datasets with images",
            "type": "array",
            "description": "E.g. the output of a product or Instagram scraper. The image column is detected automatically (imageUrl, image, photo, thumbnail, displayUrl, images...) or set it below. In an integration use {{resource.defaultDatasetId}}."
          },
          "fileUrls": {
            "title": "CSV / Excel / JSON file URLs",
            "type": "array",
            "description": "Public CSV, XLSX or JSON files with one row per job: an image URL column and/or a prompt column. Google Sheets ('Anyone with the link'), Drive, Dropbox and GitHub links work.",
            "items": {
              "type": "string"
            }
          },
          "items": {
            "title": "Or paste JSON rows",
            "type": "array",
            "description": "E.g. [{\"imageUrl\": \"https://.../shoe.jpg\", \"prompt\": \"white studio background\"}, {\"prompt\": \"a red sneaker on a beach\"}]. A row's own prompt overrides the prompts above."
          },
          "imageColumn": {
            "title": "Image column (optional)",
            "type": "string",
            "description": "Column with the input image URL in CSV/dataset rows. Empty = auto-detect. Dot paths work (e.g. images.0)."
          },
          "promptColumn": {
            "title": "Prompt column (optional)",
            "type": "string",
            "description": "Column with a per-row prompt. Empty = use a 'prompt' column if present, otherwise the prompts above."
          },
          "referenceImageUrls": {
            "title": "Reference images (sent with every job)",
            "type": "array",
            "description": "Optional, up to 4: a logo, a style or background reference, a second product... Attached after the main image, so you can write prompts like 'put the product from the first image into the scene of the second image'.",
            "items": {
              "type": "string"
            }
          },
          "model": {
            "title": "Image model",
            "enum": [
              "google/gemini-2.5-flash-image",
              "google/gemini-3.1-flash-lite-image",
              "google/gemini-3.1-flash-image",
              "google/gemini-nano-banana-2.1",
              "google/gemini-3-pro-image",
              "openai/gpt-5-image-mini",
              "openai/gpt-5-image",
              "openai/gpt-5.4-image-2"
            ],
            "type": "string",
            "description": "Called through Apify's OpenRouter Actor; the model cost is billed to your Apify account (no API key; Apify free plan: 10x). Nano Banana costs about $0.039 per image on paid plans.",
            "default": "google/gemini-2.5-flash-image"
          },
          "customModel": {
            "title": "Custom OpenRouter model ID",
            "type": "string",
            "description": "Optional: any OpenRouter model with image output (openrouter.ai/models?output_modalities=image). Overrides the select above."
          },
          "aspectRatio": {
            "title": "Aspect ratio",
            "enum": [
              "auto",
              "1:1",
              "2:3",
              "3:2",
              "3:4",
              "4:3",
              "4:5",
              "5:4",
              "9:16",
              "16:9",
              "21:9"
            ],
            "type": "string",
            "description": "Output aspect ratio (supported by Gemini image models).",
            "default": "auto"
          },
          "imageSize": {
            "title": "Resolution (Gemini 3 models)",
            "enum": [
              "auto",
              "1K",
              "2K",
              "4K"
            ],
            "type": "string",
            "description": "Only Gemini 3 image models support 2K/4K; others ignore it.",
            "default": "auto"
          },
          "imagesPerPrompt": {
            "title": "Images per prompt (variations)",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "Generate several variants of each job. Each saved image is charged.",
            "default": 1
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "png",
              "jpeg",
              "webp"
            ],
            "type": "string",
            "description": "Format of the saved images.",
            "default": "png"
          },
          "maxImages": {
            "title": "Max images",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many jobs (0 = no limit). You pay per saved image, so start small.",
            "default": 20
          },
          "concurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many images are generated at the same time. Rate limits are retried automatically.",
            "default": 4
          },
          "maxInputImageMb": {
            "title": "Max input image size (MB)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Bigger input files are skipped (not charged).",
            "default": 25
          },
          "omitSourceRow": {
            "title": "Don't copy the source row",
            "type": "boolean",
            "description": "By default each output row includes the original CSV/dataset row as sourceRow.",
            "default": false
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}