GPT 5.6 Terra
Long Structured Output From Inside the Graph
- images
- text
- raw_json
- credits_consumed
- usage_json
- credits_left
What it is
A hosted text model behind a ComfyUI socket. GPT 5.6 Terra is one of the three GPT 5.6 names KIE's catalogue lists - Sol, Luna, Terra - and this pack turns each of them into its own node under KIE Next/LLM/OpenAI/GPT. Nothing runs locally; each run is a metered call.
The name is the reseller's, taken from KIE's documentation title. There's no OpenAI model card for "Terra" and no community benchmark that ranks it against its two siblings, so the only comparison that means anything is the one you run yourself: one prompt into two nodes, then compare the text, the token counts in usage_json, and credits_consumed.
What it's genuinely good for
The most underrated use of these nodes isn't prompt prettification - it's structured output. Ask Terra for a JSON array of five prompt variations with named fields, and you get a string your graph can actually branch on, parse with a small script node, or feed into a batch of local generations. Ask for a shot list with durations and you have the input half of a video workflow. Ask for a caption and you have metadata for a dataset.
That's the job a local small model does worse: long, well-formed, strictly-shaped output. If all you need is "make this prompt prettier," a local abliterated 8B is still the right answer, because it's free, offline and instant. Spend the API money where the text must be right the first time.
Mechanism
The pack generates node classes at startup from KIE's published API documentation, so the ID is mechanical: KIE_Next_GPT_5_6_Terra_4fba87d2, slug plus an eight-character hash derived from the operation and model. Workflows you save keep resolving across pack versions as long as KIE keeps documenting the same operation.
This is a direct node - one HTTP call to the documented endpoint, one response - rather than the task-and-poll pattern the pack uses for image and video models. The pack extracts the assistant text and returns it as a STRING, and preserves the raw provider payload in raw_json.
Inputs
prompt is required and multiline; for structured work, that's where you specify the shape you want, with an example of one record. Models honour a schema they can see.
system_prompt is your enforcement mechanism. "Respond with JSON only. No prose, no markdown fences." Save yourself the parsing headaches up front.
max_output_tokens - 1 to 131072, default 4096 - matters more here than on the other siblings, because structured output is long output. A truncated JSON array is worse than an error; it looks like it parsed and then doesn't. Raise this when you're asking for records.
reasoning_effort is low, medium, high or xhigh and defaults to high. For "expand this into a cinematic prompt," lower it; the token savings and latency are real and the quality difference is usually invisible.
images takes one optional IMAGE - the pack uploads it and passes the URL, which lets you caption or critique an image inside the graph. web_search enables KIE's web-search tool where supported, handy when a prompt has to reference a real product or place. tools_json is for tool/function definitions and stays [] unless you're building something agentic. history_json carries prior messages as JSON, and since the node has no memory between executions, it's the only way to hold a conversation. expert_override_json merges raw JSON into the request for anything the pack doesn't expose.
Outputs
text is what you wire onward. raw_json is the full response and your first debugging stop. usage_json reports tokens - the fastest way to learn what a reasoning setting actually costs you. credits_consumed and credits_left give the spend, and the same values show as a receipt on the node after a successful run.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/felipederosilva/ComfyUI-KIE-Nodes-Next
pip install -r requirements.txt
Restart ComfyUI, then set your key once at Settings → KIE.ai Nodes Next → Connection → Paste / replace KIE.ai API key. The pack validates a new key against KIE before replacing a working one and only ever displays a masked fingerprint. For headless installs, KIE_API_KEY in the environment takes priority. Dependencies are requests, Pillow, numpy, PyYAML; the LLM nodes pull in nothing extra and download nothing. Manager/Registry installation is described in the README as "prepared" rather than available, so if a Manager search doesn't find the pack, clone it or drop a ZIP from dist/ into custom_nodes.
Practical notes
Menu empty after install? The pack ships a small offline bootstrap and fills the rest from KIE's live catalogue on first launch. Restart once, or run the Refresh Model Catalog node. The catalogue is re-checked periodically, so new models can appear without a pack update - and retired ones can disappear.
JSON is not guaranteed. No hosted endpoint truly enforces a schema for you. Validate before you parse, and put a fallback in your graph for the one run in twenty that adds a friendly sentence above the array.
Bill per call, not per prompt. A batch loop that executes this node per image is a metered request per image. Land the text in a save or preview first when you're iterating.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | User prompt / message. | |
| system_promptopt | STRING | — | |
| streamopt | BOOLEAN | false | — |
| tools_jsonopt | STRING | [] | Optional function/tool definitions supported by this model endpoint. |
| history_jsonopt | STRING | [] | Optional prior message/input array as JSON. |
| imagesopt | IMAGE | — | |
| reasoning_effortopt | COMBO | high | 4 options: low, medium, high, xhigh |
| web_searchopt | BOOLEAN | false | Use KIE's web-search tool where this endpoint supports it. |
| max_output_tokensopt | INT | 40961–131072 | — |
| expert_override_jsonopt | STRING | {} | Expert-only request overrides. Normal use does not require this. |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |
| raw_json | STRING | — |
| credits_consumed | FLOAT | — |
| usage_json | STRING | — |
| credits_left | FLOAT | — |