{
  "openapi": "3.0.1",
  "info": {
    "title": "Platemark: charts, images and PDFs from JSON",
    "description": "Send JSON, get a finished file: a chart PNG, a social image, or an invoice, quote, receipt, certificate or letter PDF. Each file gets a link.",
    "version": "1.0",
    "x-build-id": "A9mM68gSI8q9uhDMe"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rowhouse~platemark/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rowhouse-platemark",
        "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/rowhouse~platemark/runs": {
      "post": {
        "operationId": "runs-sync-rowhouse-platemark",
        "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/rowhouse~platemark/run-sync": {
      "post": {
        "operationId": "run-sync-rowhouse-platemark",
        "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": {
          "type": {
            "title": "What to make",
            "enum": [
              "chart",
              "image",
              "document"
            ],
            "type": "string",
            "description": "chart: a chart image from numbers. image: a social or link preview image from a template. document: an invoice, quote, receipt, certificate or letter PDF.",
            "default": "chart"
          },
          "data": {
            "title": "Data",
            "type": "object",
            "description": "The content, as JSON.\n\nChart: {\"type\": \"bar\", \"title\": \"...\", \"labels\": [...], \"values\": [...]}. Chart types: bar, horizontal_bar, stacked_bar, line, area, pie, donut. Use \"series\": [{\"name\", \"values\"}] for several lines or bars. Optional: subtitle, source, highlight, theme (light or dark), colors, show_values, and format (number, currency or percent) with currency, locale and decimals.\n\nImage: {\"template\": \"og-image\", \"title\": \"...\", \"subtitle\": \"...\"}. Templates: og-image, og-image-photo, social-post-square, social-post-portrait, quote-card-square, quote-card-story, announcement-story, just-listed-square, just-listed-story, product-card-square, sale-banner-square, video-thumbnail. A slot you leave out keeps its sample text. Photo slots take an https link to a PNG, JPG or GIF under 4 MB. An unknown slot name returns the list of slots.\n\nDocument: {\"document\": \"invoice\", \"from\": {\"name\"}, \"to\": {\"name\"}, \"items\": [{\"description\", \"quantity\", \"unit_price\"}], \"tax\": {\"percent\"}}. Documents: invoice, quote, receipt, certificate (title, recipient, reason, signatures), letter (from, to, subject, body). The sums are done for you and come back in the totals field."
          },
          "format": {
            "title": "File format",
            "enum": [
              "auto",
              "png",
              "svg",
              "pdf"
            ],
            "type": "string",
            "description": "Charts and images come out as png or svg. Documents are always pdf. Auto picks png or pdf.",
            "default": "auto"
          },
          "size": {
            "title": "Size",
            "enum": [
              "auto",
              "landscape",
              "og",
              "square",
              "portrait",
              "story",
              "letter",
              "a4"
            ],
            "type": "string",
            "description": "Charts: landscape 1200x675, og 1200x630, square 1080x1080, portrait 1080x1350 or story 1080x1920. Documents: letter or a4. Images take their size from the template, so leave this on auto.",
            "default": "auto"
          },
          "fileName": {
            "title": "File name",
            "type": "string",
            "description": "Optional name for the file, like june-revenue. Left empty, files are named chart-1.png, document-2.pdf and so on."
          },
          "renders": {
            "title": "More renders",
            "type": "array",
            "description": "Optional. A list of more files to make in the same run, up to 200 in total. Each item is an object with the same fields as above: {\"type\", \"data\", \"format\", \"size\", \"fileName\"}."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}