For the complete documentation index, see llms.txt. This page is also available as Markdown.
iai services update
Update a service in a project
Synopsis
Update a service in a specific project.
Only the flags you pass are applied; everything else is left at its current value.
Lists (--env, --secret) replace the entire current list when provided — pass every value you want to keep.
Replicas and autoscaling are mutually exclusive: passing --replicas disables autoscaling, and passing any --autoscaling-* flag switches back to autoscaling.
For schedules, passing --schedule-uptime auto-clears any existing downtime, and --schedule-downtime auto-clears any existing uptime. Pass --schedule-timezone alongside either to change the timezone.
Use --clear-env, --clear-secret, --clear-healthcheck, --clear-schedule, or --clear-stack-id to remove those configurations entirely.
Before applying, the CLI prints deploy-awareness output to stderr: the live revision this update replaces, and the names of any env vars or secret refs that --env/--secret would drop from the live service (the flags replace the entire list). The update is refused when it would drop live env vars or secret refs via --env/--secret; pass --force to apply anyway. --clear-env and --clear-secret never trigger the gate: clearing is explicit intent. The checks fail open when live state cannot be fetched; use --expect-revision to fail instead when the live revision differs from what you expect.
--autoscaling-cpu-percentage int CPU percentage threshold for autoscaling
--autoscaling-max-replicas int Maximum number of replicas for autoscaling
--autoscaling-memory-percentage int Memory percentage threshold for autoscaling
--autoscaling-min-replicas int Minimum number of replicas for autoscaling
--clear-env Remove all environment variables from the service
--clear-healthcheck Remove the healthcheck configuration from the service
--clear-schedule Remove the schedule configuration from the service
--clear-secret Remove all secret references from the service
--clear-stack-id Remove the service from its stack
--cpu string CPU cores or millicores (e.g. 0.5, 1, 2, 500m, 1000m)
--endpoint Expose the service at <service-name>-<project-hash>.interactive.ai
--env stringArray Environment variable (NAME=VALUE); can be repeated
--expect-revision int Fail without applying unless the live revision equals this value; 0 is valid and matches a never-updated service (opt-in staleness guard)
--force Apply even when the update would drop live env vars or secret refs
--healthcheck-initial-delay int Initial delay in seconds before starting healthchecks
--healthcheck-path string HTTP path for healthcheck endpoint (e.g. /health)
-h, --help help for update
--image-name string Container image name
--image-repository string Container image repository (external images only)
--image-tag string Container image tag
--image-type string Image type: 'external' (Docker Hub, ghcr.io) or 'internal' (InteractiveAI private registry)
--memory string Memory in megabytes (M) or gigabytes (G) (e.g. 128M, 512M, 1G, 1.5G)
-o, --organization string Organization name that owns the project
--port int Service port to expose
-p, --project string Project name to update the service in
--replicas int Number of replicas for the service (mutually exclusive with autoscaling)
--schedule-downtime string When the service should be scaled down (mutually exclusive with --schedule-uptime). Format: comma-separated entries of DAY_FROM-DAY_TO HH:MM-HH:MM. Weekdays: Mon, Tue, Wed, Thu, Fri, Sat, Sun (case-insensitive). Times in 24h format; start: 00:00-23:59, end: 00:00-24:00 (24:00 = end of day). Example: 'Sat-Sun 00:00-24:00'
--schedule-timezone string IANA timezone for the schedule (e.g. Europe/Berlin, US/Eastern, UTC); required with --schedule-uptime or --schedule-downtime
--schedule-uptime string When the service should be running (mutually exclusive with --schedule-downtime). Format: comma-separated entries of DAY_FROM-DAY_TO HH:MM-HH:MM. Weekdays: Mon, Tue, Wed, Thu, Fri, Sat, Sun (case-insensitive). Times in 24h format; start: 00:00-23:59, end: 00:00-24:00 (24:00 = end of day). Example: 'Mon-Fri 07:30-20:30' or 'Mon-Fri 08:00-18:00, Sat 10:00-14:00'
--secret stringArray Secrets to be loaded as env vars; can be repeated
--stack-id string Stack ID to assign the service to
--api-key string API key for authentication
--cfg-file string Path to YAML config file with organization, project, and optional service definitions
--deployment-hostname string Hostname for the deployment API (default "https://deployment.interactive.ai")
--hostname string Hostname for the API (default "https://app.interactive.ai")