{
  "openapi": "3.0.1",
  "info": {
    "title": "OG Image Generator API — Social Preview Images from Templates",
    "description": "Generate Open Graph, Twitter/X, LinkedIn, Instagram and Pinterest images from 8 templates or your own HTML/CSS with {{variables}}. Batch hundreds per run, emoji and any language (CJK, Arabic, Cyrillic), PNG/JPEG/WebP, public URLs. Pay per image.",
    "version": "1.0",
    "x-build-id": "eLM5BKIf6Aow6tPRx"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/reverend_sal~og-image-generator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-reverend_sal-og-image-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/reverend_sal~og-image-generator/runs": {
      "post": {
        "operationId": "runs-sync-reverend_sal-og-image-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/reverend_sal~og-image-generator/run-sync": {
      "post": {
        "operationId": "run-sync-reverend_sal-og-image-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": {
          "template": {
            "title": "Template",
            "enum": [
              "blog-post",
              "product",
              "minimal",
              "gradient",
              "github-repo",
              "quote",
              "photo",
              "event"
            ],
            "type": "string",
            "description": "Design to render. Every template adapts to landscape, square and portrait sizes. Ignored when you provide custom HTML.",
            "default": "blog-post"
          },
          "title": {
            "title": "Title",
            "type": "string",
            "description": "Main text. Long titles shrink to fit; anything that still does not fit ends with \"…\". Emoji and any language work."
          },
          "subtitle": {
            "title": "Subtitle",
            "type": "string",
            "description": "Secondary text under the title (description, excerpt, location…)."
          },
          "eyebrow": {
            "title": "Label",
            "type": "string",
            "description": "Short label above the title: category, \"New\", event type, or the repository owner on the code repository template."
          },
          "author": {
            "title": "Author name",
            "type": "string",
            "description": "Shown with the avatar (or the author's initials when there is no avatar)."
          },
          "authorTitle": {
            "title": "Author role",
            "type": "string",
            "description": "Shown under the author name, e.g. \"Staff Engineer\"."
          },
          "avatarUrl": {
            "title": "Avatar image URL",
            "type": "string",
            "description": "Round author photo. http(s) or data:image URL; PNG, JPEG, WebP, GIF, AVIF or SVG."
          },
          "siteName": {
            "title": "Site / brand name",
            "type": "string",
            "description": "Shown next to the logo."
          },
          "logoUrl": {
            "title": "Logo image URL",
            "type": "string",
            "description": "Brand logo (transparent PNG or SVG works best)."
          },
          "date": {
            "title": "Date",
            "type": "string",
            "description": "Free text, shown as you write it, e.g. \"Oct 27, 2026\" or \"Thu 18:00 CET\"."
          },
          "imageUrl": {
            "title": "Main image URL",
            "type": "string",
            "description": "Product photo (product), side image (blog post) or speaker photo (event)."
          },
          "backgroundImageUrl": {
            "title": "Background image URL",
            "type": "string",
            "description": "Full-bleed background. On the photo template the text sits on a dark fade; on others the image is tinted with the background color so text stays readable."
          },
          "price": {
            "title": "Price",
            "type": "string",
            "description": "Product template: price text, e.g. \"$49\" or \"€19.90\"."
          },
          "ctaText": {
            "title": "Button text",
            "type": "string",
            "description": "Product and event templates: call-to-action button, e.g. \"Shop now\" or \"Register\"."
          },
          "tags": {
            "title": "Tags",
            "type": "array",
            "description": "Up to 6 short tags (blog post and code repository templates).",
            "items": {
              "type": "string"
            }
          },
          "stats": {
            "title": "Stats",
            "type": "array",
            "description": "Code repository template: up to 4 numbers, e.g. [{\"value\": \"12.4k\", \"label\": \"stars\"}, {\"value\": \"TypeScript\"}]."
          },
          "theme": {
            "title": "Theme",
            "enum": [
              "auto",
              "light",
              "dark"
            ],
            "type": "string",
            "description": "Light or dark variant of the template's palette (auto = the template's own default).",
            "default": "auto"
          },
          "accentColor": {
            "title": "Accent color",
            "type": "string",
            "description": "Highlights, buttons, gradient color 1. Example: \"#7c3aed\"."
          },
          "secondaryColor": {
            "title": "Secondary color",
            "type": "string",
            "description": "Gradient color 2 and secondary decoration."
          },
          "backgroundColor": {
            "title": "Background color",
            "type": "string",
            "description": "Page background. The text color switches to light or dark automatically unless you set it."
          },
          "textColor": {
            "title": "Text color",
            "type": "string",
            "description": "Main text color."
          },
          "fontFamily": {
            "title": "Font",
            "type": "string",
            "description": "Built in: Inter, Space Grotesk, Manrope, Outfit, Playfair Display, DM Serif Display, JetBrains Mono, Noto Sans. Any other Google Fonts family name (e.g. \"Lobster\", \"Roboto Slab\") is downloaded automatically. Unknown names fall back to the template font with a warning."
          },
          "headingFontFamily": {
            "title": "Title font",
            "type": "string",
            "description": "Optional separate font for the title (same rules as Font)."
          },
          "size": {
            "title": "Size",
            "enum": [
              "og",
              "twitter",
              "linkedin",
              "facebook",
              "instagram-square",
              "instagram-portrait",
              "instagram-story",
              "pinterest",
              "youtube-thumbnail"
            ],
            "type": "string",
            "description": "Output size preset. Width/height below override it.",
            "default": "og"
          },
          "width": {
            "title": "Custom width (px)",
            "minimum": 100,
            "maximum": 4096,
            "type": "integer",
            "description": "Overrides the preset width. 100–4096."
          },
          "height": {
            "title": "Custom height (px)",
            "minimum": 100,
            "maximum": 4096,
            "type": "integer",
            "description": "Overrides the preset height. 100–4096."
          },
          "scale": {
            "title": "Pixel density",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "2 or 3 renders a sharper (retina) image with 2× or 3× the pixels per side.",
            "default": 1
          },
          "format": {
            "title": "Format",
            "enum": [
              "png",
              "jpeg",
              "webp"
            ],
            "type": "string",
            "description": "PNG (lossless, default), JPEG (smallest for photos) or WebP (small, sharp).",
            "default": "png"
          },
          "quality": {
            "title": "JPEG/WebP quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "1–100. Ignored for PNG.",
            "default": 90
          },
          "fileName": {
            "title": "File name",
            "maxLength": 120,
            "type": "string",
            "description": "Optional readable part of the saved file's key, e.g. \"launch-post\". Keys always start with og-<index> and end with a short hash, so names never collide. Usually set per item in a batch."
          },
          "items": {
            "title": "Batch items",
            "type": "array",
            "description": "One image per item. Each item can set any field above (title, template, colors, size, html…); missing fields come from the fields above. Plain strings are used as titles: [\"Post one\", \"Post two\"]. Up to 10,000 per run."
          },
          "html": {
            "title": "Custom HTML",
            "type": "string",
            "description": "Your own design instead of a template. {{name}} is replaced with the HTML-escaped value of any field or variable (e.g. {{title}}), {{{name}}} inserts it unescaped. Built-in fonts, emoji and CJK/Arabic fallbacks are available; external images and stylesheets load too."
          },
          "css": {
            "title": "Custom CSS",
            "type": "string",
            "description": "Extra CSS added to your HTML."
          },
          "variables": {
            "title": "Variables",
            "type": "object",
            "description": "Extra {{variables}} for the custom HTML, e.g. {\"price\": \"$9\", \"badge\": \"NEW\"}. Items can override them."
          },
          "enableJavaScript": {
            "title": "Run JavaScript in custom HTML",
            "type": "boolean",
            "description": "Off by default (faster, and pages cannot change themselves). Turn on if your HTML needs scripts to draw, e.g. charts.",
            "default": false
          },
          "lang": {
            "title": "Language tag",
            "type": "string",
            "description": "Optional BCP 47 tag (e.g. \"ja\", \"ar\") for language-specific line breaking."
          },
          "maxConcurrency": {
            "title": "Parallel renders",
            "minimum": 0,
            "maximum": 16,
            "type": "integer",
            "description": "Pages rendered at once. 0 = automatic from the run memory.",
            "default": 0
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}