{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Image Caption & Alt Text Generator (Images + Video)",
    "description": "Generate image captions, detailed descriptions, accessibility/SEO alt text and keyword tags for images and video frames with an open-source AI model (Florence-2) - no API key. Video files also get a timed scene list and a summary. Chains with Video Frame Extractor. Failed images are free.",
    "version": "1.0",
    "x-build-id": "lZtoLbu7daQkeofkD"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kantolabs~image-caption-generator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kantolabs-image-caption-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/kantolabs~image-caption-generator/runs": {
      "post": {
        "operationId": "runs-sync-kantolabs-image-caption-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/kantolabs~image-caption-generator/run-sync": {
      "post": {
        "operationId": "run-sync-kantolabs-image-caption-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": "Direct links to images (JPG, PNG, WEBP, GIF, BMP, TIFF), one per line: your shop or CMS, S3/R2/GCS, a CDN, an Apify key-value store, Dropbox or Google Drive share links (anyone with the link). Pages of social platforms (Instagram, Pinterest, X, Facebook...) are refused. Remove the two sample photos to caption only your own.",
            "default": [
              "https://api.apify.com/v2/key-value-stores/aXcXwfChlioPWAUJv/records/sample-caption-football.jpg?signature=1JgTIIzZ1d7YgA9U3N97u",
              "https://api.apify.com/v2/key-value-stores/aXcXwfChlioPWAUJv/records/sample-caption-desk.jpg?signature=1IcPS7TS1OJG5tN2OfzIh"
            ],
            "items": {
              "type": "string"
            }
          },
          "videoUrls": {
            "title": "Video URLs (optional)",
            "type": "array",
            "description": "Direct links to video files (MP4, MOV, WEBM, MKV...). Frames are looked at every few seconds, frames that look like the last captioned one are skipped for free, and the rest are captioned. You also get a timed scene list and a one-paragraph video summary. YouTube, TikTok, Instagram, Vimeo... links are refused.",
            "items": {
              "type": "string"
            }
          },
          "datasetId": {
            "title": "Dataset with images (optional)",
            "type": "string",
            "description": "Chain from Kanto Labs Video Frame Extractor (its frames are captioned with their timestamps, plus a summary per video) or pick any dataset whose rows have an image link in `imageUrl` or `url`."
          },
          "detailLevel": {
            "title": "Detailed caption length",
            "enum": [
              "detailed",
              "paragraph"
            ],
            "type": "string",
            "description": "Length of `detailedCaption`. `detailed` = up to 3 sentences (most reliable). `paragraph` = up to 5 sentences with more about clothing, colours and background; later sentences are more often guesses. Same price.",
            "default": "detailed"
          },
          "altTextMaxLength": {
            "title": "Alt text max length (characters)",
            "minimum": 60,
            "maximum": 250,
            "type": "integer",
            "description": "Alt text is shortened to this many characters at a natural break. 125 is the common accessibility guideline for screen readers.",
            "default": 125
          },
          "includeTags": {
            "title": "Include keyword tags",
            "type": "boolean",
            "description": "Add `tags`: keywords taken from the description (objects, people, places, colours) for search, filters and SEO.",
            "default": true
          },
          "readImageText": {
            "title": "Also read text in the image (OCR)",
            "type": "boolean",
            "description": "Add `imageText` with the text written in the image (slides, screenshots, posters, packaging). Same price, slower.",
            "default": false
          },
          "frameIntervalSeconds": {
            "title": "Video: look at a frame every (seconds)",
            "minimum": 0.5,
            "maximum": 600,
            "type": "number",
            "description": "How often a video frame is looked at. Only frames that look different from the last captioned frame are captioned (and charged), so 1-2 s catches every scene without paying for repeats.",
            "default": 2
          },
          "skipSimilarFrames": {
            "title": "Video: skip frames that look the same",
            "type": "boolean",
            "description": "Skip (free) frames that look like the last captioned frame. Turn off to caption every frame at the chosen interval.",
            "default": true
          },
          "maxSecondsBetweenCaptions": {
            "title": "Video: caption at least every (seconds)",
            "minimum": 1,
            "maximum": 3600,
            "type": "integer",
            "description": "Even when the picture does not change, caption a frame at least this often, so long static shots still appear in the timeline.",
            "default": 30
          },
          "maxFramesPerVideo": {
            "title": "Video: max captioned frames per video",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Upper limit of captioned (charged) frames per video, also for Video Frame Extractor datasets. Caps the cost of one video at this many images.",
            "default": 60
          },
          "maxVideoMinutes": {
            "title": "Max video length (minutes)",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "Longer videos are refused (free).",
            "default": 120
          },
          "maxVideoSizeMb": {
            "title": "Max video size (MB)",
            "minimum": 1,
            "maximum": 4000,
            "type": "integer",
            "description": "Larger files are refused (free).",
            "default": 2000
          },
          "downloadTimeoutSecs": {
            "title": "Video download timeout (seconds)",
            "minimum": 10,
            "maximum": 3600,
            "type": "integer",
            "description": "Give up on a video that does not download within this time (free).",
            "default": 600
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}