{
  "name": "PennyOCR - URL to Markdown",
  "nodes": [
    {
      "parameters": {},
      "id": "manual",
      "name": "Run once",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        0,
        0
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.pennyocr.com/v1/ocr/url",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "{\"url\": \"https://pennyocr.com/examples/pdf-to-markdown/sample-invoice.pdf\", \"format\": \"markdown\", \"max_pages\": 1, \"max_cost_usd\": 0.001}",
        "options": {
          "timeout": 120000,
          "response": {
            "response": {
              "responseFormat": "json"
            }
          }
        }
      },
      "id": "ocr",
      "name": "Read document with PennyOCR",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        500,
        0
      ],
      "retryOnFail": false,
      "credentials": {
        "httpHeaderAuth": {
          "name": "PennyOCR API key"
        }
      }
    },
    {
      "parameters": {
        "content": "## Before running\nCreate/select a Header Auth credential: Name = Authorization, Value = Bearer YOUR_PENNYOCR_KEY. Keep the key in credentials, not in this JSON. Run once manually.\n\nThe response has text, page_results and cost_usd. OCR text needs validation before downstream accounting use.\n\n401: correct credentials. 402: check balance/buy credits. 413: reduce size or cap. 429: wait, then retry deliberately. No automatic POST retries are configured.\n\nDownload files and guide: https://pennyocr.com/n8n/",
        "height": 400,
        "width": 560
      },
      "id": "notes",
      "name": "Read before running",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        80,
        240
      ]
    }
  ],
  "connections": {
    "Run once": {
      "main": [
        [
          {
            "node": "Read document with PennyOCR",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1",
    "saveDataSuccessExecution": "none",
    "saveDataErrorExecution": "none"
  },
  "active": false,
  "pinData": {}
}
