Skip to content

Commit 2156ce9

Browse files
add comment about using api key in headless (Comfy-Org#8082)
1 parent 4136502 commit 2156ce9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

script_examples/basic_api_example.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,14 @@
101101

102102
def queue_prompt(prompt):
103103
p = {"prompt": prompt}
104+
105+
# If the workflow contains API nodes, you can add a Comfy API key to the `extra_data`` field of the payload.
106+
# p["extra_data"] = {
107+
# "api_key_comfy_org": "comfyui-87d01e28d*******************************************************" # replace with real key
108+
# }
109+
# See: https://docs.comfy.org/tutorials/api-nodes/overview
110+
# Generate a key here: https://platform.comfy.org/login
111+
104112
data = json.dumps(p).encode('utf-8')
105113
req = request.Request("http://127.0.0.1:8188/prompt", data=data)
106114
request.urlopen(req)

0 commit comments

Comments
 (0)