{
  "openapi": "3.0.1",
  "info": {
    "title": "Image Caption & Alt Text Generator – AI, Bulk, No API Key",
    "description": "AI alt text and image captions in bulk: accessible alt text (≤125 chars), detailed caption and SEO file name for image URLs, or audit a web page's <img> tags and flag missing/poor alt. Florence-2 runs inside the Actor, no API key. $6 per 1,000 images.",
    "version": "0.1",
    "x-build-id": "tcV8VFflHbICqcUv4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/gazidev~image-captioner/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-gazidev-image-captioner",
        "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~image-captioner/runs": {
      "post": {
        "operationId": "runs-sync-gazidev-image-captioner",
        "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~image-captioner/run-sync": {
      "post": {
        "operationId": "run-sync-gazidev-image-captioner",
        "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 images (JPG, PNG, WebP, GIF, BMP, TIFF, HEIC, AVIF), one per line. `data:image/...;base64,` URIs also work (handy for AI agents). Leave empty and use `Web pages` to audit the images of a page instead.",
            "default": [
              "https://raw.githubusercontent.com/xinntao/Real-ESRGAN/master/inputs/wolf_gray.jpg"
            ],
            "items": {
              "type": "string"
            }
          },
          "pageUrls": {
            "title": "Web pages (alt text audit)",
            "type": "array",
            "description": "Web page URLs. The Actor collects every <img> on the page (src, srcset, lazy-load data-src), reads the current alt text, grades it (missing / empty / poor / ok) and writes a new alt text for each image. Only images in the HTML are found (no JavaScript rendering).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "onlyImagesNeedingAlt": {
            "title": "Only describe page images with missing or poor alt text",
            "type": "boolean",
            "description": "For `Web pages`: images whose current alt text already looks good are listed as `skipped` and not described or charged.",
            "default": false
          },
          "maxImagesPerPage": {
            "title": "Max images per page",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Stop collecting images from one page after this many.",
            "default": 50
          },
          "captionDetail": {
            "title": "Caption detail",
            "enum": [
              "alt",
              "detailed",
              "paragraph"
            ],
            "type": "string",
            "description": "`alt`: alt text only (fastest). `detailed` (recommended): alt text plus a 1–3 sentence caption. `paragraph`: alt text plus a longer paragraph (colours, background, layout). Same price for all three.",
            "default": "detailed"
          },
          "altTextMaxLength": {
            "title": "Alt text max length (characters)",
            "minimum": 40,
            "maximum": 250,
            "type": "integer",
            "description": "Alt text is cut at a word boundary to fit. 125 is the common screen-reader / SEO recommendation.",
            "default": 125
          },
          "seoFilenames": {
            "title": "Suggest SEO file names",
            "type": "boolean",
            "description": "Add a descriptive, hyphenated file name (e.g. `wolf-sitting-snow-looking-camera.jpg`).",
            "default": true
          },
          "quality": {
            "title": "Analysis resolution",
            "enum": [
              "standard",
              "high"
            ],
            "type": "string",
            "description": "`standard` (recommended): the image is analysed at 512×512 px. `high`: 768×768 px (the model's native size), notices more small details and text but takes about 1.8x the CPU time, so it adds the `high-detail-addon` event per image.",
            "default": "standard"
          },
          "maxImages": {
            "title": "Max images per run",
            "minimum": 0,
            "type": "integer",
            "description": "0 = no limit. You can also cap the cost with the run's Maximum cost setting: the Actor stops cleanly when it is reached.",
            "default": 0
          },
          "minImageSidePx": {
            "title": "Skip images smaller than (px)",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Icons, spacers and tracking pixels below this width or height are skipped (not charged).",
            "default": 32
          },
          "maxFileSizeMb": {
            "title": "Max image size (MB)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Larger downloads are stopped and reported as errors (not charged).",
            "default": 20
          },
          "bulkText": {
            "title": "Bulk image URLs (paste or CSV)",
            "type": "string",
            "description": "Paste many image URLs (one per line) or CSV text with a `url` column."
          },
          "datasetId": {
            "title": "Image URLs from a dataset",
            "type": "string",
            "description": "ID or name of an Apify dataset (e.g. from an image or product scraper) that contains image URLs."
          },
          "datasetField": {
            "title": "Dataset field with the image URL",
            "type": "string",
            "description": "Field name in the dataset items (a string or an array of strings).",
            "default": "url"
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Usually not needed. Use it only if image hosts block data-centre IPs.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}