Vellria
ComfyUI nodes for the Vellria API: text-to-image, image editing with reference images, text-to-video and image-to-video. Uses your Vellria credits.
Vellria nodes for ComfyUI
Custom nodes that call the Vellria API from ComfyUI: text to image, image editing with reference images, text to video and image to video. Generation runs on Vellria's servers, so no local GPU or model download is needed. Each generation uses credits from your Vellria balance.
API reference: https://vellria.com/en/docs
Install
ComfyUI-Manager: open the Manager, search for "Vellria", install, restart ComfyUI.
Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/vellria/comfyui-vellria
pip install -r comfyui-vellria/requirements.txt # only "requests"; usually already installed
Restart ComfyUI. The nodes appear under the Vellria category.
API key
Create a key (it starts with vll_) at https://vellria.com/panel/api-keys.
The nodes look for it in this order and use the first one found:
- the
VELLRIA_API_KEYenvironment variable config.jsonin this folder (copyconfig.example.json; the file is gitignored)- the optional Vellria API Key node connected to the
authinput
export VELLRIA_API_KEY=vll_... # Windows: set VELLRIA_API_KEY=vll_...
python main.py
or custom_nodes/comfyui-vellria/config.json:
{ "api_key": "vll_..." }
Prefer the environment variable or config.json. ComfyUI saves every widget
value into the workflow, including the PNG metadata of saved images. A key typed
into the Vellria API Key node is therefore inside every workflow file or image
you export or share. The environment variable and config.json take precedence
over the node, so an exported workflow never needs to contain a key.
The key is sent only in the Authorization header, only to the Vellria API host,
and is never printed in logs or error messages.
Nodes
Vellria Image
| Input | Type | Notes |
| --- | --- | --- |
| prompt | STRING | required |
| model | combo | image models from GET /v1/models |
| aspect_ratio | combo | auto = the model's default size |
| resolution | combo | resolution tier (1K, 2K, 4K, ...); auto = the model's default tier |
| seed | INT | sent only to models that accept a seed |
| negative_prompt | STRING, optional | only for models that accept one; leave empty otherwise |
| reference_images, reference_images_2, reference_images_3 | IMAGE, optional | every frame of each batch is one reference image (editing / image to image) |
| auth | VELLRIA_AUTH, optional | from the Vellria API Key node |
Output: image (IMAGE).
Not every model offers every aspect ratio and resolution. If a combination is not available, the node stops before anything is uploaded or charged and lists the sizes the model does offer. The list differs with and without reference images.
Vellria Video
| Input | Type | Notes |
| --- | --- | --- |
| prompt | STRING | required |
| model | combo | video models from GET /v1/models |
| duration | INT | seconds; the allowed range (or fixed set) depends on the model |
| resolution | combo | auto = the model's default |
| aspect_ratio | combo | auto = the model's default; not sent with a start image when the model takes the frame from the image |
| audio | BOOLEAN | sent only to models with an audio switch |
| negative_prompt | STRING, optional | only for models that accept one |
| start_image | IMAGE, optional | first frame (image to video); only the first frame of a batch is used |
| auth | VELLRIA_AUTH, optional | |
Outputs: video (ComfyUI VIDEO) and file_path (STRING). The file is saved to
ComfyUI/output/vellria/. On ComfyUI versions without the VIDEO type the node
still saves the file and returns its path; the video output is then empty.
Vellria API Key
Optional. One api_key widget, output auth (VELLRIA_AUTH). See the warning above.
Model list
At startup the package reads the public model list from GET /v1/models
(5 second timeout) and caches it in cache/models.json. Without network it uses
the cached list, or the list bundled with the package. Restart ComfyUI to pick up
newly added models.
Credits and pricing
Every generation is charged to your Vellria credit balance. Prices per model, size
and second of video are listed at https://vellria.com/en/models and in the
GET /v1/models response. Top up at https://vellria.com/panel/billing.
- A prompt refused by the content policy (
content_blockedat request time) is not charged. - If a generation fails after it started, its credits are refunded to your balance automatically.
- ComfyUI only re-runs a node when one of its inputs changes. Queueing the same workflow again returns the cached result and costs nothing; change the prompt or seed (the seed widget's "randomize" does this) to get a new generation.
Errors
| Situation | Message |
| --- | --- |
| no key / rejected key (401) | how to set the key, link to the API keys page |
| not enough credits (402) | the server's message and the top-up link |
| invalid request (400) | the server's error code, e.g. invalid_size, prompt_too_long |
| content policy (content_blocked) | prompt refused, no credits charged |
| too many requests (429) | the wait time from Retry-After |
| generation failed | the error code; credits are refunded automatically |
| timeout (image 5 min, video 20 min) | the job keeps running on the server; the result shows up in your gallery |
Cancelling the queue in ComfyUI stops the node from waiting. A job that was already submitted keeps running on the server.
Example workflows
example_workflows/ (drag a file onto the ComfyUI canvas):
vellria_text_to_image.json: prompt to image, saved with Save Imagevellria_image_edit.json: Load Image as reference, edit, savevellria_text_to_video.json: prompt to videovellria_image_to_video.json: Load Image as the first frame
Configuration reference
| Variable / key | Default | Purpose |
| --- | --- | --- |
| VELLRIA_API_KEY / api_key | none | API key |
| VELLRIA_BASE_URL / base_url | https://vellria.com | API host |
Development
pip install -r requirements-dev.txt # torch is optional; tensor tests are skipped without it
pytest
Tests mock all HTTP calls; they never contact the API or spend credits.
License
MIT