{
  "openapi": "3.0.1",
  "info": {
    "title": "Diagram Renderer: Mermaid, PlantUML, Graphviz, LaTeX to PNG/SVG",
    "description": "Render Mermaid diagrams, PlantUML, Graphviz DOT graphs, Vega-Lite and Vega charts, and LaTeX math to PNG, SVG or PDF files. Built for AI agents and automations: send the code, get a download link, or the exact error message to fix the code.",
    "version": "0.1",
    "x-build-id": "kpccSKWq6kCYo6AbG"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jumblemog~diagram-renderer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jumblemog-diagram-renderer",
        "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/jumblemog~diagram-renderer/runs": {
      "post": {
        "operationId": "runs-sync-jumblemog-diagram-renderer",
        "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/jumblemog~diagram-renderer/run-sync": {
      "post": {
        "operationId": "run-sync-jumblemog-diagram-renderer",
        "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": {
          "code": {
            "title": "Diagram code",
            "type": "string",
            "description": "Mermaid (flowchart, sequence, class, state, ER, Gantt, pie, mindmap, timeline and more), PlantUML (@startuml ... @enduml), Graphviz DOT, a Vega-Lite or Vega JSON spec, or LaTeX math. The kind is detected automatically, and code inside Markdown fences (```mermaid ... ```) is fine."
          },
          "diagrams": {
            "title": "More diagrams (batch)",
            "type": "array",
            "description": "A list of diagrams to render in the same run. Each entry is a code string, or an object with \"code\" and optionally \"name\", \"type\", \"format\", \"theme\" and \"background\", which override the settings below for that diagram."
          },
          "type": {
            "title": "Diagram type",
            "enum": [
              "auto",
              "mermaid",
              "plantuml",
              "graphviz",
              "vegalite",
              "vega",
              "math"
            ],
            "type": "string",
            "description": "auto detects the kind of code. Set it when detection guesses wrong.",
            "default": "auto"
          },
          "format": {
            "title": "File format",
            "enum": [
              "png",
              "svg",
              "pdf"
            ],
            "type": "string",
            "description": "png for documents, chats and slides; svg for sharp scaling on the web; pdf for print and reports.",
            "default": "png"
          },
          "theme": {
            "title": "Theme",
            "enum": [
              "default",
              "dark",
              "forest",
              "neutral",
              "base"
            ],
            "type": "string",
            "description": "Mermaid theme (base is the one to customize with themeVariables in the Mermaid configuration). dark also gives Vega and Vega-Lite charts and LaTeX math a dark style. PlantUML uses !theme in its own code.",
            "default": "default"
          },
          "background": {
            "title": "Background",
            "type": "string",
            "description": "white, transparent, a color name such as lightgray, or a hex color such as #f5f5f5. Leave it empty for the theme's own background: white, or dark gray with the dark theme. Applies to PNG, SVG and PDF."
          },
          "scale": {
            "title": "PNG scale",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "Pixel density of PNG files: 2 (default) is sharp on high-resolution screens, 1 gives smaller files, 4 suits print.",
            "default": 2
          },
          "graphvizEngine": {
            "title": "Graphviz layout engine",
            "enum": [
              "dot",
              "neato",
              "fdp",
              "sfdp",
              "circo",
              "twopi"
            ],
            "type": "string",
            "description": "dot for hierarchies and flows (default), neato and fdp for undirected networks, sfdp for very large graphs, circo for circles, twopi for radial layouts.",
            "default": "dot"
          },
          "mermaidConfig": {
            "title": "Mermaid configuration",
            "type": "object",
            "description": "Extra Mermaid settings, for example {\"fontFamily\": \"Arial\", \"flowchart\": {\"curve\": \"linear\"}} or {\"theme\": \"base\", \"themeVariables\": {\"primaryColor\": \"#ffcc00\"}}. The security level always stays strict."
          },
          "includeSvg": {
            "title": "Include SVG markup in results",
            "type": "boolean",
            "description": "Also put the SVG code of each diagram into its dataset item, for embedding directly in a web page or document.",
            "default": false
          },
          "maxDiagrams": {
            "title": "Maximum diagrams",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many diagrams, so the cost of a run stays predictable.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}