{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Background Remover – Transparent PNG, Product Photos",
    "description": "Remove image backgrounds in bulk with AI (IS-Net): transparent PNG/WebP cutouts, white or custom colour backgrounds for product photos, masks and auto-crop to subject. Bulk URLs or datasets, no GPU or subscription. $0.005 per image.",
    "version": "0.1",
    "x-build-id": "lIs2S5FAbRI4eZULa"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/gazidev~background-remover/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-gazidev-background-remover",
        "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~background-remover/runs": {
      "post": {
        "operationId": "runs-sync-gazidev-background-remover",
        "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~background-remover/run-sync": {
      "post": {
        "operationId": "run-sync-gazidev-background-remover",
        "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": "Direct links to JPEG, PNG, WebP, HEIC/HEIF, AVIF, TIFF, GIF (first frame) or BMP files. Duplicates are removed; invalid values and failed downloads are reported for free.",
            "items": {
              "type": "string"
            }
          },
          "bulkText": {
            "title": "Bulk list (paste text or CSV)",
            "type": "string",
            "description": "One URL per line, or a CSV with a `url` / `image` column."
          },
          "sourceFileUrl": {
            "title": "Load URLs from a file (URL)",
            "type": "string",
            "description": "Public .txt or .csv link (Google Sheets 'Publish to web → CSV' works)."
          },
          "datasetId": {
            "title": "Read URLs from an Apify dataset (ID or name)",
            "type": "string",
            "description": "Chain after a product scraper or our Image Downloader."
          },
          "datasetField": {
            "title": "Dataset field with the image URL",
            "type": "string",
            "description": "Arrays of URLs are accepted too.",
            "default": "url"
          },
          "background": {
            "title": "Background",
            "enum": [
              "transparent",
              "white",
              "black",
              "color"
            ],
            "type": "string",
            "description": "JPG output can't be transparent: it uses white unless you pick a colour.",
            "default": "transparent"
          },
          "backgroundColor": {
            "title": "Custom background colour",
            "type": "string",
            "description": "Hex colour, used when Background = Custom colour.",
            "default": "#ffffff"
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "png",
              "webp",
              "jpg"
            ],
            "type": "string",
            "description": "PNG and WebP keep transparency.",
            "default": "png"
          },
          "quality": {
            "title": "WebP/JPG quality",
            "minimum": 50,
            "maximum": 100,
            "type": "integer",
            "description": "Ignored for PNG.",
            "default": 90
          },
          "cropToSubject": {
            "title": "Crop to subject",
            "type": "boolean",
            "description": "Trims empty space around the cut-out subject.",
            "default": false
          },
          "cropMargin": {
            "title": "Crop margin (px)",
            "minimum": 0,
            "type": "integer",
            "description": "Space kept around the subject when cropping.",
            "default": 0
          },
          "outputMaskOnly": {
            "title": "Output the mask only",
            "type": "boolean",
            "description": "Black-and-white alpha mask (white = subject) instead of the cut-out, for your own compositing.",
            "default": false
          },
          "edgeThreshold": {
            "title": "Hard edge threshold (0–254)",
            "minimum": 0,
            "maximum": 254,
            "type": "integer",
            "description": "0 = soft AI edges (best for hair and fur). 128 = crisp edges for products and logos.",
            "default": 0
          },
          "featherPx": {
            "title": "Feather edges (px)",
            "minimum": 0,
            "maximum": 10,
            "type": "number",
            "description": "Softens the cut-out edge.",
            "default": 0
          },
          "maxInputMegapixels": {
            "title": "Max input size (megapixels)",
            "minimum": 0.05,
            "maximum": 40,
            "type": "number",
            "description": "Larger images are skipped for free.",
            "default": 25
          },
          "maxImages": {
            "title": "Max images",
            "minimum": 0,
            "type": "integer",
            "description": "0 = no limit.",
            "default": 0
          },
          "maxFileSizeMb": {
            "title": "Max download size per file (MB)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Downloads above this size are skipped for free.",
            "default": 30
          },
          "proxyConfiguration": {
            "title": "Proxy (optional)",
            "type": "object",
            "description": "Only needed if an image host blocks datacenter IPs."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}