{
  "name": "ApexApi \u2014 Prompt \u2192 Image \u2192 Post",
  "nodes": [
    {
      "parameters": {
        "content": "## \ud83d\uddbc\ufe0f AI image \u2192 post (ApexApi)\n\nGenerates an image with **any image model through one key**, posts it via Blotato.\n\n### Setup (2 min)\n1. **Install the node:** Settings \u2192 Community Nodes \u2192 Install \u2192 `n8n-nodes-apexapi`\n2. **Get a free API key:** https://apexapi.dev/?ref=n8n-prompt-image-post\n3. **Add the credential:** open the *ApexApi \u2014 Generate Image* node \u2192 create an **ApexApi account** credential \u2192 paste your `ak-` key (turns green when connected).\n4. **Posting:** see the *Social posting with Blotato* sticky.\n\nPowered by ApexApi \u00b7 https://apexapi.dev",
        "height": 420,
        "width": 360
      },
      "id": "aaaa0002-aaaa-aaaa-aaaa-aaaaaaaaaa02",
      "name": "ApexApi setup",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -780,
        -80
      ]
    },
    {
      "parameters": {},
      "id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
      "name": "When clicking Test",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        260,
        300
      ]
    },
    {
      "parameters": {
        "resource": "image",
        "operation": "generate",
        "model": "openai/dall-e-3",
        "prompt": "A cozy isometric coffee shop, warm lighting, soft shadows",
        "options": {
          "size": "1024x1024",
          "n": 1
        }
      },
      "id": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
      "name": "ApexApi \u2014 Generate Image",
      "type": "n8n-nodes-apexapi.apexApi",
      "typeVersion": 1,
      "position": [
        520,
        300
      ],
      "credentials": {
        "apexApiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://backend.blotato.com/v2/posts",
        "sendHeaders": true,
        "specifyHeaders": "keypair",
        "headerParameters": {
          "parameters": [
            {
              "name": "blotato-api-key",
              "value": "YOUR_BLOTATO_API_KEY"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"post\": {\n    \"accountId\": \"YOUR_BLOTATO_ACCOUNT_ID\",\n    \"target\": { \"targetType\": \"instagram\" },\n    \"content\": { \"text\": \"Made with ApexApi\", \"platform\": \"instagram\", \"mediaUrls\": [ {{ JSON.stringify($json.urls[0]) }} ] }\n  }\n}",
        "options": {}
      },
      "id": "cccccccc-cccc-cccc-cccc-cccccccccccc",
      "name": "Publish to Blotato",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        780,
        300
      ],
      "retryOnFail": true,
      "maxTries": 3,
      "waitBetweenTries": 2000
    },
    {
      "parameters": {
        "content": "## \ud83d\udcf2 Social posting with Blotato\n\nThis template publishes the generated image through **Blotato** \u2014 one API that posts to Instagram, X/Twitter, LinkedIn, TikTok, Facebook, Threads, Pinterest & more.\n\n### Setup\n1. Create a Blotato account + API key \u2192 **https://tolt.link/automatelikecrazy**\n2. Settings \u2192 API keys \u2192 copy your key into the **blotato-api-key** header on the *Publish to Blotato* node.\n3. Set `accountId` and `targetType` (e.g. `instagram`, `twitter`) in the request body. The generated image URL is passed automatically in `mediaUrls`.\n\nDocs: help.blotato.com/api \u00b7 Get Blotato \u2192 **https://tolt.link/automatelikecrazy**",
        "height": 320,
        "width": 420,
        "color": 4
      },
      "id": "sticky-blotato",
      "name": "Social posting with Blotato",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        720,
        0
      ]
    }
  ],
  "connections": {
    "When clicking Test": {
      "main": [
        [
          {
            "node": "ApexApi \u2014 Generate Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ApexApi \u2014 Generate Image": {
      "main": [
        [
          {
            "node": "Publish to Blotato",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {},
  "active": false
}