Integration of API Key to use ComfyUI API nodes
This article explains how to use ComfyUI API Key to call ComfyUI API nodes in headless mode
Starting from PR #8041, ComfyUI supports directly using built-in API nodes through API Keys, without requiring a specific frontend interface (you can even run without a frontend).
This means you can create workflows that combine:
- local OS models
- tools from the custom node community
- popular paid models
Then run everything together by simply sending the prompt to the Comfy webserver API, letting it handle all the orchestration.
This is helpful for users who want to use Comfy as a backend service, via the command line, with their own frontend, etc.
Prerequisites
Using API Key to call ComfyUI’s built-in API nodes requires:
- API Key for the corresponding account
- Sufficient account credits
To use API Key to call ComfyUI’s built-in API nodes, you need to first register an account on ComfyUI Platform and create an API key
Login with API Key
Please refer to the User Interface section to learn how to login with API Key
You need to ensure your ComfyUI account has sufficient credits to test the corresponding features.
Credits
Please refer to the Credits section to learn how to purchase credits for your account
Python Example
Here is an example of how to send a workflow containing API nodes to the ComfyUI API using Python code: