{
  "openapi": "3.0.1",
  "info": {
    "title": "Product Image Checker & Approved Replacement CSV",
    "description": "Check product-feed images below 500 x 500 px and export approved replacement URLs matched to exact variant IDs. CSV reports and resumable jobs.",
    "version": "0.0",
    "x-build-id": "a565EhBkSxf2fNRdM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/byznys-s-jarvisem~my-actor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-byznys-s-jarvisem-my-actor",
        "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/byznys-s-jarvisem~my-actor/runs": {
      "post": {
        "operationId": "runs-sync-byznys-s-jarvisem-my-actor",
        "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/byznys-s-jarvisem~my-actor/run-sync": {
      "post": {
        "operationId": "run-sync-byznys-s-jarvisem-my-actor",
        "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": {
          "mode": {
            "title": "Input mode",
            "enum": [
              "demo",
              "https_csv",
              "close_job"
            ],
            "type": "string",
            "description": "Demo shows eight embedded sample rows. If mode is omitted, non-empty feedCsv selects https_csv; otherwise the effective mode is demo. Close job requires jobId and empty CSV inputs. It marks that job closed; it does not delete stored data."
          },
          "feedCsv": {
            "title": "Current product images — CSV text",
            "maxLength": 2000000,
            "type": "string",
            "description": "Paste UTF-8 CSV text, not a file path or CSV URL. Required header: id,image_link. IDs stay exact text, including leading zeros. Maximum 2,000,000 UTF-8 bytes. Keep the original CSV text and line breaks when resuming."
          },
          "approvedImagesCsv": {
            "title": "Approved replacements — CSV text",
            "maxLength": 2000000,
            "type": "string",
            "description": "Optional CSV text with header id,approved_image_link. Supply one approved link per exact variant ID. Maximum 4,000 rows and 2,000,000 UTF-8 bytes. Leave empty or omit for audit only. Preserve the original value or omission when resuming."
          },
          "allowedHosts": {
            "title": "Allowed image hosts",
            "maxItems": 20,
            "type": "array",
            "description": "For Your CSV, enter 1–20 exact public DNS hosts, such as placehold.co. No protocol, path, wildcard, port, or IP address. Redirect hosts must also appear here.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Maximum feed rows",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Reject a larger CSV before downloading. The code uses 20 when omitted; it never silently truncates the feed."
          },
          "maxImageRequests": {
            "title": "Maximum image request attempts",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Bounds fetch attempts and actual HTTP header sends, including redirects and transport retries. Default 40."
          },
          "maxTotalImageMiB": {
            "title": "Maximum total image bytes read (MiB)",
            "minimum": 1,
            "maximum": 128,
            "type": "integer",
            "description": "Application image bytes read, not a precise platform transfer-cost meter. Default 32 MiB. Each image also has a 16 MB and 16 million pixel limit."
          },
          "maxDurationSeconds": {
            "title": "Maximum fetching duration (seconds)",
            "minimum": 1,
            "maximum": 240,
            "type": "integer",
            "description": "Internal image-fetching deadline. Default 45 seconds. Set the platform run timeout higher to leave time for startup and saving the result."
          },
          "demo": {
            "title": "Legacy demo switch",
            "type": "boolean",
            "description": "Legacy compatibility only: true is accepted only when the effective mode is demo. It does not override non-empty feedCsv or mode=https_csv. Omit this field for normal use."
          },
          "jobId": {
            "title": "Job ID (optional)",
            "pattern": "^[A-Za-z0-9_-]+$",
            "minLength": 1,
            "maxLength": 64,
            "type": "string",
            "description": "Omit for a new audit identified by its Apify run ID. To resume, use billing.job_id from OUTPUT and preserve all other original fields and CSV text. Adding an omitted default changes the input fingerprint. Close job requires this ID and empty CSVs. Use a fresh ID only for a genuinely separate audit."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}