{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Alt Text Generator & Checker: Fix Missing Alt Text",
    "description": "Generate accessibility- and SEO-ready alt text for a list of image URLs, or scan a whole website and write alt text for every image that's missing it. Powered by AI vision.",
    "version": "0.1",
    "x-build-id": "ad7mZROVcOhTrLOsE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/raional~ai-alt-text-generator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-raional-ai-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/raional~ai-alt-text-generator/runs": {
      "post": {
        "operationId": "runs-sync-raional-ai-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/raional~ai-alt-text-generator/run-sync": {
      "post": {
        "operationId": "run-sync-raional-ai-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",
            "type": "array",
            "description": "Mode A — a list of direct image URLs to generate alt text for. Leave empty if you only want to scan websites.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Website URLs to scan",
            "type": "array",
            "description": "Mode B — website pages to scan for images. Only scan sites you own or have permission to analyze. The actor finds <img> tags and writes alt text for images that are missing it.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "onlyMissingAlt": {
            "title": "Only images missing alt text",
            "type": "boolean",
            "description": "In website mode, only generate alt text for images whose alt attribute is empty or missing. Turn off to (re)generate alt text for every image.",
            "default": true
          },
          "language": {
            "title": "Alt text language",
            "type": "string",
            "description": "Language for the generated alt text (e.g. English, Spanish, French, German).",
            "default": "English"
          },
          "style": {
            "title": "Style",
            "enum": [
              "concise",
              "descriptive"
            ],
            "type": "string",
            "description": "Concise = short, functional alt text (recommended for accessibility). Descriptive = a richer description.",
            "default": "concise"
          },
          "maxLength": {
            "title": "Max length (characters)",
            "minimum": 20,
            "maximum": 500,
            "type": "integer",
            "description": "Hard cap on alt text length. WCAG guidance favors ~125 characters or fewer.",
            "default": 125
          },
          "keywordHint": {
            "title": "SEO keyword / context hint",
            "type": "string",
            "description": "Optional context or target keyword to weave in naturally (no keyword stuffing). E.g. 'handmade ceramic mug, product page'."
          },
          "detectDecorative": {
            "title": "Detect decorative images",
            "type": "boolean",
            "description": "Flag purely decorative images (spacers, ornaments) and recommend empty alt text (alt=\"\") instead of a description.",
            "default": true
          },
          "maxImages": {
            "title": "Max images per run",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Safety cap on how many images to process in one run (controls cost).",
            "default": 200
          },
          "model": {
            "title": "Vision model",
            "type": "string",
            "description": "Any OpenRouter (or OpenAI-compatible) vision model ID. Cheap, reliable defaults: google/gemini-2.5-flash-lite, openai/gpt-5-nano, amazon/nova-lite-v1. Browse all vision models at https://openrouter.ai/models?modality=text+image-%3Etext",
            "default": "google/gemini-2.5-flash-lite"
          },
          "renderJs": {
            "title": "Render JavaScript (slower)",
            "type": "boolean",
            "description": "Website mode only. Use a full browser to render JavaScript-heavy pages before extracting images. Recommended on: most modern sites load images via JavaScript. Turn off for faster scans of static HTML sites.",
            "default": true
          },
          "maxPagesPerCrawl": {
            "title": "Max pages per site",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Website mode only. How many pages to crawl per start URL (same domain). 1 = just the given page.",
            "default": 1
          },
          "concurrency": {
            "title": "Parallel image requests",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many images to describe in parallel. Higher is faster but may hit model rate limits.",
            "default": 5
          },
          "apiBaseUrl": {
            "title": "API base URL (advanced)",
            "type": "string",
            "description": "OpenAI-compatible chat-completions base URL. Defaults to OpenRouter. Change to use OpenAI, Groq, Together, or a local server (e.g. https://api.openai.com/v1).",
            "default": "https://openrouter.ai/api/v1"
          },
          "openrouterApiKey": {
            "title": "OpenRouter API key (optional)",
            "type": "string",
            "description": "Optional. Only needed if you self-host this actor. On the hosted actor this is provided for you and you simply pay per image processed. Get one at https://openrouter.ai/keys"
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}