APNext H3 Claude Code Reference Writer
MiniMax-H3 full-reference prompts, researched and written by Claude Code
- llm
- image_1
- image_2
- image_3
- image_4
- image_5
- image_6
- image_7
- image_8
- image_9
- h3_prompt
- subject_definitions
- summary
- retention_analysis
- detailed_description
- overall_soundscape
- non_diegetic_music
- session_id
- info
- image_1
- image_2
- image_3
- image_4
- image_5
- image_6
- image_7
- image_8
- image_9
This is the Claude Code version of the H3 Reference Prompt Writer: same six-section full-reference format, same <Subject N>/<Picture N> label rules, same retention_analysis - but the model writing it is your locally installed Claude Code CLI, billing your subscription seat instead of an API key. If you've read the plain H3 Ref Prompt Writer article, you know the format; this one just answers the "who writes it and what can it look up" question differently.
It inherits every option from the reference writer - idea, task_type (the bracketed summary prefix: keyframe completion, reference generation, video editing, video continuation, audio reuse, audio reference), reference_role, word_target, shot_plan, visual_style, wildness, the camera vocabulary, include_dialogue and dialogue_language, plus four reference image inputs (image_1–image_4) and reference_notes for describing what must survive or for video/audio references you can't attach.
Why this variant
Two reasons, same as its base-format sibling. The research toggle sends the CLI to the web before writing - the real location, the wardrobe, the light, the physics - and folds what it finds into the prompt as concrete visual detail, with no citations and no commentary in the output. For full-reference work that's genuinely useful: reference images give you the subject, research gives you the world it moves through, and both end up in the same structured prompt.
And it returns a session_id instead of model_used. That's the hook for refinement - wire it into the H3 Claude Code Refiner and describe the change in plain language ("keep the cardigan, move the market to dawn") with the guide, your reference images and the model's reasoning still in context. It also accepts a resume_session_id of its own and an optional working_dir for a script or lookbook the CLI may read.
Model aliases (sonnet, opus, haiku, fable, default), use_subscription, timeout_seconds (default 900 - reference rewrites are long) and seed all behave as on the other Claude Code nodes.
Install
Pack install is the shared routine - ComfyUI Manager (search "comfyui_dagthomas") or:
cd ComfyUI/custom_nodes
git clone https://github.com/dagthomas/comfyui_dagthomas
cd comfyui_dagthomas
pip install -r requirements.txt
Restart, then make sure the Claude Code CLI is installed and logged in once (claude on PATH, or CLAUDE_CODE_PATH set). No ComfyUI-side API key needed. The reference images and guide files live in the pack already - nothing extra to download.
Common issues
- References not sticking - the model can only track what it can see; verify your images are actually connected to
image_1–image_4, and lean onreference_notesto say plainly what must be preserved. - Slow with research on - a full-reference rewrite plus web fetches is a long agent loop. Bump
timeout_secondsrather than killing the queue mid-run. - Subscription window - heavy batches can exhaust your plan's rolling limit; the node prints a warning when it hits it. That's the price of the seat.
Inputs (46)
| Name | Type | Default | Description |
|---|---|---|---|
| idea | STRING | Your short prompt: what should happen in the target video. | |
| task_type | COMBO | Auto (decide from the references) | Square-bracketed prefix of the summary section. Auto lets the model combine types with ' + '. |
| reference_role | COMBO | Auto (decide per image) | How the attached images should be labelled in subject_definitions. |
| duration_seconds | FLOAT | 8.01–60 | — |
| shot_plan | COMBO | Auto | 5 options: Auto, Single shot, Two shots, Three shots, Four shots |
| visual_style | COMBO | Auto | In full-reference mode the style is stated in one or two sentences BEFORE [Shot 1]. The list is the guide's styles plus the APNext Cinematic vocabulary (film stock, grading, aesthetics); pick Custom and fill in custom_visual_style to write your own. |
| wildness | INT | 250–100 | 0 = literal and conservative, 100 = fully unhinged. Above 40 the node also injects concrete surreal elements picked from the seed. |
| word_target | INT | 425150–1200 | Target length of detailed_description. The guide recommends 350-500 words for generation tasks. |
| camera_motion | COMBO | Auto | 21 options: Auto, Static Shot, Zoom In, Zoom Out, Push In, Pull Out, +15 |
| camera_amplitude | COMBO | Auto | 4 options: Auto, with small amplitude, medium (omit), with large amplitude |
| camera_speed | COMBO | Auto | 4 options: Auto, at slow speed, normal (omit), at fast speed |
| include_dialogue | BOOLEAN | true | — |
| dialogue_language | COMBO | English | The language the characters actually speak, and the tag written inside <d>[...]</d>. Auto lets the model pick one that fits the setting. Pick Custom (or just fill in custom_dialogue_language) for anything not listed. |
| include_on_screen_text | BOOLEAN | false | — |
| include_soundscape | BOOLEAN | true | — |
| include_non_diegetic_music | BOOLEAN | true | — |
| model | COMBO | sonnet | Who writes the prompt. sonnet / opus / haiku / fable / default are Claude Code aliases (`default` = whatever the CLI is configured for). `codex` is the OpenAI Codex CLI with its configured model (shown when installed; `codex:<model-id>` in an H3 LLM Backend picks a specific one). ollama: / lmstudio: / local: entries are whatever your local servers were serving when the page loaded; pick one to run fully offline. Anything not listed goes in model_override. |
| research | BOOLEAN | false | Let the agent CLI (Claude Code or Codex) search the web for real references before writing - the actual location, wardrobe, lighting and physics. Slower, and it reaches the internet. |
| director | BOOLEAN | true | Load the H3 director skills (data/h3/skills): the core writing rules, the format this node emits, and style/motion craft, each with a reference library of gold examples and style anchors that Claude Code reads on demand. Costs a few extra seconds and tokens per run. |
| use_subscription | BOOLEAN | true | Hide the API key from the CLI so it uses your login and subscription seat (ANTHROPIC_API_KEY for Claude Code, OPENAI_API_KEY for Codex). Turn off to bill the API key instead. |
| timeout_seconds | INT | 120060–7200 | How long to wait PER CALL before the node gives up on the CLI (this is the node's own watchdog, not a Claude limit). Single H3 prompts take 25-60s; a multi-scene chunk with director/research on can take 10-20 minutes. The multi-scene writers retry a timed-out chunk at half size automatically. |
| seed | INT | -1-1–18446744073709550000 | Picks the surreal elements at high wildness, and controls ComfyUI caching. -1 re-rolls and re-runs every queue. |
| reference_notesopt | STRING | Optional per-reference notes, one per line, e.g. 'Image 1: the woman, keep her cardigan'. Also use this to describe video or audio references you cannot attach. | |
| extra_instructionsopt | STRING | — | |
| custom_dialogue_languageopt | STRING | Any language or dialect not in the dropdown, e.g. 'Norwegian (Bergen dialect)' or 'Latin'. Overrides the dropdown when filled in. | |
| custom_visual_styleopt | STRING | Any visual style not in the dropdown, e.g. 'hand-painted cel animation' or 'Kodak Vision3 500T, anamorphic'. Overrides the dropdown when filled in. | |
| resume_session_idopt | STRING | Continue an earlier run by feeding it that node's session_id. The whole conversation, images included, is still in context. A session sticks to its backend: Claude Code ids resume with Claude Code, `codex-` ids with Codex, `local-` ids with the same local model. | |
| working_diropt | STRING | A folder Claude Code may read while writing - a script, a shot list, lookbook notes. Empty uses a throwaway scratch folder, which is the safe default. | |
| llmopt | APNEXT_LLM | Optional. Connect an APNext H3 LLM Backend node to write with Ollama, LM Studio, another OpenAI-compatible server or an API model instead of Claude Code. Overrides the model dropdown while connected. | |
| context_1opt | STRING | Steering input from another APNext node (Time, Scene, Poses, Plots, Feelings, Cinematic, Science, Geography, Architecture, Fashion, ...). The node detects which kind it is and tells Claude how to use it. Sockets grow as you connect them. | |
| context_2opt | STRING | Steering input from another APNext node (Time, Scene, Poses, Plots, Feelings, Cinematic, Science, Geography, Architecture, Fashion, ...). The node detects which kind it is and tells Claude how to use it. Sockets grow as you connect them. | |
| context_3opt | STRING | Steering input from another APNext node (Time, Scene, Poses, Plots, Feelings, Cinematic, Science, Geography, Architecture, Fashion, ...). The node detects which kind it is and tells Claude how to use it. Sockets grow as you connect them. | |
| context_4opt | STRING | Steering input from another APNext node (Time, Scene, Poses, Plots, Feelings, Cinematic, Science, Geography, Architecture, Fashion, ...). The node detects which kind it is and tells Claude how to use it. Sockets grow as you connect them. | |
| context_5opt | STRING | Steering input from another APNext node (Time, Scene, Poses, Plots, Feelings, Cinematic, Science, Geography, Architecture, Fashion, ...). The node detects which kind it is and tells Claude how to use it. Sockets grow as you connect them. | |
| context_6opt | STRING | Steering input from another APNext node (Time, Scene, Poses, Plots, Feelings, Cinematic, Science, Geography, Architecture, Fashion, ...). The node detects which kind it is and tells Claude how to use it. Sockets grow as you connect them. | |
| context_7opt | STRING | Steering input from another APNext node (Time, Scene, Poses, Plots, Feelings, Cinematic, Science, Geography, Architecture, Fashion, ...). The node detects which kind it is and tells Claude how to use it. Sockets grow as you connect them. | |
| context_8opt | STRING | Steering input from another APNext node (Time, Scene, Poses, Plots, Feelings, Cinematic, Science, Geography, Architecture, Fashion, ...). The node detects which kind it is and tells Claude how to use it. Sockets grow as you connect them. | |
| image_1opt | IMAGE | Reference image 1: <Picture 1> in the prompt. Connect the same image to image_1 on the MiniMax H3 Reference to Video node, or use this node's image_1 output. | |
| image_2opt | IMAGE | Reference image 2: <Picture 2> in the prompt. Connect the same image to image_2 on the MiniMax H3 Reference to Video node, or use this node's image_2 output. | |
| image_3opt | IMAGE | Reference image 3: <Picture 3> in the prompt. Connect the same image to image_3 on the MiniMax H3 Reference to Video node, or use this node's image_3 output. | |
| image_4opt | IMAGE | Reference image 4: <Picture 4> in the prompt. Connect the same image to image_4 on the MiniMax H3 Reference to Video node, or use this node's image_4 output. | |
| image_5opt | IMAGE | Reference image 5: <Picture 5> in the prompt. Connect the same image to image_5 on the MiniMax H3 Reference to Video node, or use this node's image_5 output. | |
| image_6opt | IMAGE | Reference image 6: <Picture 6> in the prompt. Connect the same image to image_6 on the MiniMax H3 Reference to Video node, or use this node's image_6 output. | |
| image_7opt | IMAGE | Reference image 7: <Picture 7> in the prompt. Connect the same image to image_7 on the MiniMax H3 Reference to Video node, or use this node's image_7 output. | |
| image_8opt | IMAGE | Reference image 8: <Picture 8> in the prompt. Connect the same image to image_8 on the MiniMax H3 Reference to Video node, or use this node's image_8 output. | |
| image_9opt | IMAGE | Reference image 9: <Picture 9> in the prompt. Connect the same image to image_9 on the MiniMax H3 Reference to Video node, or use this node's image_9 output. |
Outputs (18)
| Name | Type | Description |
|---|---|---|
| h3_prompt | STRING | — |
| subject_definitions | STRING | — |
| summary | STRING | — |
| retention_analysis | STRING | — |
| detailed_description | STRING | — |
| overall_soundscape | STRING | — |
| non_diegetic_music | STRING | — |
| session_id | STRING | — |
| info | STRING | — |
| image_1 | IMAGE | — |
| image_2 | IMAGE | — |
| image_3 | IMAGE | — |
| image_4 | IMAGE | — |
| image_5 | IMAGE | — |
| image_6 | IMAGE | — |
| image_7 | IMAGE | — |
| image_8 | IMAGE | — |
| image_9 | IMAGE | — |