{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk Image Alt Text Generator - AI Captions from Datasets",
    "description": "Generate SEO and accessibility alt text for thousands of product images from image URLs or a Dataset. SKU and row kept, 36 languages, length limit, CSV-ready columns. Pay per image.",
    "version": "0.1",
    "x-build-id": "o7WeQ1WPTTPH3Xq9x"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automa-flow~bulk-image-alt-text-generator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automa-flow-bulk-image-alt-text-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/automa-flow~bulk-image-alt-text-generator/runs": {
      "post": {
        "operationId": "runs-sync-automa-flow-bulk-image-alt-text-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/automa-flow~bulk-image-alt-text-generator/run-sync": {
      "post": {
        "operationId": "run-sync-automa-flow-bulk-image-alt-text-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",
        "properties": {
          "imageUrls": {
            "title": "Image URLs",
            "maxItems": 10000,
            "type": "array",
            "description": "Public http(s) URLs of JPEG, PNG, WebP, GIF or AVIF images, one per entry. Ignored when Dataset ID is set.",
            "items": {
              "type": "string",
              "maxLength": 2048,
              "pattern": "^\\s*https?://\\S+\\s*$"
            }
          },
          "imageUrlsText": {
            "title": "Image URLs (one per line)",
            "maxLength": 2000000,
            "type": "string",
            "description": "Paste many image URLs at once, one per line. Added after Image URLs."
          },
          "datasetId": {
            "title": "Dataset ID",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{2,127}$",
            "type": "string",
            "description": "Apify Dataset to read instead of pasted URLs. In an integration, set it to {{resource.defaultDatasetId}}. A nested resource id is not read."
          },
          "imageField": {
            "title": "Image URL field",
            "pattern": "^[A-Za-z_][A-Za-z0-9_-]{0,63}(\\.[A-Za-z0-9_][A-Za-z0-9_-]{0,63}){0,4}$",
            "type": "string",
            "description": "Field with the image URL in each row, as a dot path. url after most scrapers, source_url after Parallel Bulk File Downloader, images.0 for the first entry of a list.",
            "default": "url"
          },
          "idField": {
            "title": "SKU or id field",
            "pattern": "^[A-Za-z_][A-Za-z0-9_-]{0,63}(\\.[A-Za-z0-9_][A-Za-z0-9_-]{0,63}){0,4}$",
            "type": "string",
            "description": "Optional field copied to sourceId on each row, for example sku, productId or handle. Rows without it use their Dataset row number."
          },
          "contextFields": {
            "title": "Product context fields",
            "maxItems": 10,
            "type": "array",
            "description": "Up to 10 fields passed to the model as product context, for example title, brand or color. The model uses them when the image agrees and never invents a brand that is not given or visible.",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z_][A-Za-z0-9_-]{0,63}(\\.[A-Za-z0-9_][A-Za-z0-9_-]{0,63}){0,4}$"
            }
          },
          "datasetOffset": {
            "title": "Dataset offset",
            "minimum": 0,
            "type": "integer",
            "description": "Skip this many rows, then read up to Max images. When rows remain, RUN_SUMMARY gives nextDatasetOffset for the next run.",
            "default": 0
          },
          "language": {
            "title": "Language",
            "enum": [
              "en",
              "de",
              "fr",
              "es",
              "it",
              "pt",
              "nl",
              "pl",
              "cs",
              "sk",
              "sl",
              "hr",
              "sr",
              "hu",
              "ro",
              "bg",
              "el",
              "sv",
              "da",
              "nb",
              "fi",
              "et",
              "lv",
              "lt",
              "uk",
              "ru",
              "tr",
              "ar",
              "he",
              "hi",
              "id",
              "th",
              "vi",
              "ja",
              "ko",
              "zh"
            ],
            "type": "string",
            "description": "Language of the alt text.",
            "default": "en"
          },
          "altTextMaxLength": {
            "title": "Max alt text length (characters)",
            "minimum": 40,
            "maximum": 250,
            "type": "integer",
            "description": "Longest alt text to write. 125 suits most screen readers and stores. 40-250.",
            "default": 125
          },
          "includeCaption": {
            "title": "Also write a caption",
            "type": "boolean",
            "description": "Add a longer description of one to three sentences in the caption column. Same price.",
            "default": false
          },
          "maxImages": {
            "title": "Max images",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Most input rows to process in this run, duplicates included. 1-10,000. Pasted URLs beyond it go to RETRY_INPUT; Dataset rows beyond it are read with datasetOffset.",
            "default": 1000
          },
          "concurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Images processed at the same time. 1-20.",
            "default": 8
          },
          "images": {
            "title": "Images with ids and context (JSON)",
            "maxItems": 10000,
            "type": "array",
            "description": "For API calls and RETRY_INPUT: objects with url, an optional id (your SKU) and an optional context object of product fields. Added after the pasted URLs.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "Image URL",
                  "description": "Public http(s) URL of the image.",
                  "maxLength": 2048
                },
                "id": {
                  "type": "string",
                  "title": "Id or SKU",
                  "description": "Copied to sourceId on the row.",
                  "maxLength": 300
                },
                "context": {
                  "type": "object",
                  "title": "Product context",
                  "description": "Up to 10 product fields such as title or brand, passed to the model."
                }
              }
            }
          },
          "payload": {
            "title": "Integration payload",
            "type": "object",
            "description": "Added by Apify Actor-to-Actor integrations. Not read: pass the Dataset in Dataset ID."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}