OpenAI: ChatGPT
Engage with OpenAI's advanced language models for intelligent conversations.
下載工作流程在 Cloud 中試用 API 文件
關於
Engage with OpenAI's advanced language models for intelligent conversations.
您提供的內容
- 正在讀取工作流程
在 ComfyUI 中執行。 此工作流程無法在此頁面上執行。請下載並在 ComfyUI 中開啟。
下載工作流程此工作流程尚無範例輸出。
工作流程內部
節點圖的唯讀預覽。請在 Comfy Cloud 中開啟,或下載後編輯節點。
Loading the graph
Open full-size workflow preview- Comfy Cloud
- 是
- 作者
- 作者無法使用
需要自訂節點
- 正在讀取工作流程
從程式碼使用此工作流程
可行時會根據工作流程圖和輸入內容產生;否則會顯示儲存的範例。執行可能產生費用的程式碼前,請檢查認證資訊和端點。
1 取得 API 金鑰 ↗
What you need
- Runs on
- Comfy Cloud
- 金鑰
- COMFY_API_KEY
需要付費 Cloud 方案與點數。
下載 API JSONAPI 文件 ↗
# Python 3.10+: pip install comfy-sdk==0.4.0
import os
from comfy_sdk import Comfy
api_key = os.environ.get("COMFY_API_KEY", "").strip()
if not api_key: raise RuntimeError("Set COMFY_API_KEY")
os.environ.setdefault("COMFY_BASE_URL", "https://cloud.comfy.org")
client = Comfy(api_key=api_key)
workflow = client.workflows.from_json({
"5": {
"class_type": "LoadImage",
"inputs": {
"image": "example.png"
},
"_meta": {
"title": "Load Image"
}
},
"19": {
"class_type": "SaveText",
"inputs": {
"filename_prefix": "Text/GPT",
"format": "txt",
"text": [
"20",
0
]
},
"_meta": {
"title": "Save Text"
}
},
"20": {
"class_type": "OpenAIChatNodeV2",
"inputs": {
"model": "gpt-6.2-sol",
"model.images.image_1": [
"5",
0
],
"model.max_output_tokens": 32768,
"model.prompt": "Describe this image",
"model.reasoning_effort": "medium",
"model.seed": 42,
"model.system_prompt": [
"21",
0
]
},
"_meta": {
"title": "OpenAI ChatGPT"
}
},
"21": {
"class_type": "PrimitiveStringMultiline",
"inputs": {
"value": "You are an AI specialized in image-to-text prompt generation. Analyze the given image carefully and describe it in a detailed, structured, and prompt-friendly format. Include elements such as subject, clothing, style, environment, lighting, composition, color palette, mood, camera angle, and any other relevant visual details. Your output should resemble a high-quality text-to-image prompt that can help recreate the image. Use concise, descriptive language. Do not include explanations, just output the prompt."
},
"_meta": {
"title": "Text (Multiline)"
}
}
})
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)