{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/scale-ai/json-schema/scale-ai-agentex-cloud-deploy-create-request-schema.json",
  "title": "AgentexCloudDeployCreateRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/scale-ai-agentex-cloud-deploy-api-openapi.yml#/components/schemas/AgentexCloudDeployCreateRequest",
  "properties": {
    "build_id": {
      "title": "Build Id",
      "description": "The build_id of the cloud build. Required if image_name and image_tag are not provided.",
      "type": "string"
    },
    "manifest_file": {
      "type": "string",
      "title": "Manifest File",
      "description": "YAML content of manifest configuration."
    },
    "environment_config": {
      "type": "string",
      "title": "Environment Config",
      "description": "YAML content of environment configuration from the environment config file."
    },
    "image_name": {
      "title": "Image Name",
      "description": "Name of the image to deploy. Required if build_id is not provided.",
      "type": "string"
    },
    "image_tag": {
      "title": "Image Tag",
      "description": "Tag of the image to deploy. Required if build_id is not provided.",
      "type": "string"
    },
    "preview": {
      "title": "Preview",
      "description": "When True, creates a preview deployment with a unique deployment-id suffix appended to the helm release name.",
      "default": false,
      "type": "boolean"
    },
    "preview_label": {
      "title": "Preview Label",
      "description": "Non-unique grouping label for the preview (e.g. branch name, PR number). Persisted on the deployment record so callers can list all deploys for a given label via `GET /v5/agentex/deployments?preview_label=X&limit=1` (get the latest). Sanitized to lowercase alphanumeric + hyphens for K8s DNS-label compatibility (max 30 characters after sanitization). Each deploy still gets a unique helm release name regardless of label, so concurrent redeploys never share K8s resources. Only valid when preview=True.",
      "type": "string"
    },
    "expires_at": {
      "title": "Expires At",
      "description": "ISO 8601 expiry timestamp. Only valid for preview deployments. If omitted on a preview deployment, defaults to 8 hours from now. Previews are always ephemeral and always have an expires_at.",
      "type": "string",
      "format": "date-time"
    }
  },
  "type": "object",
  "required": [
    "manifest_file",
    "environment_config"
  ]
}