ComfyUI
ComfyUI copied to clipboard
Unauthorized while using FluxKontextProImageNode in API prompt
Custom Node Testing
- [x] I have tried disabling custom nodes and the issue persists (see how to disable custom nodes if you need help)
Your question
We got Unauthorized error while using FluxKontextProImageNode in our API prompt, please help.
The error:
[
"execution_error",
{
"prompt_id": "c23a1a8b-b6bd-4b1b-97e8-e81da43b6ea8",
"node_id": "13",
"node_type": "FluxKontextProImageNode",
"executed": [
"3",
"8",
"1",
"6",
"15",
"12",
"9",
"5",
"11"
],
"exception_message": "Unauthorized: Please login first to use this node.\n",
"exception_type": "Exception",
"traceback": [
" File \"/data/comfy/ComfyUI/execution.py\", line 496, in execute\n output_data, output_ui, has_subgraph, has_pending_tasks = await get_output_data(prompt_id, unique_id, obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, hidden_inputs=hidden_inputs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
" File \"/data/comfy/ComfyUI/execution.py\", line 315, in get_output_data\n return_values = await _async_map_node_over_list(prompt_id, unique_id, obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, hidden_inputs=hidden_inputs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
" File \"/data/comfy/ComfyUI/execution.py\", line 289, in _async_map_node_over_list\n await process_inputs(input_dict, i)\n",
" File \"/data/comfy/ComfyUI/execution.py\", line 271, in process_inputs\n result = task.result()\n ^^^^^^^^^^^^^\n",
" File \"/data/comfy/ComfyUI/execution.py\", line 266, in async_wrapper\n return await f(**args)\n ^^^^^^^^^^^^^^^\n",
" File \"/data/comfy/ComfyUI/comfy_api_nodes/nodes_bfl.py\", line 402, in api_call\n output_image = await handle_bfl_synchronous_operation(operation, node_id=unique_id)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
" File \"/data/comfy/ComfyUI/comfy_api_nodes/nodes_bfl.py\", line 53, in handle_bfl_synchronous_operation\n response_api: BFLFluxProGenerateResponse = await operation.execute()\n ^^^^^^^^^^^^^^^^^^^^^^^^^\n",
" File \"/data/comfy/ComfyUI/comfy_api_nodes/apis/client.py\", line 741, in execute\n response_json = await client.request(\n ^^^^^^^^^^^^^^^^^^^^^\n",
" File \"/data/comfy/ComfyUI/comfy_api_nodes/apis/client.py\", line 348, in request\n self._check_auth(self.auth_token, self.comfy_api_key)\n",
" File \"/data/comfy/ComfyUI/comfy_api_nodes/apis/client.py\", line 462, in _check_auth\n raise Exception(\"Unauthorized: Please login first to use this node.\")\n"
],
"current_inputs": {
"prompt": [
""
],
"aspect_ratio": [
"9:16"
],
"guidance": [
3.0
],
"steps": [
150
],
"seed": [
834343082591867
],
"prompt_upsampling": [
false
],
"input_image": [
"tensor([[[[0.0000, 0.0000, 0.0000],\n [0.0000, 0.0000, 0.0000],\n [0.0000, 0.0000, 0.0000],\n ...,\n [0.0000, 0.0000, 0.0000],\n [0.0000, 0.0000, 0.0000],\n [0.0000, 0.0000, 0.0000]],\n\n [[0.0000, 0.0000, 0.0000],\n [0.0000, 0.0000, 0.0000],\n [0.0000, 0.0000, 0.0000],\n ...,\n [0.0000, 0.0000, 0.0000],\n [0.0000, 0.0000, 0.0000],\n [0.0000, 0.0000, 0.0000]],\n\n [[0.0000, 0.0000, 0.0000],\n [0.0000, 0.0000, 0.0000],\n [0.0000, 0.0000, 0.0000],\n ...,\n [0.0000, 0.0000, 0.0000],\n [0.0000, 0.0000, 0.0000],\n [0.0000, 0.0000, 0.0000]],\n\n ...,\n\n [[0.3647, 0.9922, 0.4039],\n [0.3647, 0.9882, 0.4000],\n [0.3647, 0.9882, 0.4000],\n ...,\n [0.3647, 0.9804, 0.3961],\n [0.3608, 0.9843, 0.4000],\n [0.3608, 0.9765, 0.3922]],\n\n [[0.3608, 0.9765, 0.3961],\n [0.3608, 0.9804, 0.3961],\n [0.3608, 0.9843, 0.3961],\n ...,\n [0.3647, 0.9804, 0.3961],\n [0.3569, 0.9647, 0.3922],\n [0.3412, 0.9333, 0.3765]],\n\n [[0.3529, 0.9647, 0.3882],\n [0.3569, 0.9725, 0.3922],\n [0.3608, 0.9804, 0.3961],\n ...,\n [0.3608, 0.9765, 0.3922],\n [0.3451, 0.9373, 0.3765],\n [0.3137, 0.8471, 0.3412]]]])"
],
"auth_token": [
null
],
"comfy_api_key": [
null
],
"unique_id": [
"13"
]
},
"current_outputs": [
"3",
"8",
"1",
"4",
"7",
"6",
"15",
"12",
"9",
"2",
"14",
"10",
"13",
"5",
"11"
],
"timestamp": 1755920320889
}
]
Logs
Other
No response
After added "extra_data" and the key, executed success.
{
"client_id" : "<UUID clientID>",
"extra_data":{
"api_key_comfy_org":"our_comfy_api_key"
},
"prompt" :{
// API mode workflow JSON
}
}