Node Schema

Status: 200 OK

API: https://catalog.chengos.dev/api/v1/nodes/schema/ai%2Fllm

Generated At: 2026-06-24T19:12:29.366Z

Source: Catalog API Docs

{
  "data": {
    "typeId": "ai/llm",
    "name": "AI Chat",
    "category": "agent",
    "description": "Call large language model for dialogue generation",
    "inputSchema": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "description": "Input for LLM node.",
      "properties": {
        "context": {
          "additionalProperties": true,
          "default": null,
          "description": "AgentContext (optional, carries conversation history)",
          "title": "Agent Context",
          "type": "object",
          "x-i18n-key": "nodes.ai.llm.inputs.context",
          "x-port": true
        },
        "image_base64": {
          "default": null,
          "description": "Base64 image payload or data URL, connectable from io/file_upload.image_base64",
          "title": "Image Base64",
          "type": "string",
          "x-i18n-key": "nodes.ai.llm.inputs.image_base64",
          "x-port": true
        },
        "llm_config": {
          "additionalProperties": true,
          "description": "LLM configuration (JSON string or object)",
          "title": "LLM Config",
          "type": "object",
          "x-control": "text",
          "x-i18n-key": "nodes.ai.llm.inputs.llm_config",
          "x-port": true
        },
        "system_prompt": {
          "default": "",
          "description": "System prompt (optional)",
          "maxLength": 50000,
          "title": "System Prompt",
          "type": "string",
          "x-control": "textarea",
          "x-i18n-key": "nodes.ai.llm.inputs.system_prompt"
        },
        "tools": {
          "default": null,
          "description": "Tool/function definitions (JSON array for function calling)",
          "title": "Tools",
          "x-i18n-key": "nodes.ai.llm.inputs.tools"
        },
        "user_message": {
          "default": "",
          "description": "User message (can be empty if context.history already contains user messages)",
          "maxLength": 200000,
          "title": "User Message",
          "type": "string",
          "x-control": "textarea",
          "x-i18n-key": "nodes.ai.llm.inputs.user_message"
        },
        "user_message_rich": {
          "additionalProperties": true,
          "default": null,
          "description": "Structured user message with multimodal parts",
          "title": "User Message Rich",
          "type": "object",
          "x-i18n-key": "nodes.ai.llm.inputs.user_message_rich",
          "x-port": true
        }
      },
      "required": [
        "llm_config"
      ],
      "title": "AiLlmInput",
      "type": "object",
      "x-collapsed-visible": [
        "user_message",
        "llm_config"
      ],
      "x-field-order": [
        "context",
        "llm_config",
        "system_prompt",
        "user_message",
        "user_message_rich",
        "image_base64",
        "tools"
      ]
    },
    "outputSchema": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "definitions": {
        "FunctionCall": {
          "description": "Function call details.",
          "properties": {
            "arguments": {
              "type": "string"
            },
            "name": {
              "type": "string"
            }
          },
          "required": [
            "arguments",
            "name"
          ],
          "type": "object"
        },
        "ToolCall": {
          "description": "Tool call made by the LLM.\n\n# Examples\n\n``` use cheng_llm::types::ToolCall;\n\nlet tool_call = ToolCall { id: \"call_123\".to_string(), function: cheng_llm::types::FunctionCall { name: \"get_weather\".to_string(), arguments: r#\"{\"location\": \"Tokyo\"}\"#.to_string(), }, index: None, }; ```",
          "properties": {
            "function": {
              "$ref": "#/definitions/FunctionCall"
            },
            "id": {
              "type": "string"
            },
            "index": {
              "description": "Index in the tool calls array (used for streaming)",
              "format": "uint32",
              "minimum": 0,
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "required": [
            "function",
            "id"
          ],
          "type": "object"
        },
        "ToolExecutionResult": {
          "description": "Result of a single tool execution",
          "properties": {
            "call_id": {
              "description": "Tool call ID (for matching with LLM request)",
              "type": "string"
            },
            "duration_ms": {
              "description": "Execution duration in milliseconds",
              "format": "uint64",
              "minimum": 0,
              "type": "integer"
            },
            "error": {
              "description": "Error message if failed",
              "type": [
                "string",
                "null"
              ]
            },
            "output": {
              "description": "Execution output",
              "type": "string"
            },
            "success": {
              "description": "Whether execution succeeded",
              "type": "boolean"
            },
            "tool_name": {
              "description": "Tool name",
              "type": "string"
            }
          },
          "required": [
            "call_id",
            "duration_ms",
            "output",
            "success",
            "tool_name"
          ],
          "type": "object"
        }
      },
      "description": "Output from LLM node.",
      "properties": {
        "completion_tokens": {
          "description": "Tokens used in completion",
          "format": "uint32",
          "minimum": 0,
          "title": "Completion Tokens",
          "type": "integer",
          "x-i18n-key": "nodes.ai.llm.outputs.completion_tokens"
        },
        "context": {
          "additionalProperties": true,
          "description": "AgentContext output port (contains conversation history)",
          "title": "Agent Context",
          "type": "object",
          "x-i18n-key": "nodes.ai.llm.outputs.context",
          "x-port": true
        },
        "finish_reason": {
          "description": "Finish reason",
          "title": "Finish Reason",
          "type": "string",
          "x-i18n-key": "nodes.ai.llm.outputs.finish_reason"
        },
        "llm_config": {
          "additionalProperties": true,
          "description": "LLM configuration used for this call (reusable by downstream nodes)",
          "title": "LLM Config",
          "type": "object",
          "x-control": "text",
          "x-i18n-key": "nodes.ai.llm.outputs.llm_config",
          "x-port": true
        },
        "prompt_tokens": {
          "description": "Tokens used in prompt",
          "format": "uint32",
          "minimum": 0,
          "title": "Prompt Tokens",
          "type": "integer",
          "x-i18n-key": "nodes.ai.llm.outputs.prompt_tokens"
        },
        "response": {
          "description": "Generated text response",
          "title": "Response",
          "type": "string",
          "x-i18n-key": "nodes.ai.llm.outputs.response"
        },
        "tool_calls": {
          "description": "Tool calls made by the LLM (for function calling)",
          "items": {
            "$ref": "#/definitions/ToolCall"
          },
          "title": "Tool Calls",
          "type": [
            "array",
            "null"
          ],
          "x-i18n-key": "nodes.ai.llm.outputs.tool_calls"
        },
        "tool_results": {
          "description": "Tool execution results (when tools are connected and auto-executed)",
          "items": {
            "$ref": "#/definitions/ToolExecutionResult"
          },
          "title": "Tool Results",
          "type": [
            "array",
            "null"
          ],
          "x-i18n-key": "nodes.ai.llm.outputs.tool_results"
        },
        "total_tokens": {
          "description": "Total tokens used",
          "format": "uint32",
          "minimum": 0,
          "title": "Total Tokens",
          "type": "integer",
          "x-i18n-key": "nodes.ai.llm.outputs.total_tokens"
        }
      },
      "required": [
        "completion_tokens",
        "context",
        "finish_reason",
        "llm_config",
        "prompt_tokens",
        "response",
        "total_tokens"
      ],
      "title": "AiLlmOutput",
      "type": "object",
      "x-collapsed-visible": [
        "context",
        "response"
      ],
      "x-field-order": [
        "context",
        "response",
        "prompt_tokens",
        "completion_tokens",
        "total_tokens",
        "finish_reason",
        "tool_calls",
        "tool_results",
        "llm_config"
      ]
    },
    "builtin": true,
    "i18nKeyPrefix": "nodes.ai.llm"
  },
  "timestamp": "2026-06-24T19:12:29.598285825+00:00"
}