{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/langflow/json-schema/langflow-run-response-schema.json",
  "title": "RunResponse",
  "description": "Run response schema.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/langflow-base-api-openapi.yml#/components/schemas/RunResponse",
  "properties": {
    "outputs": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/RunOutputs"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": [],
      "title": "Outputs"
    },
    "session_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Session Id"
    }
  },
  "type": "object",
  "$defs": {
    "ChatOutputResponse": {
      "description": "Chat output response schema.",
      "properties": {
        "component_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Component Id"
        },
        "files": {
          "default": [],
          "items": {
            "$ref": "#/$defs/lfx__utils__schemas__File"
          },
          "title": "Files",
          "type": "array"
        },
        "message": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "items": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "additionalProperties": true,
                    "type": "object"
                  }
                ]
              },
              "type": "array"
            }
          ],
          "title": "Message"
        },
        "sender": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": "Machine",
          "title": "Sender"
        },
        "sender_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": "AI",
          "title": "Sender Name"
        },
        "session_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Session Id"
        },
        "stream_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Stream Url"
        },
        "type": {
          "title": "Type",
          "type": "string"
        }
      },
      "required": [
        "message",
        "type"
      ],
      "title": "ChatOutputResponse",
      "type": "object"
    },
    "ResultData": {
      "properties": {
        "artifacts": {
          "anyOf": [
            {},
            {
              "type": "null"
            }
          ],
          "title": "Artifacts"
        },
        "component_display_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Component Display Name"
        },
        "component_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Component Id"
        },
        "duration": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Duration"
        },
        "logs": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Logs"
        },
        "messages": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/ChatOutputResponse"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Messages"
        },
        "outputs": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Outputs"
        },
        "results": {
          "anyOf": [
            {},
            {
              "type": "null"
            }
          ],
          "title": "Results"
        },
        "timedelta": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Timedelta"
        },
        "token_usage": {
          "anyOf": [
            {
              "$ref": "#/$defs/Usage"
            },
            {
              "type": "null"
            }
          ]
        },
        "used_frozen_result": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": false,
          "title": "Used Frozen Result"
        }
      },
      "title": "ResultData",
      "type": "object"
    },
    "RunOutputs": {
      "properties": {
        "inputs": {
          "additionalProperties": true,
          "title": "Inputs",
          "type": "object"
        },
        "outputs": {
          "items": {
            "anyOf": [
              {
                "$ref": "#/$defs/ResultData"
              },
              {
                "type": "null"
              }
            ]
          },
          "title": "Outputs",
          "type": "array"
        }
      },
      "title": "RunOutputs",
      "type": "object"
    },
    "Usage": {
      "description": "Token usage information from LLM responses.",
      "properties": {
        "input_tokens": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Input Tokens"
        },
        "output_tokens": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Output Tokens"
        },
        "total_tokens": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Total Tokens"
        }
      },
      "title": "Usage",
      "type": "object"
    },
    "lfx__utils__schemas__File": {
      "description": "File schema.",
      "properties": {
        "name": {
          "title": "Name",
          "type": "string"
        },
        "path": {
          "title": "Path",
          "type": "string"
        },
        "type": {
          "title": "Type",
          "type": "string"
        }
      },
      "required": [
        "path",
        "name",
        "type"
      ],
      "title": "File",
      "type": "object"
    }
  }
}