ComfyUI > Nodes > ComfyUI-Kie-API > KIE Parse Prompt Grid JSON (1..9)

ComfyUI Node: KIE Parse Prompt Grid JSON (1..9)

Class Name

KIEParsePromptGridJSON

Category
kie/helpers
Author
gateway (Account age: 5593days)
Extension
ComfyUI-Kie-API
Latest Updated
2026-04-05
Github Stars
0.02K

How to Install ComfyUI-Kie-API

Install this extension via the ComfyUI Manager by searching for ComfyUI-Kie-API
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-Kie-API in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

KIE Parse Prompt Grid JSON (1..9) Description

Parses JSON from LLMs to extract up to nine prompts, aiding AI artists in managing data.

KIE Parse Prompt Grid JSON (1..9):

The KIEParsePromptGridJSON node is designed to efficiently parse JSON data generated by language models (LLMs) to extract up to nine distinct prompts. This node is particularly useful for AI artists and developers who work with LLMs and need to handle multiple prompts in a structured manner. By converting raw JSON input into separate prompt strings, this node simplifies the process of managing and utilizing multiple prompts for creative or automation tasks. It ensures that even if the JSON data is not perfectly structured, the node can attempt to clean and extract meaningful prompts, providing a robust solution for handling JSON data in creative workflows.

KIE Parse Prompt Grid JSON (1..9) Input Parameters:

json_text

The json_text parameter is a required input that takes a raw JSON string from a language model, which can be either a list or an object. This parameter is crucial as it serves as the primary source of data from which the node will attempt to extract prompts. The JSON text should ideally contain structured data that the node can parse into individual prompts.

default_prompt

The default_prompt is an optional string parameter that acts as a fallback prompt in case the parsing process does not yield any valid prompts. This ensures that there is always a prompt available, even if the JSON input is empty or improperly formatted. The default value is an empty string, and it can be customized to suit specific needs.

max_items

The max_items parameter is an optional integer that limits the number of prompts to be extracted, with a range from 1 to 9. This parameter allows you to control the maximum number of prompts you want to handle, ensuring that the output remains manageable and within the desired scope. The default value is 9.

strict

The strict parameter is an optional boolean that determines whether the node should raise errors when parsing fails or yields no prompts. When set to true, the node will enforce strict parsing rules and report errors if the JSON input is not properly structured. The default value is false, allowing for more lenient parsing.

debug

The debug parameter is an optional boolean that, when enabled, provides additional debugging information during the parsing process. This can be useful for troubleshooting and understanding how the node processes the JSON input. The default value is false.

KIE Parse Prompt Grid JSON (1..9) Output Parameters:

p1..p9

These are the output parameters representing up to nine individual prompt strings extracted from the JSON input. Each parameter corresponds to a separate prompt, and if fewer than nine prompts are extracted, the remaining outputs will be empty strings. These outputs allow you to easily access and utilize each prompt separately.

count

The count output is an integer representing the number of prompts successfully parsed from the JSON input. This provides a quick overview of how many prompts were extracted, which can be useful for further processing or validation.

prompts_list

The prompts_list output is a raw list of all the prompts extracted from the JSON input. This list can be used for future automation tasks or for further manipulation within your workflow, providing a comprehensive view of all the parsed prompts.

KIE Parse Prompt Grid JSON (1..9) Usage Tips:

  • Ensure that the json_text input is as clean and structured as possible to facilitate accurate parsing of prompts.
  • Use the default_prompt parameter to provide a fallback option, ensuring that your workflow continues smoothly even if the JSON input is not ideal.
  • Adjust the max_items parameter according to your specific needs to control the number of prompts you want to handle.

KIE Parse Prompt Grid JSON (1..9) Common Errors and Solutions:

Failed to parse JSON from json_text. Ensure the input contains a JSON object or array.

  • Explanation: This error occurs when the input JSON text is not properly formatted or does not contain a valid JSON object or array.
  • Solution: Verify that the json_text input is correctly formatted as a JSON object or array. Use a JSON validator to check for syntax errors.

No prompts found in json_text and no default_prompt provided.

  • Explanation: This error indicates that the parsing process did not yield any prompts, and no default prompt was specified.
  • Solution: Ensure that the json_text contains valid prompt data. If necessary, provide a default_prompt to serve as a fallback option.

KIE Parse Prompt Grid JSON (1..9) Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-Kie-API
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

KIE Parse Prompt Grid JSON (1..9)