Post Request Node
Send JSON to any endpoint without leaving ComfyUI
- headers
- text
- file
- json
- any
The Post Request Node is the "send some JSON and get an answer" workhorse of this pack. You type a URL, type a request body, and it fires a POST with Content-Type: application/json, then hands back the response as text, bytes, and parsed JSON. It's the node you use when your pipeline has to talk to your own server, a local tool like an RVC voice-conversion service, or any API that expects a JSON payload.
It's part of ComfyUI-HttpRequestNodes, ahkimkoo's fork of felixszeto's ComfyUI-RequestNodes. Think of the whole pack as HTTP plumbing: it doesn't run models or hold keys, it just moves data in and out of your graph. This node handles the plain-JSON case; the same pack has a Binary Post Request Node for raw audio/video bytes and a Rest Api Node if you need every method plus retries.
What you actually set
Only two inputs are required: target_url and request_body (a multiline text box, default {}). The body is parsed as JSON and sent as the request payload. Two optional inputs do the heavy lifting:
headers(KEY_VALUE) - extra headers merged over the defaultContent-Type: application/json. Auth tokens live here.str0throughstr9- ten free-form string inputs that act as fill-in-the-blank slots. Anywhere yourrequest_bodycontains__str0__, that token gets replaced with the value you wired in. So you can template one body and swap values per run instead of editing JSON by hand.
Outputs are text (raw response string), file (response as bytes), json (parsed), and any (raw bytes as a wildcard).
The gotchas
Two things in this node are worth knowing before they bite. First, if request_body isn't valid JSON, the node doesn't error - it silently sends {"error": "Invalid JSON in request_body"} to the server. A malformed body becomes a working request that your API will reject with confusion on both ends. Second, unlike the Get node in this pack, file here is an io.BytesIO object, not raw bytes - feed the any output (raw bytes) into the pack's Blob-To-* decoders instead if you're round-tripping binary.
The str0–str9 placeholders are the most underrated part. Pair the node with a Key/Value Node feeding headers, and you can reuse one POST node across a whole workflow with per-run values.
Install
ComfyUI Manager → search ComfyUI-HttpRequestNodes → Install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/ahkimkoo/ComfyUI-HttpRequestNodes
pip install soundfile imageio imageio-ffmpeg
It shows up under RequestNode/Post Request. No model downloads, and the only real dependencies are the three pip packages above (soundfile, imageio, imageio-ffmpeg) - those matter for the audio/video nodes, not this one. If your requests time out on long-running jobs, note that plain Post doesn't set a generous timeout the way the binary and media nodes do; the Rest Api Node is the better bet for big slow endpoints.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| target_url | STRING | https://example.com/api | — |
| request_body | STRING | {} | — |
| headersopt | KEY_VALUE | — | |
| str0opt | STRING | — | |
| str1opt | STRING | — | |
| str2opt | STRING | — | |
| str3opt | STRING | — | |
| str4opt | STRING | — | |
| str5opt | STRING | — | |
| str6opt | STRING | — | |
| str7opt | STRING | — | |
| str8opt | STRING | — | |
| str9opt | STRING | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |
| file | BYTES | — |
| json | JSON | — |
| any | ANY | — |