{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pho-chat/json-schema/pho-chat-create-run-schema.json",
  "title": "CreateRun",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pho-chat-openapi.json#/components/schemas/CreateRun",
  "type": "object",
  "required": [
    "agent",
    "input"
  ],
  "additionalProperties": false,
  "properties": {
    "agent": {
      "type": "string"
    },
    "input": {
      "type": "string",
      "minLength": 8,
      "maxLength": 4000
    },
    "locale": {
      "type": "string",
      "enum": [
        "vi",
        "en"
      ]
    },
    "inputs": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "goal_title": {
          "type": "string",
          "maxLength": 200
        },
        "deliverable": {
          "type": "string",
          "enum": [
            "review",
            "table",
            "brief"
          ]
        },
        "scope": {
          "type": "array",
          "maxItems": 8,
          "items": {
            "type": "string",
            "maxLength": 160
          }
        },
        "year_from": {
          "type": "integer",
          "minimum": 1900,
          "maximum": 2100
        }
      }
    },
    "model": {
      "type": "object",
      "required": [
        "provider",
        "model"
      ],
      "properties": {
        "provider": {
          "type": "string"
        },
        "model": {
          "type": "string"
        }
      }
    },
    "webhook_url": {
      "type": "string",
      "format": "uri",
      "description": "https, public host, default port"
    }
  }
}