CC Kling Request Builder
Where your Kling video actually gets storyboarded
- llm_user_prompt
- segment_count
- debug_json
Every video in this pack starts as a script, and CC Kling Request Builder is the node that turns that script into a proper work order for the LLM. It doesn't call anything - it writes the prompt that the CC OpenAI Responses node will send. Get this one right and the LLM returns clean, per-segment Kling prompts. Get it wrong and you'll spend the afternoon wrestling a chat model that keeps putting watermarks in your negative prompt.
How it works
You give it your script, a creative brief, and a set of policy choices. It assembles a long, strict user prompt: a task line ("Build Kling 3.0 prompts for a voice-driven character video"), the style direction, the location policy, audio and identity policies, your script broken into timed segments, and a JSON schema hint telling the model exactly what shape to return. The LLM then fills in one kling_prompt per segment.
The clever bit is that the node chunks the script itself. If you don't pass prepared_segments_json, it splits the script into ~10-second speakable chunks internally using the same word-count math as CC Script Chunk Planner. That means the node works as a standalone one-shot - but if you do wire in prepared_segments_json from the chunk planner, it uses your chunks instead, which is how you get predictable segment_count before the LLM ever runs.
The inputs that matter
script_textandgeneration_brief- the voiceover and the "here's the product/vibe" context. The brief is where you describe the actual thing being filmed.style-none,ugc_style(the default: handheld, social-first, phone-like),cinematic, orproduct_demo. This isn't decoration; the chosen style becomes a literal block of rules the model must follow.location_policy-single_location_defaultkeeps one location across all segments (right for a product demo);allow_multi_locationlets the model cut between places when the story demands it.primary_locationanchors it if you already know the spot.audio_enabled- with native Kling audio on, the prompt tells the model to keep lines short and visible; off, it focuses on visuals only.elements_enabled- Kling "elements" (identity, emotion, angle sheets) get referenced viaactor_label(@Element1by default). Off, the model is told to reinforce identity with repeated descriptors instead.
Honestly, the two you'll touch most are script_text and style. The defaults for the rest are sane.
Outputs and wiring
llm_user_prompt goes into CC OpenAI Responses' user_prompt input. segment_count tells you how many segments the script produced - wire it onward to the gates and the frame planner. debug_json records which segment source was used (auto_chunked vs prepared_segments_json) and the totals; glance at it if the LLM's plan has mysteriously fewer segments than your script.
One honest note
Everything in this node's output is guidance. The LLM can still return garbage, add story beats you didn't ask for, or ignore the strict-JSON instruction - that's the documented weakness of letting a language model do your storyboarding (see the KB's LLM-in-ComfyUI essay for the full lecture). Keep hard_requirements filled with the non-negotiables ("always keep the product visible", "never change the character's outfit") and you'll fight it far less.
Installing it
This node ships in the Auto-Card-Generator pack by mircudx - a small MIT-licensed bundle of script-to-Kling pipeline nodes with zero pip dependencies and no model downloads (the LLM and video generation both run through APIs you bring keys for). Two ways in: ComfyUI Manager → Install Custom Nodes → search "Auto-Card-Generator", or:
cd ComfyUI/custom_nodes
git clone https://github.com/mircudx/Auto-Card-Generator
Restart ComfyUI and it shows up under "Card Creator/LLM". If you import one of the bundled workflows and get missing-node errors, use the *_local_safe_compat.json variant - it's trimmed for bare local installs. The reference workflows also expect a separate Kling custom-node pack (KlingStartEndFrameNode) to be installed; this pack provides the planning logic around it, not the Kling API calls themselves.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| script_text | STRING | — | |
| generation_brief | STRING | — | |
| style | COMBO | ugc_style | 4 options: none, ugc_style, cinematic, product_demo |
| location_policy | COMBO | single_location_default | 2 options: single_location_default, allow_multi_location |
| primary_location | STRING | — | |
| max_seconds_per_segment | FLOAT | 10.03–30 | — |
| speech_rate_wpm | INT | 14080–220 | — |
| audio_enabled | BOOLEAN | true | — |
| elements_enabled | BOOLEAN | true | — |
| prepared_segments_jsonopt | STRING | — | |
| actor_labelopt | STRING | @Element1 | — |
| elements_payload_noteopt | STRING | @Element1 is actor identity, @Element2 is emotion sheet, @Element3 is angle sheet. | — |
| hard_requirementsopt | STRING | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| llm_user_prompt | STRING | — |
| segment_count | INT | — |
| debug_json | STRING | — |