APNext H3 Claude Code Reference Writer
MiniMax-H3 full-reference prompts, researched and written by Claude Code
- image_1
- image_2
- image_3
- image_4
- h3_prompt
- subject_definitions
- summary
- retention_analysis
- detailed_description
- overall_soundscape
- non_diegetic_music
- session_id
- info
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 (30)
| 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]. |
| 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 | Claude Code model alias. `default` uses whatever the CLI is configured for. |
| research | BOOLEAN | false | Let Claude Code search the web for real references before writing - the actual location, wardrobe, lighting and physics. Slower, and it reaches the internet. |
| use_subscription | BOOLEAN | true | Hide ANTHROPIC_API_KEY from the CLI so it uses your Claude Code login and subscription seat. Turn off to bill the API key instead. |
| timeout_seconds | INT | 90060–3600 | How long to wait. H3 prompts take 25-60s; research runs take longer. |
| seed | INT | -1-1–18446744073709550000 | Picks the surreal elements at high wildness, and controls ComfyUI caching. -1 re-rolls and re-runs every queue. |
| image_1opt | IMAGE | — | |
| image_2opt | IMAGE | — | |
| image_3opt | IMAGE | — | |
| image_4opt | IMAGE | — | |
| 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. | |
| resume_session_idopt | STRING | Continue an earlier Claude Code run by feeding it that node's session_id. The whole conversation, images included, is still in context. | |
| 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. |
Outputs (9)
| 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 | — |