{
  "openapi": "3.0.1",
  "info": {
    "title": "E-commerce Image Pack Pipeline",
    "description": "Turn product photos into white-background image packs sized for Amazon, Etsy, Shopify, and eBay.",
    "version": "0.1",
    "x-build-id": "MgZrwlWOxnxdUrF5b"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/plusonets~ecommerce-image-pack/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-plusonets-ecommerce-image-pack",
        "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/plusonets~ecommerce-image-pack/runs": {
      "post": {
        "operationId": "runs-sync-plusonets-ecommerce-image-pack",
        "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/plusonets~ecommerce-image-pack/run-sync": {
      "post": {
        "operationId": "run-sync-plusonets-ecommerce-image-pack",
        "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": {
          "imageUrls": {
            "title": "Image URLs",
            "type": "array",
            "description": "Public http(s) image URLs, or small data:image/...;base64 URLs. Private addresses and localhost are rejected. Leave this empty to use the built-in sample photos.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "datasetId": {
            "title": "Dataset ID",
            "type": "string",
            "description": "Optional Apify dataset to read. Each item should have a URL in datasetImageField. The run must be allowed to read that dataset.",
            "default": ""
          },
          "datasetImageField": {
            "title": "Dataset image field",
            "type": "string",
            "description": "Item field that holds the image URL. A list of URL strings in that field is also accepted.",
            "default": "imageUrl"
          },
          "imagesJson": {
            "title": "Inline JSON",
            "type": "string",
            "description": "Optional JSON array of URLs or objects like {\"url\":\"https://...\",\"title\":\"Mug\"}.",
            "default": ""
          },
          "imagesCsv": {
            "title": "Inline CSV",
            "type": "string",
            "description": "Optional CSV text with a header row. Required column: url (or imageUrl). Optional column: title.",
            "default": ""
          },
          "productTitle": {
            "title": "Product title",
            "type": "string",
            "description": "Used in file names and alt text when an image has no title of its own. Treated as plain text.",
            "default": ""
          },
          "channels": {
            "title": "Channels",
            "type": "array",
            "description": "Marketplace presets to export. One source image produces one file per channel. You are billed per source image, not per channel.",
            "items": {
              "type": "string",
              "enum": [
                "amazon",
                "etsy",
                "shopify",
                "ebay"
              ],
              "enumTitles": [
                "Amazon",
                "Etsy",
                "Shopify",
                "eBay"
              ]
            },
            "default": [
              "amazon",
              "etsy",
              "shopify",
              "ebay"
            ]
          },
          "removeBackground": {
            "title": "Remove background",
            "type": "boolean",
            "description": "Cut the product out with the small U²-Net model on CPU, then place it on the canvas.",
            "default": true
          },
          "whiteBackground": {
            "title": "White background",
            "type": "boolean",
            "description": "Flatten onto pure white RGB 255,255,255. Required for the Amazon main-image preset.",
            "default": true
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "jpeg",
              "png",
              "webp"
            ],
            "type": "string",
            "description": "jpeg, png, or webp. A channel that does not accept the choice is saved as JPEG instead.",
            "default": "jpeg"
          },
          "jpegQuality": {
            "title": "JPEG quality",
            "minimum": 60,
            "maximum": 95,
            "type": "integer",
            "description": "Starting quality, from 60 to 95. The encoder steps down if a channel file-size cap would be missed.",
            "default": 90
          },
          "suggestAltText": {
            "title": "Suggest alt text",
            "type": "boolean",
            "description": "Write alt text from the title and the channel sizes. A bring-your-own OpenAI key can phrase the sentence; if the call fails, the deterministic sentence is used.",
            "default": true
          },
          "openAiApiKey": {
            "title": "OpenAI API key",
            "type": "string",
            "description": "Optional. Your own OpenAI key, used only to phrase alt text. It is not stored. Leave it empty to keep the deterministic sentence."
          },
          "maxImages": {
            "title": "Max images",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Cap on source images for this run. The default is 10 so a dataset or URL list cannot run away. Maximum 50. The empty-input demo uses three sample photos, which is under this cap.",
            "default": 10
          },
          "maxImageBytes": {
            "title": "Max image bytes",
            "minimum": 50000,
            "maximum": 15000000,
            "type": "integer",
            "description": "Reject a download larger than this many bytes before it is decoded.",
            "default": 8000000
          },
          "alertOnlyOnChange": {
            "title": "Alert only on change",
            "type": "boolean",
            "description": "When scheduled, skip images whose output hash matches the saved baseline. If nothing changed, the dataset gets one unbilled no_results row.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}