ComfyUI Node
API Custom Request
Custom synchronous JSON APIs. Templates: {{prompt}}, {{model}}, {{images}}, {{images_base64}}. Result path uses JSON Pointer. / 自定义同步 JSON 接口。支持提示词、模型、多图模板及结果路径。异步任务请按平台文档另行查询。
API Custom Request
- connection
- image_set
- options
- result
- response_json
◄method▾►
◄endpointchat/completions►
◄model►
◄prompt►
◄body_json{"model":"{{model}}","messages":[{"role":"user","content":"{{prompt}}"}]}►
◄result_path/choices/0/message/content►
◄run_id0►
CategorySimple API/Advanced
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| connection | SA_CONNECTION | — | |
| method | COMBO | 2 options: POST, GET | |
| endpoint | STRING | chat/completions | — |
| model | STRING | Model ID from your provider; any supported ID is allowed. / 填写平台提供的模型名。 | |
| prompt | STRING | Write your request or connect a text output. / 输入要求,也可连接文本输出。 | |
| body_json | STRING | {"model":"{{model}}","messages":[{"role":"user","content":"{{prompt}}"}]} | — |
| result_path | STRING | /choices/0/message/content | Empty = entire JSON; e.g. /data/0/url. / 留空输出全部 JSON。 |
| run_id | INT | 00–2147483647 | Change this value to request again with identical inputs. / 相同输入再次请求时,更改此数值。 |
| image_setopt | SA_IMAGES | — | |
| optionsopt | SA_OPTIONS | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| result | STRING | — |
| response_json | STRING | — |