{
  "openapi": "3.0.1",
  "info": {
    "title": "Gerber Viewer API: PCB Render (PNG, SVG) & Board Report",
    "description": "Turn Gerber and Excellon drill files into realistic PCB pictures (top and bottom, PNG and SVG) and a board report: size, copper layers, which file is which layer, drill table, narrowest trace and missing-file warnings. Reads KiCad, Eagle, Altium, EasyEDA, Fusion 360, OrCAD and more.",
    "version": "0.1",
    "x-build-id": "hyR65EyTB2IROXclb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jumblemog~gerber-pcb-renderer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jumblemog-gerber-pcb-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~gerber-pcb-renderer/runs": {
      "post": {
        "operationId": "runs-sync-jumblemog-gerber-pcb-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~gerber-pcb-renderer/run-sync": {
      "post": {
        "operationId": "run-sync-jumblemog-gerber-pcb-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": {
          "gerberUrls": {
            "title": "Links to Gerber ZIPs",
            "type": "array",
            "description": "Links to ZIP archives of Gerber and drill files, one board per ZIP, as you would send to a PCB fab. GitHub folder and file links, Google Drive and Dropbox share links work. Links to single Gerber files are read together as one board. Write `example` to try the built-in example board.",
            "items": {
              "type": "string"
            }
          },
          "uploads": {
            "title": "Upload Gerber ZIPs",
            "type": "array",
            "description": "Upload ZIP archives (one board each) or a board's loose Gerber and drill files from your computer."
          },
          "sides": {
            "title": "Sides to draw",
            "enum": [
              "both",
              "top",
              "bottom"
            ],
            "type": "string",
            "description": "The bottom is drawn mirrored, as you see it when you turn the board over.",
            "default": "both"
          },
          "outputs": {
            "title": "Picture formats",
            "type": "array",
            "description": "PNG for previews, quotes and chat; SVG to zoom without limit or edit. The price per board is the same whatever you pick.",
            "items": {
              "type": "string",
              "enum": [
                "png",
                "svg"
              ],
              "enumTitles": [
                "PNG image",
                "SVG (vector)"
              ]
            },
            "default": [
              "png"
            ]
          },
          "imageWidth": {
            "title": "PNG width (pixels)",
            "minimum": 200,
            "maximum": 6000,
            "type": "integer",
            "description": "Width of the PNG pictures. The height follows the board's shape.",
            "default": 1600
          },
          "maskColor": {
            "title": "Solder mask color",
            "enum": [
              "green",
              "red",
              "blue",
              "black",
              "matte-black",
              "white",
              "yellow",
              "purple"
            ],
            "type": "string",
            "description": "The solder mask color to draw the board in, as fabs offer them.",
            "default": "green"
          },
          "finish": {
            "title": "Surface finish",
            "enum": [
              "hasl",
              "enig",
              "bare-copper"
            ],
            "type": "string",
            "description": "The color of exposed pads.",
            "default": "hasl"
          },
          "silkColor": {
            "title": "Silkscreen color",
            "enum": [
              "auto",
              "white",
              "black"
            ],
            "type": "string",
            "description": "The color of the printed legend.",
            "default": "auto"
          },
          "layerMap": {
            "title": "Layer of each file (optional)",
            "type": "object",
            "description": "Only when a file's layer isn't recognized from its name: map file names to layers, such as {\"board.g2\": \"inner 1 copper\", \"cut.gbr\": \"outline\", \"notes.gbr\": \"ignore\"}. Layers: top or bottom copper, mask, silk or paste; inner 1 copper and so on; outline; drill plated; drill non-plated; ignore."
          },
          "maxBoards": {
            "title": "Maximum boards",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Stop after this many boards.",
            "default": 50
          },
          "timeoutSecs": {
            "title": "Time limit per board (seconds)",
            "minimum": 10,
            "maximum": 900,
            "type": "integer",
            "description": "A board that takes longer to read and draw is reported as failed and not charged.",
            "default": 120
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}