{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk AI Image Generator (NO API)",
    "description": "Generate hundreds of AI images in one run from a list of prompts using top OpenRouter models (Gemini, GPT Image, Seedream, Flux...).",
    "version": "0.1",
    "x-build-id": "M5elEK0iHjgR7Q39A"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fayoussef~bulk-ai-image-generator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fayoussef-bulk-ai-image-generator",
        "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/fayoussef~bulk-ai-image-generator/runs": {
      "post": {
        "operationId": "runs-sync-fayoussef-bulk-ai-image-generator",
        "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/fayoussef~bulk-ai-image-generator/run-sync": {
      "post": {
        "operationId": "run-sync-fayoussef-bulk-ai-image-generator",
        "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",
        "required": [
          "prompts"
        ],
        "properties": {
          "prompts": {
            "title": "Prompts",
            "type": "array",
            "description": "One text prompt per image you want to generate. Each prompt can be combined with the 'Images per prompt' setting to create multiple variations.",
            "items": {
              "type": "string"
            }
          },
          "model": {
            "title": "Image model",
            "enum": [
              "google/gemini-2.5-flash-image",
              "google/gemini-3.1-flash-image-preview",
              "google/gemini-3-pro-image-preview",
              "openai/gpt-5-image",
              "openai/gpt-5-image-mini",
              "openai/gpt-5.4-image-2"
            ],
            "type": "string",
            "description": "Which OpenRouter image-generation model to use. Defaults to Gemini 2.5 Flash Image (reliable, handles terse prompts well). Use 'Custom model ID' below to use any other OpenRouter model.",
            "default": "google/gemini-2.5-flash-image"
          },
          "systemPrompt": {
            "title": "System prompt (optional)",
            "type": "string",
            "description": "Optional extra instructions applied to every image (e.g. a consistent style, brand, or quality directive). This is appended to the built-in instruction that forces the model to always render an image and never reply with text."
          },
          "customModelId": {
            "title": "Custom model ID (advanced)",
            "type": "string",
            "description": "Optional. Any OpenRouter model ID with image output, e.g. 'google/gemini-2.5-flash-image'. Overrides the 'Image model' selection above. See https://openrouter.ai/models?fmt=cards&output_modalities=image."
          },
          "aspectRatio": {
            "title": "Aspect ratio",
            "enum": [
              "1:1",
              "16:9",
              "9:16",
              "4:3",
              "3:4",
              "3:2",
              "2:3",
              "21:9"
            ],
            "type": "string",
            "description": "Aspect ratio of the generated images. Support varies by model; ignored by models that do not accept it.",
            "default": "1:1"
          },
          "imageSize": {
            "title": "Image resolution",
            "enum": [
              "0.5K",
              "1K",
              "2K",
              "4K"
            ],
            "type": "string",
            "description": "Output resolution. Higher resolutions cost more OpenRouter credit. Support varies by model.",
            "default": "1K"
          },
          "imagesPerPrompt": {
            "title": "Images per prompt",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many image variations to generate for each prompt (1-10).",
            "default": 1
          },
          "concurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many images to generate in parallel. Higher is faster but may hit rate limits sooner (1-20).",
            "default": 6
          },
          "maxItems": {
            "title": "Max images (optional cap)",
            "minimum": 1,
            "type": "integer",
            "description": "Optional hard cap on the total number of images generated in this run, useful for controlling spend. Leave empty to generate one image for every prompt × images-per-prompt."
          },
          "openRouterApiKey": {
            "title": "OpenRouter API key (optional)",
            "type": "string",
            "description": "Optional. Bring your own OpenRouter API key to call OpenRouter directly and bill your own OpenRouter account. Leave empty to use the built-in apify/openrouter proxy (billed as Apify credit — no key needed)."
          },
          "proxyBaseUrl": {
            "title": "OpenRouter proxy base URL (advanced)",
            "type": "string",
            "description": "Advanced. Override the API base URL. Leave empty to use the default (apify/openrouter proxy, or https://openrouter.ai/api/v1 when an OpenRouter API key is provided)."
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}