Jimeng Quota Settings
A spending cap so a runaway batch doesn't drain your key
- client
- status
Every node in this pack spends real money - it's a pay-per-use API, and a mistyped generation_count can turn a $0.50 idea into a $50 accident. Jimeng Quota Settings is the pack's answer: a cap you set per API key, per model, that stops tasks dead once you hit the limit. It's the least glamorous node here and arguably the one you should wire up first.
The setup: pick a client (from the Jimeng API Client node), choose an image model and a video model, set a limit for each, and the node registers those limits against that specific API key. Set a limit to 0 and that model's check is disabled. The status output shows what the quota tracker currently knows.
How it works
This is the honest part, and you should understand it before trusting it: the quota is tracked in-process, in memory, not on ByteDance's side. The pack keeps a per-key usage counter, and each generation node calls a check before submitting and updates the counter after - images count against the image limit by number of images, videos against the video limit by tokens. When a check finds you at the cap, the generation throws and stops before spending a request. It's a guardrail inside ComfyUI, not an account-level hard stop from the platform.
Two consequences follow. One: it only protects you while this node is in the workflow and the workflow is running - a fresh restart resets the counters. Two: it's per-key, so it works across all your Jimeng nodes, but only if the key is the one you set the quota on.
The inputs that matter
- image_model - which image model to cap (Seedream 5, 4.x, or the 3.0 t2i), or "None".
- image_limit - max images, 0 to disable.
- video_model - which video model to cap, or "None".
- video_limit - max video tokens, 0 to disable.
- client - the key this quota applies to.
Output
- status - a string describing the current quota state for that key.
Installing and using it sensibly
Install is the pack-standard route: ComfyUI Manager (search "ComfyUI Jimeng API") or git clone https://github.com/fkxianzhou/ComfyUI-Jimeng-API into custom_nodes, restart. No models, SDK self-installs.
The sensible way to use it: put the node in your most expensive workflow (the video ones) with a conservative video limit, and treat the image limit as your batch-safety net for Seedream runs. Don't treat it as your only defense - if you share a key with another tool, or you want hard billing protection, the Ark console is the real authority. This node is the seatbelt that catches the mistakes you make inside ComfyUI, and that's a genuinely useful thing to have in a paid-API pack.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| client | JIMENG_CLIENT | — | |
| image_model | COMBO | None | 6 options: None, doubao-seedream-5.0-pro, doubao-seedream-5.0-lite, doubao-seedream-4.5, doubao-seedream-4.0, doubao-seedream-3.0-t2i |
| image_limit | INT | 00–2147483647 | 0 to disable |
| video_model | COMBO | None | 10 options: None, doubao-seedance-1-0-pro, doubao-seedance-1-0-pro-fast, doubao-seedance-1.5-pro, doubao-seedance-2-0, doubao-seedance-2-0-fast, +4 |
| video_limit | INT | 00–2147483647 | 0 to disable |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| status | STRING | — |