{
  "openapi": "3.0.1",
  "info": {
    "title": "PICG — AI Product Photo Scenes",
    "description": "AI scenes for product photos: an AI model builds a styled scene around your product, $0.15 per frame (beta). Or skip AI: cut out the background for $0.01, or place the product on a studio backdrop for $0.02-$0.03. Up to 20 photos per run, pay per published image.",
    "version": "0.1",
    "x-build-id": "BJipor7g7RIeZbu2c"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/prixodik~product-image-creative-generator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-prixodik-product-image-creative-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/prixodik~product-image-creative-generator/runs": {
      "post": {
        "operationId": "runs-sync-prixodik-product-image-creative-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/prixodik~product-image-creative-generator/run-sync": {
      "post": {
        "operationId": "run-sync-prixodik-product-image-creative-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": [
          "schemaVersion",
          "products"
        ],
        "properties": {
          "products": {
            "title": "Product photos",
            "minItems": 1,
            "maxItems": 20,
            "type": "array",
            "description": "To try it with your own photo, replace the demo <code>imageUrl</code> below with a direct link to your product photo. One object per product. Required: <code>id</code> (letters, digits, <code>_</code> and <code>-</code>, up to 64 characters) and <code>imageUrl</code> (public HTTPS link to a PNG, JPEG or WebP photo). 1–20 products per run. Optional: <code>sku</code>, <code>category</code>, <code>productKind</code>.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "id",
                "imageUrl"
              ],
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$",
                  "title": "ID",
                  "description": "Unique product identifier within the run: Latin letters, digits, “_” and “-”, up to 64 characters."
                },
                "sku": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "title": "SKU",
                  "description": "Article number (up to 64 characters). Appears only in the result metadata."
                },
                "imageUrl": {
                  "type": "string",
                  "maxLength": 2048,
                  "title": "Image URL",
                  "description": "HTTPS URL of the source product photo (up to 2048 characters). Addresses in private networks are rejected."
                },
                "name": {
                  "type": "string",
                  "maxLength": 120,
                  "title": "Name",
                  "description": "Product name (up to 120 characters). Required only for the legacy promo and story templates."
                },
                "headline": {
                  "type": "string",
                  "maxLength": 120,
                  "title": "Headline",
                  "description": "Headline on the layout (up to 120 characters). Legacy templates only."
                },
                "priceText": {
                  "type": "string",
                  "maxLength": 40,
                  "title": "Price text",
                  "description": "Ready-made price text (up to 40 characters), for example “$49”. Legacy templates only."
                },
                "cta": {
                  "type": "string",
                  "maxLength": 40,
                  "title": "Call to action",
                  "description": "Call to action (up to 40 characters). Legacy templates only."
                },
                "category": {
                  "type": "string",
                  "maxLength": 64,
                  "title": "Category",
                  "description": "Product category (electronics, laptop, apparel, textile, …). Used to choose the scene automatically and the compose mode. Ignored for the scene when <code>sceneId</code> is set, and for the compose mode when <code>productKind</code> is set."
                },
                "productKind": {
                  "type": "string",
                  "title": "Compose mode",
                  "description": "<code>hard-goods</code>: the product stands on a surface. <code>flat-lay</code>: apparel or textile lying flat. If omitted, derived from the category or name (apparel/textile → flat-lay).",
                  "enum": [
                    "hard-goods",
                    "flat-lay"
                  ],
                  "enumTitles": [
                    "Hard goods (standing)",
                    "Flat-lay (apparel / textile)"
                  ]
                }
              }
            }
          },
          "preset": {
            "title": "Mode (preset)",
            "enum": [
              "product-photo-hero",
              "ecommerce-clean",
              "product-ads",
              "social-media-pack",
              "background-only"
            ],
            "type": "string",
            "description": "<strong>Studio hero</strong> (default): the product is cut out and placed on a studio background, 1080×1080. <strong>Background removal only</strong>: just the cut-out product on a transparent PNG, 1600×1600 (needs background removal switched on). The other presets are legacy listing layouts. An explicit <code>outputs</code> list replaces the preset."
          },
          "backgroundRemoval": {
            "title": "Background removal",
            "enum": [
              "none",
              "local-cutout"
            ],
            "type": "string",
            "description": "<strong>Cut out the product</strong>: the product is cut out inside the Actor with the isnet-general-use model, no cloud segmentation service is used. If the cutout fails or no product is found, the image fails instead of being published with a bad result. A watermark on the background disappears with it; a watermark printed on the product itself is not removed. <strong>Keep original background</strong>: the photo is used as is."
          },
          "photoCraft": {
            "title": "PhotoCraft studio compose",
            "enum": [
              "off",
              "prefer",
              "require"
            ],
            "type": "string",
            "description": "PhotoCraft places the cut-out product on a studio background with a soft shadow. <strong>Off</strong>: classic renderer (Sharp). <strong>Prefer</strong>: PhotoCraft, with fallback to the classic renderer if PhotoCraft is unavailable. <strong>Require</strong>: PhotoCraft only; the image fails if it is unavailable.",
            "default": "off"
          },
          "photoCraftBackgroundId": {
            "title": "Studio background",
            "enum": [
              "bg-cool-gray",
              "bg-studio-white",
              "bg-warm-ivory",
              "bg-soft-charcoal",
              "infinity-cove",
              "gloss-black",
              "kitchen-quartz",
              "pale-sky",
              "soft-paper",
              "white-cyclorama",
              "graphite-specular",
              "champagne-pearl",
              "slate-cove",
              "studio-horizon"
            ],
            "type": "string",
            "description": "Studio background the cut-out product is placed on (4 lite and 10 premium looks). Used when PhotoCraft is not Off."
          },
          "aiScene": {
            "title": "AI scene (optional, paid separately)",
            "type": "object",
            "description": "Leave this field as <code>{}</code> (empty) to run <b>without</b> the AI scene. To turn it on, replace <code>{}</code> with, for example: <code>{\"style\": \"moss-stone\"}</code>. Only <code>style</code> is needed; <code>placement</code> (<code>standing</code> or <code>flat</code>) and <code>retouch</code> (<code>low</code>, <code>medium</code>, <code>high</code>) are optional. The AI builds a scene around your product that follows the angle of your photo. You pay for the AI scene only for a frame that is actually published; if a frame fails the quality check, a classic PhotoCraft image is made and charged at the classic price. Set a <em>Maximum cost per run</em> in the run options (for example $0.30 for one product), otherwise the AI scene will not start.",
            "properties": {
              "style": {
                "title": "Style",
                "type": "string",
                "enum": [
                  "moss-stone",
                  "beige-silk",
                  "amber-halo",
                  "mustard-sandstone",
                  "lavender-floor",
                  "mint-shelf",
                  "greige-stone",
                  "terracotta-arch",
                  "linen-flatlay",
                  "navy-gold"
                ],
                "description": "Palette, light and materials of the scene: moss-stone, beige-silk, amber-halo, mustard-sandstone, lavender-floor, mint-shelf, greige-stone, terracotta-arch, linen-flatlay, navy-gold."
              },
              "placement": {
                "title": "Placement",
                "type": "string",
                "enum": [
                  "standing",
                  "flat"
                ],
                "default": "standing",
                "description": "<code>standing</code>: the product stands. <code>flat</code>: the product lies flat, top-down view."
              },
              "retouch": {
                "title": "Retouch level",
                "type": "string",
                "enum": [
                  "low",
                  "medium",
                  "high"
                ],
                "default": "low",
                "description": "<code>low</code>: almost an exact copy. <code>medium</code>: cleaning and soft colour correction. <code>high</code>: “like new” look; small distortions of lettering are possible."
              }
            },
            "additionalProperties": false
          },
          "sceneId": {
            "title": "Classic scene (ScenePack)",
            "enum": [
              "infinity-cove",
              "gloss-black",
              "concrete-loft"
            ],
            "type": "string",
            "description": "Explicit ScenePack background for the classic renderer (PhotoCraft Off); overrides the automatic choice. An unknown id fails with CAPABILITY_UNAVAILABLE."
          },
          "scenePreset": {
            "title": "Scene selection",
            "enum": [
              "auto"
            ],
            "type": "string",
            "description": "<code>auto</code> (default): the ScenePack is chosen from the product category when <code>sceneId</code> is not set.",
            "default": "auto"
          },
          "outputs": {
            "title": "Custom output formats",
            "minItems": 1,
            "maxItems": 5,
            "type": "array",
            "description": "1–5 outputs per product. If omitted, the preset defines the output.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "id",
                "template",
                "width",
                "height"
              ],
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$",
                  "title": "ID",
                  "description": "Output identifier, unique per product: Latin letters, digits, “_” and “-”, up to 64 characters."
                },
                "template": {
                  "type": "string",
                  "enum": [
                    "clean",
                    "promo",
                    "story",
                    "product-photo"
                  ],
                  "title": "Template",
                  "description": "<code>product-photo</code>: cut-out product on a scene, no headline, price or call to action. <code>clean</code>, <code>promo</code>, <code>story</code>: legacy listing layouts."
                },
                "width": {
                  "type": "integer",
                  "minimum": 256,
                  "maximum": 4096,
                  "title": "Width",
                  "description": "Output width in pixels, 256–4096 (PhotoCraft: 512–2048)."
                },
                "height": {
                  "type": "integer",
                  "minimum": 256,
                  "maximum": 4096,
                  "title": "Height",
                  "description": "Output height in pixels, 256–4096 (PhotoCraft: 512–2048)."
                },
                "format": {
                  "type": "string",
                  "enum": [
                    "png",
                    "jpeg",
                    "webp"
                  ],
                  "title": "File format",
                  "description": "png, jpeg or webp."
                },
                "fit": {
                  "type": "string",
                  "enum": [
                    "contain",
                    "cover"
                  ],
                  "title": "Fit",
                  "description": "<code>contain</code>: the whole photo is kept. <code>cover</code>: the photo is cropped to fill."
                },
                "paddingPercent": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 20,
                  "title": "Padding, %",
                  "description": "Margin around the product in percent, 0–20."
                },
                "editableSvg": {
                  "type": "boolean",
                  "title": "Editable SVG",
                  "description": "Also save an editable SVG (not counted as a separate creative)."
                },
                "showLogo": {
                  "type": "boolean",
                  "title": "Show logo",
                  "description": "Show the logo; not allowed for the clean template."
                },
                "transparentCanvas": {
                  "type": "boolean",
                  "title": "Transparent canvas",
                  "description": "Transparent canvas: clean template with PNG or WebP only."
                }
              }
            }
          },
          "brand": {
            "title": "Brand",
            "type": "object",
            "description": "Colours as <code>#RRGGBB</code>, font <code>noto-sans</code> and an optional HTTPS <code>logoUrl</code>. Used by the legacy listing templates.",
            "properties": {
              "primaryColor": {
                "type": "string",
                "pattern": "^#[0-9A-Fa-f]{6}$",
                "title": "Primary colour",
                "description": "Primary brand colour, #RRGGBB."
              },
              "surfaceTextColor": {
                "type": "string",
                "pattern": "^#[0-9A-Fa-f]{6}$",
                "title": "Text colour on surface",
                "description": "Text colour on a light surface, #RRGGBB."
              },
              "onPrimaryColor": {
                "type": "string",
                "pattern": "^#[0-9A-Fa-f]{6}$",
                "title": "Text colour on primary",
                "description": "Text colour on the primary colour, #RRGGBB."
              },
              "backgroundColor": {
                "type": "string",
                "pattern": "^#[0-9A-Fa-f]{6}$",
                "title": "Background",
                "description": "Canvas background colour, #RRGGBB."
              },
              "fontId": {
                "type": "string",
                "enum": [
                  "noto-sans"
                ],
                "title": "Font",
                "description": "Built-in font identifier."
              },
              "logoUrl": {
                "type": "string",
                "maxLength": 2048,
                "title": "Logo URL",
                "description": "HTTPS URL of a shared logo; downloaded only if an output has showLogo=true."
              }
            },
            "additionalProperties": false
          },
          "dryRun": {
            "title": "Dry run (plan only)",
            "type": "boolean",
            "description": "Returns the expanded plan in SUMMARY without downloading images or creating files. No per-image charge; the platform cost of starting the run still applies.",
            "default": false
          },
          "publishSignedLinks": {
            "title": "Signed links",
            "type": "boolean",
            "description": "Opt-in: add a bearer link (signedUrl) without expiry to the result descriptors; anyone holding it can read the file. Does not change the storage access settings.",
            "default": false
          },
          "execution": {
            "title": "Execution parameters",
            "type": "object",
            "description": "<code>downloadConcurrency</code> 1–4; <code>renderConcurrency</code> supports only 1.",
            "properties": {
              "downloadConcurrency": {
                "type": "integer",
                "minimum": 1,
                "maximum": 4,
                "title": "Parallel downloads",
                "description": "Parallel photo downloads, 1–4."
              },
              "renderConcurrency": {
                "type": "integer",
                "title": "Parallel renders",
                "description": "Parallel renders; always 1 in v1.",
                "minimum": 1,
                "maximum": 1
              }
            },
            "additionalProperties": false
          },
          "schemaVersion": {
            "title": "Contract version",
            "enum": [
              "1.0"
            ],
            "type": "string",
            "description": "Input contract version. Only 1.0 is supported; leave as is."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}