# Billing
Source: https://docs.viewcomfy.com/account/billing
### Developer plan
You only get charged for the time you have an instance running. The exact amount you will get charged depends on the GPU you are using, which is described in more detail on the billing page.
### Team plan
Is a \$30/month subscription plan that comes with \$10 of GPU credits per month. After the credits are used, you will get charged the standard GPU usage fee. In addition to the credits, the Team plan gives you access to advanced features detailed on the billing page.
You will get charged for GPU usage once a month, starting one month after you first join.
You can check the pricing [here](https://viewcomfy.com/pricing).
# null
Source: https://docs.viewcomfy.com/closed_source_models/description
You can access most closed source models as soon as they are available directly inside ViewComfy.
ComfyUI’s own API Nodes are supported when you’re working inside the Comfy interface on our platform, but for technical reasons, they can't be used when turning workflows into APIs or Apps. For this, you can use our own set of nodes that work seamlessly with ViewComfy deployments.
With these nodes, you can:
* Call closed-source models as soon as they become available.
* Deploy Comfy workflows that use closed source models as serverless APIs
* Make custom ViewComfy apps that use those models
* Scale usage without worrying about API key management or infrastructure
For more details, see:
* [Pricing](/closed_source_models/pricing): ViewComfy Closed Source API pricing
# null
Source: https://docs.viewcomfy.com/closed_source_models/pricing
Closed Source Models on ViewComfy are pay-as-you-go. The following table lists the current pricing for each supported model:
| Node | ViewComfy price | Unit |
| ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------- |
| Nano Banana | \$0.041 | per image |
| Nano Banana Pro | \$0.1575 | per image |
| Kling v2.1 Master | \$0.294 | per second |
| Kling v2.5 Turbo Pro | \$0.0735 | per second |
| Kling v2.6 Pro | \$0.0735 (audio off) / \$0.147 (audio on) | per second |
| Kling v2.6 Pro, Motion Control | \$0.1176 | per second |
| Minimax Hailuo02 Pro | \$0.084 | per second |
| Kling o1 | \$0.1176 | per second |
| Kling o1 video to video | \$0.1764 | per second |
| Seedance Pro | \$2.625 | per 1M total tokens |
| Veo3 | \$0.21 (audio off) / \$0.42 (audio on) | per second |
| Veo3.1 | \$0.21 (audio off) / \$0.42 (audio on) | per second |
| GPT Image 1 | \$0.25 | per image |
| GPT Image 1.5 | - Low quality: \$0.00945 for 1024x1024 or \$0.01365 for other sizes
- Medium quality: \$0.0357 for 1024x1024, \$0.05355 for 1024x1536 and \$0.0525 for 1536x1024
- High quality: \$0.13965 for 1024x1024, \$0.21 for 1024x1536 or \$0.20895 for 1536x1024 | per image |
| Gemini 2.5 Flash | \$0.041 | per request |
| LLMs (Gemini, Claude, etc.) | \$0.0011 | per request |
| LLM Vision | \$0.0105 | per request |
| Flux Kontext Pro | \$0.042 | per image |
| Flux Kontext Max | \$0.084 | per image |
| Flux Kontext Dev | \$0.0263 | per image |
| Flux 2 Pro | \$0.0315 for the first megapixel, plus \$0.01575 per extra megapixel | per megapixel |
| Flux Pro | \$0.042 | per megapixel |
| Flux Dev | \$0.0263 | per megapixel |
| Seedream 4.0 | \$0.0315 | per image |
| Bria Increase Resolution | \$0.147 | per second |
| Bria Fibo Edit | \$0.042 | per image |
| Bria Fibo Edit, Instruction | \$0.0105 | per image |
| Topaz Video Upscale | \$0.105 | per second |
| Bytedance Video Upscale | \$0.00756 (1K), \$0.01512 (2K), \$0.03024 (4K) at 30fps | per second |
| Sima Video Upscale | \$0.00025 | per megapixel |
| Sync Lipsync 2 Pro | \$5.25 | per minute |
| Clarity Upscaler | \$0.0315 | per megapixel |
| Recraft Creative Upscaler | \$0.2625 | per image |
| Recraft Crisp Upscaler | \$0.0042 | per image |
| Wan 2.5 | \$0.0525 (480p), \$0.105 (720p), \$0.1575 (1080p) | per second |
| Sora 2 | \$0.105 | per second |
| Sora 2 Pro | \$0.315 (720p) / \$0.525 (1080p) | per second |
## Supported APIs
The following is a complete list of all supported APIs:
* Nano Banana, Image Edit
* Nano Banana, Text to Image
* Nano Banana Pro, Text to Image
* Nano Banana Pro, Image Edit
* Kling v2.1 Master Image-to-Video
* Kling v2.1 Master Text-to-Video
* Kling v2.5 Turbo Pro Image-to-Video
* Kling v2.5 Turbo Pro Text-to-Video
* Kling v2.6 Pro Image-to-Video
* Kling v2.6 Pro Text-to-Video
* Kling v2.6 Pro Motion Control
* Kling o1 First and Last Frame to Video
* Kling o1 Reference-to-Video
* Kling o1 Video-to-Video Edit
* Kling o1 Video-to-Video Reference
* Minimax Hailuo02 Pro Text-to-Video
* Minimax Hailuo02 Pro Image-to-Video
* Seedance Pro Text-to-Video
* Seedance Pro Image-to-Video
* Veo3 Text-to-Video
* Veo3 Image-to-Video
* Veo3.1 Text-to-Video
* Veo3.1 Image-to-Video
* Veo3.1 First and Last Frame to Video
* Veo3.1 Reference-to-Video
* GPT Image 1, Text to Image
* GPT Image 1, Image Edit
* GPT Image 1.5
* GPT Image 1.5, Image Edit
* Gemini 2.5 Flash Image
* Gemini 2.5 Flash Image, Image Edit
* LLM
* LLM Vision
* Flux Kontext Pro
* Flux Kontext Max
* Flux Kontext Dev
* Flux 2 Pro
* Flux 2 Pro image edit
* Flux Pro
* Flux Dev
* Seedream 4.0, Text to Image
* Seedream 4.0, Image Edit
* Bria Increase Resolution
* Bria Fibo Edit, Sketch to Colored Image
* Bria Fibo Edit, Restyle
* Bria Fibo Edit, Reseason
* Bria Fibo Edit, Rewrite Text
* Bria Fibo Edit, Add Object by Text
* Bria Fibo Edit, Edit Structured Instruction
* Bria Fibo Edit, Relight
* Bria Fibo Edit, Colorize
* Bria Fibo Edit, Erase by Text
* Topaz Video Upscale
* Bytedance Video Upscale
* Sima Video Upscale
* Sync Lipsync 2 Pro
* Clarity Upscaler
* Recraft Creative Upscaler
* Recraft Crisp Upscaler
* Wan v2.5 Image-to-Video
* Wan v2.5 Text-to-Video
* Sora 2 Text-to-Video
* Sora 2 Image-to-Video
* Sora 2 Pro Text-to-Video
* Sora 2 Pro Image-to-Video
# null
Source: https://docs.viewcomfy.com/comfy_workspace/description
Each [deployment](/deployments/description) can be used as a flexible, cloud-based, Comfy workspace. By accessing it with the Comfy interface, you can use it as you would locally. You can install new node packs with the manager, add new models and build new workflows. The content you generate there will be saved in your output folder.
You can also log in to your Comfy account and use API nodes.
# null
Source: https://docs.viewcomfy.com/deployments/adding_models
To add a model to your deployment, you simply need to click the "Add a model" button next to it and put the download URL.
We support download URLs from HuggingFace, CivitAI or any other custom buckets you might have. In most cases, you will also need to add a token for the download to happen. The main exception to that rule is public models from HuggingFace; for those, you won't need a token.
If you want to add a private model from your local computer, we recommend first uploading it to HuggingFace and downloading it from there.
[This](https://youtu.be/sRticjuabVQ) video goes through all the processes one step at a time (including how to upload a private model to HuggingFace).
All deployments in a team share the same model volume, meaning that if you add a model to one deployment, that model will be available to all present and future deployments inside your team.
# null
Source: https://docs.viewcomfy.com/deployments/common_issues
Most deployment issues can easily be fixed using the Comfy interface.
The first thing to do if you are having problems running a workflow on ViewComfy, including via the API or ViewComfy apps, is to open the Comfy interface and drop the workflow\_api.json file you are trying to run.
## Missing nodes
If you get an error because some nodes are missing, try installing the appropriate node pack from the manager. Sometimes, you need to search for the node name on Google to find the node pack they belong to.
## Broken workflow\_api.json file
If the workflow\_api.json file looks like this when you open it, it means it didn't export properly:
This can happen when exporting workflows that contain virtual nodes. The usual culprits are rgtree nodes. The good thing is that those nodes are usually only there for aesthetic reasons and don't fulfil any backend function, so it is easy to fix.
To resolve the problem, try removing the virtual nodes from the workflow and making a new workflow\_api.json file.
## Problem running the workflow
If you can open the workflow\_api.json file and everything looks right, but you still can't run the workflow. You need to have a look at the logs. You can do that straight from Comfy.
This will let you see the error that is preventing the workflow from running.
## The workflow runs in the Comfy interface but not when using the API or a ViewComfy app
The first thing to do if this happens is to make sure that the workflow the API or the ViewComfy app is running is the same one you are using in Comfy.
If they are, then try having a look at the Comfy logs while calling the API or running the ViewComfy app. If you still can't find any clues about what is causing the issues, you can get in touch ([team@viewcomfy.com](mailto:team@viewcomfy.com)).
# null
Source: https://docs.viewcomfy.com/deployments/create_a_deployment_(deploy_a_workflow)
To create a deployment, you need to either deploy one of your workflows or one of our prebuilt templates. If you want to build a workflow from scratch, we recommend using the "ComfyUI: Base Installation" template.
## Deploy your own workflow
To deploy one of your workflows, you will need the workflow\_api.json for that workflow. This file can be exported from the Comfy interface.
Once you have the workflow\_api.json ready, drop it in the "Deploy your own" tab. You will then need to give your deployment a name and select a GPU. You can change those settings later, so don't worry if you are not sure which ones are best for your workflow.
After you click "Deploy", our system will install the custom nodes it recognises and download the models that are on our [list](https://github.com/ViewComfy/cloud-public/blob/main/supported_weights.md). Once the deployment process is over, you will be able to install more custom nodes and download new models.
Most dependencies can be added from the manager, but if for some reason this is not enough, please get in touch ([team@viewcomfy.com](mailto:team@viewcomfy.com)).
## Deploying from a template
If you don't have a workflow to deploy, you can use one of our pre-built templates. They include a curated selection of ready-to-go workflows, as well as a base installation of Comfy for when you need to build a workflow from scratch.
# null
Source: https://docs.viewcomfy.com/deployments/default_nodes
All new ComfyUI deployments come with a curated set of custom nodes pre-installed. These nodes have been specifically chosen because they are:
* **Very popular** - Widely used by the ComfyUI community
* **Highly compatible** - Work seamlessly with the vast majority of other node packs
* **Performance-friendly** - Don't negatively impact deployment performance
## Available Default Nodes
The following custom nodes are automatically installed with every new deployment:
* **[audio-separation-nodes-comfyui](https://github.com/christian-byrne/audio-separation-nodes-comfyui)**
* **[Bjornulf\_custom\_nodes](https://github.com/justUmen/Bjornulf_custom_nodes)**
* **[ComfyUI-AudioTools](https://github.com/lum3on/ComfyUI_AudioTools)**
* **[ComfyUI-Crystools](https://github.com/crystian/ComfyUI-Crystools)**
* **[ComfyUI-Detail-Daemon](https://github.com/Jonseed/ComfyUI-Detail-Daemon)**
* **[ComfyUI-Fill-Nodes](https://github.com/filliptm/ComfyUI_Fill-Nodes)**
* **[ComfyUI-Florence2](https://github.com/kijai/ComfyUI-Florence2)**
* **[ComfyUI-Flux-Continuum](https://github.com/robertvoy/ComfyUI-Flux-Continuum)**
* **[ComfyUI-GGUF](https://github.com/city96/ComfyUI-GGUF)** - GGUF model format support
* **[ComfyUI-Impact-Subpack](https://github.com/ltdrdata/ComfyUI-Impact-Subpack)**
* **[ComfyUI-Inspire-Pack](https://github.com/ltdrdata/ComfyUI-Inspire-Pack)**
* **[ComfyUI-IPAdapter\_plus](https://github.com/cubiq/ComfyUI_IPAdapter_plus)**
* **[ComfyUI-KJNodes](https://github.com/kijai/ComfyUI-KJNodes)**
* **[ComfyUI-NormalCrafterWrapper](https://github.com/AIWarper/ComfyUI-NormalCrafterWrapper)**
* **[ComfyUI-Resolution-Master](https://github.com/Azornes/Comfyui-Resolution-Master)**
* **[ComfyUI-UltimateSDUpscale](https://github.com/ssitu/ComfyUI_UltimateSDUpscale)**
* **[ComfyUI-WanAnimatePreprocess](https://github.com/kijai/ComfyUI-WanAnimatePreprocess)**
* **[ComfyUI-WanVideoWrapper](https://github.com/kijai/ComfyUI-WanVideoWrapper)**
* **[rgthree-comfy](https://github.com/rgthree/rgthree-comfy)**
* **[segment-anything-2](https://github.com/facebookresearch/segment-anything-2)**
* **[VideoHelperSuite](https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite)**
## Adding Additional Nodes
While these default nodes cover most common use cases, you can always install additional custom nodes through the ComfyUI Manager interface in your deployment. Most dependencies can be added directly from the manager, but if you encounter any issues, please contact us at [team@viewcomfy.com](mailto:team@viewcomfy.com).
# null
Source: https://docs.viewcomfy.com/deployments/description
ViewComfy deployments are installations of Comfy with a set of custom nodes and Python dependencies attached to them. They can be seen as an optimised environment to run a specific workflow. Each deployment has access to all the models from the team.
Deployments can be accessed via the Comfy interface, API endpoints or through ViewComfy apps.
The following sections cover how to create and manage deployments:
* [Create a deployment](/deployments/create_a_deployment_\(deploy_a_workflow\)): Create deployments by deploying Comfy workflows
* [Using the manager](/deployments/using_the_manager): Update your deployments using the Comfy manager
* [Adding models](/deployments/adding_models): Add new models to your deployments.
* [Updating the GPUs](/deployments/updating_the_gpu): Change GPU and update the infrastructure
* [Dealing with Common Issues](/deployments/common_issues): Identifying and fixing common deployment issues
* [Default Custom Nodes](/deployments/default_nodes): List of custom nodes pre-installed with every deployment
# null
Source: https://docs.viewcomfy.com/deployments/updating_the_gpu
To change your deployment's GPU or infrastructure settings, click the three dots/edit button next to it.
From there, you can change the deployment's name, the GPU model on which it runs, and the maximum number of instances (GPUs) the deployment can use simultaneously.
Please get in touch if you have special infrastructure requirements. For example, we can adjust the minimum number of idle instances and the scaledown window on requests ([team@viewcomfy.com](mailto:team@viewcomfy.com)).
# null
Source: https://docs.viewcomfy.com/deployments/using_the_manager
You can access the Comfy manager via the Comfy interface and use it just like you would on a local installation.
For example, you can add registered custom nodes from the node manager and unregistered ones via Git.
You can also install most pip dependencies straight from the manager.
# FAQs
Source: https://docs.viewcomfy.com/faqs/faqs
# How do I know if my instance is running?
After you deploy a workflow, its status changes to "ready". This means that everything you need to run the workflow is installed and ready to go. In that state, you do not incur any charges.
The workflow only runs when the ComfyUI or the ViewComfy interface is **open**. When that is the case, its status will change to "running". To stop it, you just have to close the browser tab with the interface.
If you are using the API, the workflow will be running from the moment it receives a request and will shut down automatically 30 seconds after processing the last request in the queue.
# What if my workflow does not show when I open the ComfyUI interface?
If your workflow is not loading when you open the ComfyUI interface, you can download it from the "Workflow files" column on the "Your workflows" page and drop it in ComfyUI.
# How do I delete a workflow?
As long as a deployment is not "running" you are not being charged for it. If you want to delete a deployment to replace it with a new one, you can message us at [team@viewcomfy.com](mailto:team@viewcomfy.com) with the email address you used to sign up.
# null
Source: https://docs.viewcomfy.com/get_started/introduction
ViewComfy is for scaling ComfyUI operations.
Whether you need to turn comfy workflows into simple web apps that anyone can use, deploy them as serverless APIs, or just use the latest models on a powerful GPU, we've got you covered.
Our [quick start](/get_started/quick_start) guide goes over the steps to get your first workflow online, as well as some of the key concepts when using ViewComfy.
For more details on how to get the most out of ViewComfy, you can refer to the following sections:
* [Deployment](/deployments/description): Deploy workflows and update their environments
* [Comfy Workspace](/comfy_workspace/description): Build workflows and create content using the Comfy interface
* [ViewComfy Apps](/viewcomfy_apps/description): Turn workflows into shareable web apps
* [Serverless API](/viewcomfy_api/description): Access workflows via our serverless API
* [Storage](/storage/description): Store models and outputs
* [Accounts](/account/billing): Manage users and billing
* [API](/viewcomfy_cloud/description): Access our cloud services through the API
# null
Source: https://docs.viewcomfy.com/get_started/quick_start
## Deploying Your Workflow
1. Login to the ViewComfy [dashboard](https://app.viewcomfy.com/)
2. Deploy your `workflow_api.json` file under the "Deploy your own" or use a Templates such as the "ComfyUI: Base Installation" to build a workflow from scratch
3. Once deployment is complete, access the ComfyUI interface
* Note: The interface will initially show the default workflow
* To load your workflow, drag and drop your `workflow_api.json/workflow.json` file onto the canvas
* You can find your file in the "Your Workflows" tab under "Workflow Files"
4. Test your workflow in the ComfyUI interface to verify everything works correctly
* The Manager is fully functional for installing custom nodes, pip packages and models
* Add models through the dashboard using the "Add a Model" button in the "Your Workflows" tab
## Storage and Models
* All workflows within a team share the same model storage
* Models downloaded for one workflow can be used in others without re-downloading
* The ComfyUI input folder uses shared storage with the same properties as the model storage
## API and Value Management
When running your workflow through our API or ViewComfy Web app:
* By default, the workflow\_api.json you used at deployment, with all of it's values will be run.
* Provided values will override the `workflow_api.json` default values.
* Any unspecified values will use the defaults from the original `workflow_api.json`
## Building Your ViewComfy Web App
You have two options:
1. Clone the project from [GitHub](https://github.com/ViewComfy/ViewComfy)
2. Use the [online editor](https://editor.viewcomfy.com/)
* Note: The online editor currently doesn't support workflow playground testing
* For full playground functionality, use the local version
## Deploying your ViewComfy App
1. After workflow deployment:
* Get your API keys from the "Your Workflows" tab
* Copy the "API Endpoint" URL to the ViewComfy App's Endpoint field
2. Finalizing your app:
* Download the `view_comfy.json` file from the editor
* Go to ViewComfy Apps in the dashboard
* Click "Deploy App"
## Team Management
* Use the "Invite Users" button in "ViewComfy Apps" tab to add team members
* Team members must accept invitations to access the app
* Team members added that way can only access the app, not the dashboard
## Additional Resources
Learn more with these guides:
* [Complete Guide: Deploy Workflow & Create ViewComfy App](https://www.viewcomfy.com/blog/build-and-deploy-a-comfyui-powered-app-a-complete-guide)
* Follow until step 3 for cloud deployment
* [Customize Web App UI](https://www.viewcomfy.com/blog/comfyui-to-web-app-in-less-than-5-minutes)
# null
Source: https://docs.viewcomfy.com/storage/description
All of the storage on ViewComfy is permanent and free! As long as you don't delete it, you can rest assured that everything you install and save will stay there for your future sessions.
There are two main types of storage:
* [Models](/storage/models)
* [Outputs](/storage/outputs)
# null
Source: https://docs.viewcomfy.com/storage/models
The model volume is shared across your team. This means that any present and future deployment inside a given team has access to all the models from the volume.
## Adding models
You can add models at any time using the "add model" button next to any deployment.
ViewComfy uses the same folder structure as ComfyUI, and all your models will automatically be added to the "ComfyUI/models" folder. This means that if you want to add a lora named "mylora.safetensors", the download path will be "loras/mylora.safetensors".
## Browsing models
To see the models you have in storage, go to "Model Storage" section of the dashboard.
# null
Source: https://docs.viewcomfy.com/storage/outputs
All of the outputs generated via an API call or a ViewComfy app, together with their generation parameter, are stored permanently. Just like for the models, the volume with the outputs is shared across the team.
You can access them via the History tab on the dashboard.
Up on request, we can connect this feature to your private S3 bucket.
# null
Source: https://docs.viewcomfy.com/viewcomfy_api/autoscaling
The ViewComfy Serverless API can automatically scale up and down based on the demand.
The parameters to configure the auto scaling are:
* **Queue size**: the maximum number of requests that can be queued before a new GPU is turned on, by default it is 1.
* **Max number of GPUs**: the maximum number of GPUs that can be turned on at the same time, by default it is 1.
* **Min number of GPUs**: the minimum number of GPUs that should be turned on, by default it is 0. If this value is greater than 0, new users logging in to your application won't experience a cold start, but billing will be higher.
* **Idle time**: the number of seconds of idle time before GPUs are turned off, by default it is 30 seconds. This means that a GPU will wait 30 seconds after it is done processing its last request before turning off. If GPUs wait longer before turning off, your users will experience fewer cold starts, but billing will be higher.
* **Min number of warm GPUs**: the number of buffer GPUs that should be available when the infrastructure is active. This setting does not prevent the number of GPUs from dropping to zero, but it ensures that additional GPUs will be activated when some are in use. These extra GPUs help manage spikes in demand and reduce the likelihood of users encountering cold starts.
New GPUs will turn on automatically when the number of queued requests exceeds the target queue size. Once the infrastructure reaches the set maximum number of GPUs, it will stop scaling, and new requests will be queued.
When a GPU is idle for longer than the target idle time, it will turn off. Once the infrastructure reaches the set minimum number of GPUs, it will stop scaling down.
## Example 1:
```
Settings:
queue size: 1
max number of GPUs: 4.
min number of GPUs: 0
idle time: 30
Event:
10 requests come in at the same time.
```
Let’s say you get 10 requests at the same time, and you don't have any GPUs running; 4 GPUs will be turned on right away and process the jobs.
Each time a GPU finishes a job, it will get a new one from the queue until the queue is empty. Once the queue is empty, if a GPU is idle for more than 30 seconds it will turn off. This process will repeat itself until all the GPUs are off.
## Example 2:
```
Settings:
queue size: 2
max number of GPUs: 4.
min number of GPUs: 0
idle time: 30
Event:
2 requests come in at the same time, followed by 2 others.
```
In this case, because the set queue size is not bigger than the number of requests, only 1 GPU will turn on. The second request will wait for the first one to finish before being sent to the same GPU.
If a new set of 2 requests comes in before the first one is finished, the queue will grow to 3, and a new GPU will be turned on. The jobs will then be processed in the order they arrived until the queue is empty. At this point, the infrastructure will start scaling down until there are no more GPUs running.
# Description
Source: https://docs.viewcomfy.com/viewcomfy_api/description
# ViewComfy Serverless API
The Serverless API is designed to reliably auto scale up when your endpoint has a high demand and scale down to 0 GPU instances when there is no demand.\
With our serverless API you will only pay for the GPU instances that are being used.
## Features
* Scale up and down to 0 GPU instances when there is no demand
* Support bursty endpoints with high demand
* Get realtime logs of the execution of your workflow
* Launch a batch of generations asynchronously
# null
Source: https://docs.viewcomfy.com/viewcomfy_api/examples/python
We offer a Python code to get the API working out of the box. You can find it [here](https://github.com/ViewComfy/cloud-public/tree/main/ViewComfy_API).
You only need to download the api.py code and the requirements.txt file, and you can use that in your project.
the api.py code relies on the httpx library, so you will need to install it first:
```bash theme={null}
pip install httpx==0.28.1
```
The [workflow\_parameters\_maker.py](https://github.com/ViewComfy/cloud-public/blob/main/ViewComfy_API/Python/workflow_parameters_maker.py) will help you get the parameters of your workflow\_api.json
```bash theme={null}
python workflow_parameters_maker.py --workflow_api_path ""
```
# null
Source: https://docs.viewcomfy.com/viewcomfy_api/examples/typescript
We offer a TypeScript code to get the API working out of the box. You can find it [here](https://github.com/ViewComfy/cloud-public/tree/main/ViewComfy_API).
You only need to download the api.ts code and you can use that in your project.
The [workflow\_api\_parameters\_creator.ts](https://github.com/ViewComfy/cloud-public/blob/main/ViewComfy_API/Node-TypeScript/workflow_api_parameters_creator.ts) will help you get the parameters of your workflow\_api.json
# Memory Snapshot (beta)
Source: https://docs.viewcomfy.com/viewcomfy_api/memory_snapshot
This feature is currently in beta and focus on API first workflows.\
We can enable it for you upon request, please contact us at [team@viewcomfy.com](mailto:team@viewcomfy.com) to enable it.
### How it works:
The first 3 cold-starts are going to take longer than the usual ones but after that, the cold-start will be improved in about 60% to 80% than the regular ones, because instead of loading everything from scratch we start from an already loaded state of the memory.
# Quick Start
Source: https://docs.viewcomfy.com/viewcomfy_api/quick_start
# How to use the API
The ViewComfy Serverless API can be called with a JSON POST request or streaming responses via Server-Sent Events. This second option allows for real-time tracking of the ComfyUI logs. In this guide, we will go over how to call the API with the streaming response.
All the code you need to run the API can be found in this [GitHub folder](https://github.com/ViewComfy/cloud-public/tree/main/ViewComfy_API/Python) (this guide uses the Python example code, you can access the [TypeScript example code here](https://github.com/ViewComfy/cloud-public/tree/main/ViewComfy_API/Node-TypeScript). It works in the same way.)\
If you want a full guide on how to deploy your own workflow, you can find it [here](https://www.viewcomfy.com/blog/integrate-comfyui-workflows-into-your-apps-via-api).\
After downloading all the files, you can install the dependencies:
```bash theme={null}
pip install -r requirements.txt
```
### 1. Getting your API keys
In order to use your API endpoint, you will first need to create your API keys.

After opening the API key menu from your dashboard, you can copy your “Client ID” and “Client Secret”. **Keep them somewhere safe** as you will need them to call the API.

### 2. Extracting your workflow parameters
The first thing to do before setting up the request is to identify the parameters in your workflow. This is done by using workflow\_parameters\_maker.py to flatten your workflow\_api.json. You can run the script directly from your terminal:
```bash theme={null}
python workflow_parameters_maker.py --workflow_api_path ""
```
The flattened json file should look like this:
```json theme={null}
{
"_3-node-class_type-info": "KSampler",
"3-inputs-cfg": 6,
…
"_6-node-class_type-info": "CLIP Text Encode (Positive Prompt)",
"6-inputs-clip": [
"38",
0
],
"6-inputs-text": "A woman raising her head with hair blowing in the wind",
…
"_52-node-class_type-info": "Load Image",
"52-inputs-image": "",
…
}
```
This dictionary contains all the parameters in your workflow. The key for each parameter contains the node id from your workflow\_api.json file, whether it is an input, and the parameter’s input name. Keys that start with “\_” are just there to give you context on the node corresponding to id, they are not parameters.
In this example, the first key-value pair shows that node 3 is the KSampler and that “3-inputs-cfg” sets its corresponding cfg value.
### 3. Updating the script with your parameter
All the code you will need to call the API, parse the results and save the outputs are in main.py and api.py. In most cases, the only file you will need to edit is main.py. This is where you will add the parameters you want to change, your API endpoint, and the directory to save your outputs.
The first thing to do is to copy the ViewComfy endpoint, the Client ID and the Client Secret from your dashboard and set them to view\_comfy\_api\_url, client\_id and client\_secret:
```python theme={null}
view_comfy_api_url = ""
client_id = ""
client_secret = ""
```
You can then set the parameters using the keys from the json file you created in the previous step. In this example, we will change the prompt and the input image:
```python theme={null}
params = {}
params["6-inputs-text"] = "A flamingo dancing on top of a server in a pink universe, masterpiece, best quality, very aesthetic"
params["52-inputs-image"] = open("/home/GitHub/API_tests/input_img.png", "rb")
```
### 4. Calling the API
Once you are done adding your parameters to main.py, you can call the API by running:
```bash theme={null}
python main.py
```
This will send your parameters to api.py where all the functions to call the API and handle the outputs are stored.
By default the script runs the “infer\_with\_logs” function which returns the generation logs from ComfyUI via a streaming response. If you would rather call the API via a standard POST request, you can use “infer” instead, like so:
```python theme={null}
# Call the API and wait for the results
prompt_result = await infer(api_url=view_comfy_api_url, params=params, override_workflow_api=override_workflow_api)
# ...
# prompt_result = await infer_with_logs(
# api_url=view_comfy_api_url,
# params=params,
# logging_callback=logging_callback,
# override_workflow_api=override_workflow_api
# )
```
The result object returned by the API will contain the workflow outputs as well as the generation details. It is formatted as follows (For the full definition you can refer to “PromptResult” inside api.py.):
```python theme={null}
prompt_id (str): Unique identifier for the prompt
status (str): Current status of the prompt execution
completed (bool): Whether the prompt execution is complete
execution_time_seconds (float): Time taken to execute the prompt
prompt (Dict): The original prompt configuration
outputs (List[Dict], optional): List of output file data. Defaults to empty list.
```
# null
Source: https://docs.viewcomfy.com/viewcomfy_api/updating_workflows
To make a request using a different workflow than the one you used when creating a deployment, you can use the override\_workflow\_api\_path property.
After extracting the new workflow\_api.json file, you simply need to add the correct path to the property.
```python theme={null}
override_workflow_api_path = ""
```
The key things to pay attention to when using this approach are that:
1. The new workflow needs to be able to run on the deployment you are calling with the API. (ei. all the nodes, models and other dependencies need to be installed). See the “Deploy your workflow” section for information on how to install new nodes and models to a deployment.
2. The keys for the parameters inside the workflow might change, even if the new workflow is very similar to the old one. If that is the case, you will need to update the keys you are using to update the parameters when calling the API.
# null
Source: https://docs.viewcomfy.com/viewcomfy_apps/app_hub
The app hub is the space for all your production apps. When your playground users log in to ViewComfy, they will be automatically redirected to your hub and can access the apps there.
## Add an app to your hub
To add an app to your hub, you need to select the app hub radio button next to your app name.
## Brand the app hub
To add your company logo and name to your app hub, you can use the Apps Branding button at the top of the app dashboard.
# null
Source: https://docs.viewcomfy.com/viewcomfy_apps/build_and_edit
Building a ViewComfy app is a simple process and can be done via our online [editor](https://editor.viewcomfy.com/) or locally with our [open source solution](https://github.com/ViewComfy/ViewComfy).
We have two video guides to help people get started:
* [Making your first app](https://youtu.be/Su_rbjodvEI)
* [Using the ViewComfy Utils node pack to build advanced apps](https://youtu.be/kMSHMvVe-W8)
## Building the app
To get started, you need to use the workflow\_api.json file from the workflow you want to turn into an app. There are more details on how to get that file [here](/deployments/create_a_deployment_\(deploy_a_workflow\)).
Once you have the file ready, you just need to drop it in the editor.
After clicking "Save changes", you can add more workflows to the same app by using the "Add Workflow" button.
## Editing the app
The "App Title" and "App Image URL" allow you to brand your app. Note that you need to provide a URL for the image, meaning it needs to be hosted somewhere.
The "Title" will be the name of your workflow. If you have multiple ones, they will appear in a dropdown at the top.
## Link your App with the ViewComfy Cloud API Endpoint
The "ViewComfy Endpoint" is the API link to your [deployment](/deployments/description). The deployment is where the workflow you used to make the app will run (ei. generate content).
With the latest update of our cloud, you can simply select the name of the deployment you want to use to run your workflow using the dropdown. Alternatively, you can get the endpoint from your workflow dashboard.
By default, the editor will load all the parameters in the workflow. You can remove parameters by clicking the bin icon next to each of them.
You can also add preview images to show your users the kind of output the app will generate. Again, you will need a URL to add the images.
## Editing inputs
In the app editor, you can delete the parameters you don't want to expose, update default values and control the way your inputs will be displayed.
To update the default value of an input you don't want to expose in the UI, you need to hide it instead of deleting it. Deleting it will revert to the value that was saved in the workflow\_api file you used to create the app.
Using the input menu, you can change the following input properties:
* input name (label)
* input type
* validation values
* default values (in cases where you want to expose the input to the user)
* add help text, tooltip and custom error messages
## Using the mask editor
To allow your users to apply a mask on the images they use as input, you need to select the "Image with Mask Editor" input type. This input type behaves the same way as the load image node in ComfyUI.
## managing outputs
Supported output types are rendered by their [mime-type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/MIME_types/Common_types)
* Image (image/)
* Video (video/)
* Audio (audio/)
* Text (.txt)
* PSD Files (image/vnd.adobe.photoshop)
#### Compare images side by side
You can compare any two images using the compare output feature
#### Display text
To display text, you need to save the text in your workflow using the "save text" node from our [utils node pack](/viewcomfy_apps/utils_node_pack) and enable text output in the app editor.
#### Display the name of the output file
You can enable this option to display the file name in the output section of the playground
If you surround the file name with `__`, for example: `__text__`, the text between ' \_\_' will be shown instead.
* In the case of the SaveImage Node, it will automatically add an \_ to the file name, that's why you should only add 1 after the name, like in the picture
#### Example creating a PSD file Output
To create a .psd file that ViewComfy can display in the playground page, you need to connect it to a "Show Any" node and make sure that the output has the following shape.
```
{
"type": "output",
"filename": "psd_file_name.psd"
}
```
You can find an example workflow\_api.json [here](https://github.com/ViewComfy/cloud-public/tree/main/workflows/psd-file) that uses this feature with the string core nodes.
## Editing the app (Advanced)
It is also possible to make more advanced edits to the apps by making changes directly in the view\_comfy.json file. If you use Cursor, you can use our [Cursor Rule](https://github.com/ViewComfy/ViewComfy/blob/main/.cursor/rules/view-comfy-json-rules.mdc) to help you. (We have some examples on how to do that [here](https://www.viewcomfy.com/blog/comfyui-to-web-app-in-less-than-5-minutes)).
### Supported input types
* text
* long-text
* number
* boolean
* video
* image
* audio
* seed => seed, noise\_seed, rand\_seed
* number slider => with min, max and step.
* select => list of options (label and value) e.g:
```json theme={null}
{
"label": "Depth",
"value": "Depth"
}
```
#### view\_comfy.json file structure
You can download the view\_comfy.json file from the editor ("Download as ViewComfy JSON").
The section of the json file called "viewComfyJSON" is what defines the UI elements inside the app. More specifically, the "input" and "advancedInputs" sections are the ones that define the parameters.
```json theme={null}
"viewComfyJSON": {
"title": "Controlnet",
"description": "",
"viewcomfyEndpoint": "https://viewcomfy--108-3-td5l2v-comfyui-infer.modal.run",
"previewImages": [
null,
null,
null
],
"inputs": [
{
"title": "Load Image",
"inputs": [
{
"title": "Load Image",
"placeholder": "Load Image",
"value": null,
"workflowPath": [
"17",
"inputs",
"image"
],
"helpText": "Helper Text",
"valueType": "image",
"validations": {
"required": true
},
"key": "17-inputs-image"
}
],
"key": "17-LoadImage"
},
{
"title": "CLIP Text Encode (Positive Prompt)",
"inputs": [
{
"title": "CLIP Text Encode (Positive Prompt)",
"placeholder": "CLIP Text Encode (Positive Prompt)",
"value": "A picture of the ViewComfy jersey",
"workflowPath": [
"23",
"inputs",
"text"
],
"helpText": "Helper Text",
"valueType": "long-text",
"validations": {
"required": true
},
"key": "23-inputs-text"
}
],
"key": "23-CLIPTextEncode"
}
],
"advancedInputs": [
{
"title": "String",
"inputs": [
{
"title": "Value",
"placeholder": "Value",
"value": "Depth",
"workflowPath": [
"37",
"inputs",
"value"
],
"helpText": "Helper Text",
"valueType": "string",
"validations": {
"required": true
},
"key": "37-inputs-value"
}
],
"key": "37-String"
}
],
"id": "452c9cee8f9128"
}
```
The key things to know are:
* The input name in the UI is the input "title"
* Default values are stored in "value"
* The UI will render the inputs in the same order as in the json
* You can create dropdowns by changing the input type to select and adding a list of labels.
#### Rename parameters
So, for example, you can rename the "CLIP Text Encode (Positive Prompt)" input to "prompt" and remove the default value by changing that input to:
```json theme={null}
{
"title": "Prompt",
"placeholder": "Write a prompt",
"value": "",
"workflowPath": [
"23",
"inputs",
"text"
],
"helpText": "Helper Text",
"valueType": "long-text",
"validations": {
"required": true
},
"key": "23-inputs-text"
}
```
#### Create dropdowns
You can create a dropdown for the "String" input where users will be able to select between two types of controlnets by changing the value type for that input to "select", and adding a list of options (the label is what will show in the UI and the value is what will be sent to the node.)
```javascript Dropdown lines theme={null}
{
"title": "String",
"inputs": [
{
"title": "Value",
"placeholder": "Value",
"value": "Depth",
"workflowPath": [
"37",
"inputs",
"value"
],
"helpText": "Helper Text",
"valueType": "select",
"options": [
{
"label": "Depth",
"value": "Depth"
},
{
"label": "Canny",
"value": "Canny"
}
],
"validations": {
"required": true
},
"key": "37-inputs-value"
}
],
"key": "37-String"
}
```
#### Organise parameters
And finally, you can rename that input to "Controlnet type" and bring it to the top (and outside of the advanced input section), so that the viewComfyJSON section of the json ends up looking like this:
```json theme={null}
"viewComfyJSON": {
"title": "Controlnet",
"description": "",
"viewcomfyEndpoint": "https://viewcomfy--1594-1369-mb0g8a-comfyui-infer.modal.run",
"previewImages": [
null,
null,
null
],
"inputs": [
{
"title": "Controlnet type",
"inputs": [
{
"title": "Controlnet type",
"placeholder": "Controlnet type",
"value": "Depth",
"workflowPath": [
"37",
"inputs",
"value"
],
"helpText": "Helper Text",
"valueType": "select",
"options": [
{
"label": "Depth",
"value": "Depth"
},
{
"label": "Canny",
"value": "Canny"
}
],
"validations": {
"required": true
},
"key": "37-inputs-value"
}
],
"key": "37-String"
},
{
"title": "Prompt",
"inputs": [
{
"title": "Prompt",
"placeholder": "Write a prompt",
"value": "",
"workflowPath": [
"23",
"inputs",
"text"
],
"helpText": "Helper Text",
"valueType": "long-text",
"validations": {
"required": true
},
"key": "23-inputs-text"
}
],
"key": "23-CLIPTextEncode"
},
{
"title": "Image",
"inputs": [
{
"title": "Image",
"placeholder": "Image",
"value": null,
"workflowPath": [
"17",
"inputs",
"image"
],
"helpText": "Helper Text",
"valueType": "image",
"validations": {
"required": true
},
"key": "17-inputs-image"
}
],
"key": "17-LoadImage"
}
],
"advancedInputs": [
],
"id": "452c9cee8f9128"
}
```
#### Create sliders
You can create a slider by adding a slider object to a parameter with min, max and step.
```json theme={null}
{
"title": "KSampler",
"inputs": [
{
"title": "Cfg",
"placeholder": "Cfg",
"value": 8,
"workflowPath": [
"3",
"inputs",
"cfg"
],
"helpText": "Helper Text",
"valueType": "slider",
"slider": {
"min": 1,
"max": 10,
"step": 1
},
"validations": {
"required": true
},
"key": "3-inputs-cfg"
}
]
}
```
#### Input Tooltips
You can add tooltips beside your input to add helpful information to the user
You can add a tooltip by adding a `tooltip` key to a parameter and if you want to add a new line you can add the `\n`
```json theme={null}
{
"title": "Seed",
"placeholder": "Seed",
"value": 40741760227630,
"workflowPath": [
"3",
"inputs",
"seed"
],
"tooltip": "This is a tooltip\n new line",
"helpText": "Helper Text",
"valueType": "seed",
"validations": {
"required": true
},
"key": "3-inputs-seed"
},
```
#### Input Help text
You can add a help text below your input to add guidance information to the user
You can add or modify `helpText` key of a parameter and if you want to add a new line you can add the `\n`
```json theme={null}
{
"title": "Seed",
"placeholder": "Seed",
"value": 40741760227630,
"workflowPath": [
"3",
"inputs",
"seed"
],
"helpText": "Helper Text\n new line",
"valueType": "seed",
"validations": {
"required": true
},
"key": "3-inputs-seed"
},
```
# null
Source: https://docs.viewcomfy.com/viewcomfy_apps/deploy
Once you are done editing your app, and you have linked it to a deployment using its API endpoint, you can download the view\_comfy.json file from the editor.
You then need to go to the ViewComfy Apps tab on the dashboard and click "Deploy App".
From there, you just need to give it a name and drop your view\_comfy.json.
[This](https://youtu.be/HDerbVckuno) video goes over this process.
# null
Source: https://docs.viewcomfy.com/viewcomfy_apps/description
One of the key advantages of using ViewComfy is that you can easily turn any complex Comfy workflow into a web app without having to write a line of code. Every ViewComfy app deployed on our cloud comes with a built-in user management system.
By default, their usage will be charged to the account hosting the app. But on request, they can also be fitted with a separate payment system.
Any [deployment](/deployments/description) can easily be turned into an app. These are the key steps:
* [Build and edit](/viewcomfy_apps/build_and_edit): Making ViewComfy apps
* [Deploy](/viewcomfy_apps/deploy): Deploying apps on the cloud
* [App Hub](/viewcomfy_apps/app_hub): Organize your production apps
* [Share](/viewcomfy_apps/share): Sharing apps with clients, colleagues and more.
* [ViewComfy Utils](/viewcomfy_apps/utils_node_pack): Create complex bahvior in your apps using our open source node pack
## Open Source Solution
At its core, ViewComfy apps are open-source and can be deployed anywhere. You can also connect them to a local installation of ComfyUI instead of using the ViewComfy API. You can refer to our [repository](https://github.com/ViewComfy/ViewComfy) for more details on how to use the open-source implementation.
# null
Source: https://docs.viewcomfy.com/viewcomfy_apps/share
Everyone in your team will have access to your app.
If you want to share your app so that the recipient only has access to the app and nothing else, you can invite them via email. By doing so, they will become playground users.
Playground users can only access your app hub and use the apps available there. They can't see your dashboards.
To share an app via email and create a playground user, click on the "Invite Users" botton at the top right of the screen.
# null
Source: https://docs.viewcomfy.com/viewcomfy_apps/utils_node_pack
The ViewComfy Utils Node Pack is a lightweight collection of custom ComfyUI nodes designed to enable advanced ViewComfy app features like workflow branching, optional image inputs, input validations, and custom error handling.
## Key Features
This node pack includes seven utility nodes:
* **Compare** - Compare values and return boolean results for conditional logic
* **Conditional Select** - Choose between two values based on a boolean condition
* **Show Anything** - Display any data type in your ComfyUI interface
* **Load Image** - Load images with optional input capability (won't break if no image is provided)
* **Anything Inversed Switch** - Route inputs to different execution paths based on an index
* **Show Error Message** - Display custom error messages and halt execution conditionally
* **Save Text** - Save text files to your output folder to display them in your ViewComfy apps
## Installation
The ViewComfy Utils node pack is available via the manager or on GitHub:
[https://github.com/ViewComfy/viewcomfy-utils](https://github.com/ViewComfy/viewcomfy-utils)
## Demo
[](https://youtu.be/kMSHMvVe-W8)
# null
Source: https://docs.viewcomfy.com/viewcomfy_cloud/add_models_and_loras
1. Grab your team id from the dashboard by clicking on your team name or selecting "All Projects"
2. Get your API keys (client id and client secret) from the "Your Workflows" tab of the dashboard.
3. Make a POST to this endpoint: `https://api.viewcomfy.com/api/v1/team/add-models`
**Headers:**
```json theme={null}
{
"client_id": ,
"client_secret": ,
"Content-Type": "application/json"
}
```
**Body:**
```json theme={null}
{
"notification_email": "your@email.com",
"team_id": ,
"custom_models": [
{
"model_url": "https://huggingface.co/black-forest-labs/FLUX.1-schnell/resolve/main/ae.safetensors",
"path": "vae/ae.safetensors",
"headers": {
"Authorization": "Bearer "
}
},
{
"model_url": "https://huggingface.co/lodestones/stable-diffusion-3-medium/resolve/4a708bd3d18c10253247f8660cd4ffae6cd63bf1/stable-diffusion-3-medium/text_encoders/text_encoders.safetensors",
"path": "text_encoders/text_encoders.safetensors"
}
]
}
```
# Description
Source: https://docs.viewcomfy.com/viewcomfy_cloud/description
# ViewComfy Cloud API
The Cloud API is designed to provide a simple way to access our cloud services programmatically.
## Features
* [Add models](/viewcomfy_cloud/add_models_and_loras): Add Models to your storage
# null
Source: https://docs.viewcomfy.com/viewcomfy_cloud/inference
## Inference job with realtime logs
The API endpoint supports launching inference jobs and displaying real-time logs.
Our code examples on GitHub explain how to make this work [TypeScript](https://github.com/ViewComfy/cloud-public/blob/main/ViewComfy_API/Node-TypeScript/api.ts#L272), [Python](https://github.com/ViewComfy/cloud-public/blob/main/ViewComfy_API/Python/main.py#L14)
## Inference jobs in batch
The API endpoint supports launching any number of jobs, after a job is scheduled, you will get a prompt\_id.
With the prompt\_id you can use the query endpoint to get the real-time status of the job, and download the assets when it is finished.
Our code examples on GitHub explain how to make this work [TypeScript](https://github.com/ViewComfy/cloud-public/blob/main/ViewComfy_API/Node-TypeScript/api.ts#L272), [Python](https://github.com/ViewComfy/cloud-public/blob/main/ViewComfy_API/Python/main.py#L99)
## Query the status of an inference job
1 - Grab your API Keys from the dashboard in the "Your Workflows" tab\
2 - Make a GET to this endpoint: `https://api.viewcomfy.com/api/workflow/infer/?prompt_ids=${PROMPT_ID}`\
3 - The query parameters of this endpoint accept multiple prompt\_ids. To send more than one, you need to encode them as a URI\
4 - When an inference has finished, it will have the property `completed = True` and the `status` will be `success` or `error`\
5 - If the status is `success` you can grab the files from the outputs property. More information about the model can be found here [TypeScript](https://github.com/ViewComfy/cloud-public/blob/main/ViewComfy_API/Node-TypeScript/api.ts#L272), [Python](https://github.com/ViewComfy/cloud-public/blob/main/ViewComfy_API/Python/main.py#L99)
```typescript snippet.ts theme={null}
const promptIds = ["123", "564"];
const clientId = "";
const clientSecret = "";
const urlParams = `?${promptIds.map(id => `prompt_ids=${encodeURIComponent(id)}`).join('&')}`;
const url = `https://api.viewcomfy.com/api/workflow/infer/${urlParams}`;
const response = await fetch(url, {
headers: {
"client_id": clientId,
"client_secret": clientSecret,
"content-type": "application/json"
},
});
```
## Cancel an inference job
Using the prompt\_id that was returned when launching the inference job, you can cancel an ongoing inference job by calling this endpoint.
Our code examples on GitHub explain how to make this work [TypeScript](https://github.com/ViewComfy/cloud-public/blob/main/ViewComfy_API/Node-TypeScript/api.ts#L272), [Python](https://github.com/ViewComfy/cloud-public/blob/main/ViewComfy_API/Python/main.py#L135)