{
  "id": "55631424-52b5-4546-98b5-3c2fa0803ed2",
  "revision": 0,
  "last_node_id": 4,
  "last_link_id": 2,
  "nodes": [
    {
      "id": 1,
      "type": "SpicyAPI_alibaba_z_image_turbo_text_to_image",
      "pos": [
        30,
        100
      ],
      "size": [
        410,
        380
      ],
      "flags": {},
      "order": 0,
      "mode": 0,
      "inputs": [
        {
          "name": "prompt",
          "type": "STRING",
          "widget": {
            "name": "prompt"
          },
          "link": null
        },
        {
          "name": "aspect_ratio",
          "type": "COMBO",
          "widget": {
            "name": "aspect_ratio"
          },
          "link": null
        },
        {
          "name": "enable_prompt_expansion",
          "type": "BOOLEAN",
          "widget": {
            "name": "enable_prompt_expansion"
          },
          "link": null
        },
        {
          "name": "output_format",
          "type": "COMBO",
          "widget": {
            "name": "output_format"
          },
          "link": null
        },
        {
          "name": "seed",
          "type": "INT",
          "widget": {
            "name": "seed"
          },
          "link": null
        }
      ],
      "outputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "links": [
            1
          ]
        },
        {
          "name": "task id",
          "type": "STRING",
          "links": null
        }
      ],
      "title": "1 \u00b7 Write your image prompt (required)",
      "properties": {
        "Node name for S&R": "SpicyAPI_alibaba_z_image_turbo_text_to_image"
      },
      "widgets_values": [
        "",
        "3:4",
        false,
        "png",
        42,
        "fixed"
      ],
      "widgets_values_named": {
        "prompt": "",
        "aspect_ratio": "3:4",
        "enable_prompt_expansion": false,
        "output_format": "png",
        "seed": 42,
        "control_after_generate": "fixed"
      }
    },
    {
      "id": 2,
      "type": "SpicyAPI_spicyapi_image_upscaler_v1_upscale",
      "pos": [
        530,
        100
      ],
      "size": [
        410,
        380
      ],
      "flags": {},
      "order": 1,
      "mode": 0,
      "inputs": [
        {
          "name": "image_url",
          "type": "IMAGE",
          "link": 1
        },
        {
          "name": "resolution",
          "type": "COMBO",
          "widget": {
            "name": "resolution"
          },
          "link": null
        },
        {
          "name": "output_format",
          "type": "COMBO",
          "widget": {
            "name": "output_format"
          },
          "link": null
        }
      ],
      "outputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "links": [
            2
          ]
        },
        {
          "name": "task id",
          "type": "STRING",
          "links": null
        }
      ],
      "title": "2 \u00b7 Upscale the generated image",
      "properties": {
        "Node name for S&R": "SpicyAPI_spicyapi_image_upscaler_v1_upscale"
      },
      "widgets_values": [
        "4K",
        "PNG"
      ],
      "widgets_values_named": {
        "resolution": "4K",
        "output_format": "PNG"
      }
    },
    {
      "id": 3,
      "type": "SaveImage",
      "pos": [
        1030,
        100
      ],
      "size": [
        330,
        270
      ],
      "flags": {},
      "order": 2,
      "mode": 0,
      "inputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "link": 2
        },
        {
          "name": "filename_prefix",
          "type": "STRING",
          "widget": {
            "name": "filename_prefix"
          },
          "link": null
        }
      ],
      "outputs": [],
      "title": "Save image to ComfyUI/output",
      "properties": {
        "Node name for S&R": "SaveImage"
      },
      "widgets_values": [
        "spicyapi/generated-upscaled"
      ]
    },
    {
      "id": 4,
      "type": "Note",
      "pos": [
        530,
        -270
      ],
      "size": [
        430,
        300
      ],
      "flags": {},
      "order": 3,
      "mode": 0,
      "inputs": [],
      "outputs": [],
      "title": "Setup before running",
      "properties": {
        "Node name for S&R": "Note"
      },
      "widgets_values": [
        "Install comfyui-spicyapi 0.1.2. In Settings > SpicyAPI add your key and set a positive Max cost per run, for example $0.05 per model node. This graph has TWO separately quoted tasks: Z-Image Turbo generation, then Image Upscaler. With a $0.05 per-node limit its maximum is $0.10 for one queued graph.\n\nFill the blank generation prompt before running. Example: An adult fictional character in a velvet evening dress beside a piano, amber lamp light, fashion photography. One 3:4 PNG is generated with prompt expansion off and seed 42 fixed. The IMAGE output is uploaded to the upscaler automatically, enlarged to the 4K pixel tier, and saved locally by Save Image.\n\n4K is the upscaler\u2019s pixel budget with the image\u2019s aspect ratio kept, not exactly 3840\u00d72160. If generation succeeds but upscaling fails, the generation charge remains. The graph does not loop; queueing new work can add new charges. A stop ends waiting, not the accepted job."
      ]
    }
  ],
  "links": [
    [
      1,
      1,
      0,
      2,
      0,
      "IMAGE"
    ],
    [
      2,
      2,
      0,
      3,
      0,
      "IMAGE"
    ]
  ],
  "groups": [],
  "config": {},
  "extra": {
    "spicyapi": {
      "models": [
        "alibaba/z-image-turbo/text-to-image",
        "spicyapi/image-upscaler-v1/upscale"
      ],
      "plugin": "comfyui-spicyapi",
      "pluginVersion": "0.1.2",
      "setup": "Configure the API key and a positive per-node cost limit in Settings > SpicyAPI, then fill the blank required inputs. No key is stored in this workflow."
    }
  },
  "version": 0.4
}
