{
  "name": "Generate AI videos from text in n8n (PixelFireman API)",
  "nodes": [
    {
      "parameters": {
        "content": "## Text to video with PixelFireman\n\nType a prompt, get a short (~5s) AI video clip back. Economy $0.30, Standard $0.60, Premium $1.50 a clip. Prepaid credits that never expire, failed renders never billed.\n\n### Setup (1 minute)\n1. Get a free API key at **https://pixelfireman.com/account**\n2. Open the **PixelFireman API** node and replace `YOUR_PIXELFIREMAN_API_KEY` with your key (`pf_live_...`).\n3. Run it, type a prompt, pick a tier and aspect, and a clip URL comes back.\n\nNote: Economy and Standard usually return the clip directly. Premium (Kling) may return a poll job id instead.\n\nDocs: https://pixelfireman.com/docs",
        "height": 400,
        "width": 420,
        "color": 4
      },
      "id": "c1b2c3d4-0001-4000-8000-000000000001",
      "name": "Read me first",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [-220, -60]
    },
    {
      "parameters": {
        "formTitle": "Generate an AI video",
        "formDescription": "Type a prompt and get a short AI video clip from the PixelFireman API.",
        "formFields": {
          "values": [
            { "fieldLabel": "Prompt", "fieldType": "text", "placeholder": "neon city street at night, slow dolly shot", "requiredField": true },
            { "fieldLabel": "Tier", "fieldType": "dropdown", "fieldOptions": { "values": [ { "option": "economy" }, { "option": "standard" }, { "option": "premium" } ] }, "requiredField": true },
            { "fieldLabel": "Aspect", "fieldType": "dropdown", "fieldOptions": { "values": [ { "option": "9:16" }, { "option": "1:1" }, { "option": "16:9" } ] }, "requiredField": true }
          ]
        },
        "options": {}
      },
      "id": "c1b2c3d4-0002-4000-8000-000000000002",
      "name": "On form submit",
      "type": "n8n-nodes-base.formTrigger",
      "typeVersion": 2.2,
      "position": [280, 0],
      "webhookId": "pixelfireman-video-form"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://pixelfireman.com/v1/videos",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            { "name": "Authorization", "value": "Bearer YOUR_PIXELFIREMAN_API_KEY" },
            { "name": "Content-Type", "value": "application/json" }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"prompt\": {{ JSON.stringify($json.Prompt) }},\n  \"tier\": {{ JSON.stringify($json.Tier) }},\n  \"aspect\": {{ JSON.stringify($json.Aspect) }}\n}",
        "options": {}
      },
      "id": "c1b2c3d4-0003-4000-8000-000000000003",
      "name": "PixelFireman API",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [560, 0]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            { "id": "f1", "name": "videoUrl", "value": "={{ $json.video }}", "type": "string" },
            { "id": "f2", "name": "pollJob", "value": "={{ $json.poll || '' }}", "type": "string" },
            { "id": "f3", "name": "minutesUsed", "value": "={{ $json.minutesUsed }}", "type": "number" }
          ]
        },
        "options": {}
      },
      "id": "c1b2c3d4-0004-4000-8000-000000000004",
      "name": "Video + usage",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [840, 0]
    }
  ],
  "connections": {
    "On form submit": { "main": [[{ "node": "PixelFireman API", "type": "main", "index": 0 }]] },
    "PixelFireman API": { "main": [[{ "node": "Video + usage", "type": "main", "index": 0 }]] }
  },
  "pinData": {},
  "settings": { "executionOrder": "v1" },
  "meta": {
    "templateCredsSetupCompleted": false,
    "description": "Generate a short AI video clip from a text prompt using the PixelFireman text to video API. Three tiers from $0.30 a clip, prepaid credits that never expire, failed renders never billed. One POST to /v1/videos returns a clip URL (Premium may return a poll job)."
  }
}
