---
title: "Update a deployment"
method: PATCH
path: "/deployments/{id}"
tags: ["Deployments"]
---

# Update a deployment

`PATCH /deployments/{id}`

Update an existing deployment configuration

## Path parameters

- `id` string, required — Deployment ID or name

## Request body

- UpdateDeploymentRequest
  - `args` string[] — Args overrides the container's CMD. Provide as an array of arguments (e.g., ["python", "app.py"])
  - `autoscaling` union — Autoscaling configuration for the deployment. Set to {} to disable autoscaling
    - HTTPAutoscalingConfig — Autoscaling config for HTTPTotalRequests and HTTPAvgRequestDuration metrics
      - `metric` 'HTTPTotalRequests' | 'HTTPAvgRequestDuration' — Metric must be HTTPTotalRequests or HTTPAvgRequestDuration
      - `target` number — Target is the threshold value. Default: 100 for HTTPTotalRequests, 500 (ms) for HTTPAvgRequestDuration
      - `time_interval_minutes` integer — TimeIntervalMinutes is the rate window in minutes. Default: 10
    - QueueAutoscalingConfig — Autoscaling config for QueueBacklogPerWorker metric
      - `metric` 'QueueBacklogPerWorker' — Metric must be QueueBacklogPerWorker
      - `model` string — Model overrides the model name for queue status lookup. Defaults to the deployment app name
      - `target` number — Target is the threshold value. Default: 1.01
    - CustomMetricAutoscalingConfig — Autoscaling config for CustomMetric metric
      - `custom_metric_name` string — CustomMetricName is the Prometheus metric name. Must match [a-zA-Z_:][a-zA-Z0-9_:]*
      - `metric` 'CustomMetric' — Metric must be CustomMetric
      - `target` number — Target is the threshold value. Default: 500
  - `command` string[] — Command overrides the container's ENTRYPOINT. Provide as an array (e.g., ["/bin/sh", "-c"])
  - `cpu` number — CPU is the number of CPU cores to allocate per container instance (e.g., 0.1 = 100 milli cores)
  - `description` string — Description is an optional human-readable description of your deployment
  - `environment_variables` EnvironmentVariable[] — EnvironmentVariables is a list of environment variables to set in the container. Replaces all existing environment variables.
    - `name` string, required — Name is the environment variable name (e.g., "DATABASE_URL"). Must start with a letter or underscore, followed by letters, numbers, or underscores
    - `value` string — Value is the plain text value for the environment variable. Use this for non-sensitive values. Either Value or ValueFromSecret must be set, but not both
    - `value_from_secret` string — ValueFromSecret references a secret by name or ID to use as the value. Use this for sensitive values like API keys or passwords. Either Value or ValueFromSecret must be set, but not both
  - `gpu_count` integer — GPUCount is the number of GPUs to allocate per container instance
  - `gpu_type` 'h100-80gb' | 'h100-40gb-mig' | 'h200-140gb' | 'b200-192gb' — GPUType specifies the GPU hardware to use (e.g., "h100-80gb")
  - `health_check_path` string — HealthCheckPath is the HTTP path for health checks (e.g., "/health"). Set to empty string to disable health checks
  - `image` string — Image is the container image to deploy from registry.together.ai.
  - `max_replicas` integer — MaxReplicas is the maximum number of replicas that can be scaled up to.
  - `memory` number — Memory is the amount of RAM to allocate per container instance in GiB (e.g., 0.5 = 512MiB)
  - `min_replicas` integer — MinReplicas is the minimum number of replicas to run
  - `name` string — Name is the new unique identifier for your deployment. Must contain only alphanumeric characters, underscores, or hyphens (1-100 characters)
  - `port` integer — Port is the container port your application listens on (e.g., 8080 for web servers)
  - `storage` integer — Storage is the amount of ephemeral disk storage to allocate per container instance (e.g., 10 = 10GiB)
  - `termination_grace_period_seconds` integer — TerminationGracePeriodSeconds is the time in seconds to wait for graceful shutdown before forcefully terminating the replica
  - `volumes` VolumeMount[] — Volumes is a list of volume mounts to attach to the container. Replaces all existing volumes.
    - `mount_path` string, required — MountPath is the path in the container where the volume mounts (e.g., "/data").
    - `name` string, required — Name is the name of the volume to mount. Must reference an existing volume by name or ID
    - `version` integer — Version is the volume version to mount. On create, defaults to the latest version. On update, defaults to the currently mounted version.

## Response `200`

Deployment updated successfully

- DeploymentResponseItem
  - `args` string[] — Args are the arguments passed to the container's command
  - `autoscaling` union — Autoscaling contains autoscaling configuration parameters for this deployment. Omitted when autoscaling is disabled (nil)
    - HTTPAutoscalingConfig — Autoscaling config for HTTPTotalRequests and HTTPAvgRequestDuration metrics
      - `metric` 'HTTPTotalRequests' | 'HTTPAvgRequestDuration' — Metric must be HTTPTotalRequests or HTTPAvgRequestDuration
      - `target` number — Target is the threshold value. Default: 100 for HTTPTotalRequests, 500 (ms) for HTTPAvgRequestDuration
      - `time_interval_minutes` integer — TimeIntervalMinutes is the rate window in minutes. Default: 10
    - QueueAutoscalingConfig — Autoscaling config for QueueBacklogPerWorker metric
      - `metric` 'QueueBacklogPerWorker' — Metric must be QueueBacklogPerWorker
      - `model` string — Model overrides the model name for queue status lookup. Defaults to the deployment app name
      - `target` number — Target is the threshold value. Default: 1.01
    - CustomMetricAutoscalingConfig — Autoscaling config for CustomMetric metric
      - `custom_metric_name` string — CustomMetricName is the Prometheus metric name. Must match [a-zA-Z_:][a-zA-Z0-9_:]*
      - `metric` 'CustomMetric' — Metric must be CustomMetric
      - `target` number — Target is the threshold value. Default: 500
  - `command` string[] — Command is the entrypoint command run in the container
  - `cpu` number — CPU is the amount of CPU resource allocated to each replica in cores (fractional value is allowed)
  - `created_at` string, date-time — CreatedAt is the ISO8601 timestamp when this deployment was created
  - `description` string — Description provides a human-readable explanation of the deployment's purpose or content
  - `desired_replicas` integer — DesiredReplicas is the number of replicas that the orchestrator is targeting
  - `environment_variables` EnvironmentVariable[] — EnvironmentVariables is a list of environment variables set in the container
    - `name` string, required — Name is the environment variable name (e.g., "DATABASE_URL"). Must start with a letter or underscore, followed by letters, numbers, or underscores
    - `value` string — Value is the plain text value for the environment variable. Use this for non-sensitive values. Either Value or ValueFromSecret must be set, but not both
    - `value_from_secret` string — ValueFromSecret references a secret by name or ID to use as the value. Use this for sensitive values like API keys or passwords. Either Value or ValueFromSecret must be set, but not both
  - `gpu_count` integer — GPUCount is the number of GPUs allocated to each replica in this deployment
  - `gpu_type` 'h100-80gb' | 'h100-40gb-mig' | 'h200-140gb' | 'b200-192gb' — GPUType specifies the type of GPU requested (if any) for this deployment
  - `health_check_path` string — HealthCheckPath is the HTTP path used for health checks of the application
  - `id` string — ID is the unique identifier of the deployment
  - `image` string — Image specifies the container image used for this deployment
  - `max_replicas` integer — MaxReplicas is the maximum number of replicas to run for this deployment
  - `memory` number — Memory is the amount of memory allocated to each replica in GiB (fractional value is allowed)
  - `min_replicas` integer — MinReplicas is the minimum number of replicas to run for this deployment
  - `name` string — Name is the name of the deployment
  - `object` 'deployment' — The object type, which is always `deployment`.
  - `port` integer — Port is the container port that the deployment exposes
  - `ready_replicas` integer — ReadyReplicas is the current number of replicas that are in the Ready state
  - `replica_events` object — ReplicaEvents is a mapping of replica names or IDs to their status events
  - `status` 'Updating' | 'Scaling' | 'Ready' | 'Failed' | 'ScaledToZero'
  - `storage` integer — Storage is the amount of storage (in MB or units as defined by the platform) allocated to each replica
  - `termination_grace_period_seconds` integer — TerminationGracePeriodSeconds is the time in seconds to wait for graceful shutdown before forcefully terminating the replica
  - `updated_at` string, date-time — UpdatedAt is the ISO8601 timestamp when this deployment was last updated
  - `volumes` VolumeMount[] — Volumes is a list of volume mounts for this deployment
    - `mount_path` string, required — MountPath is the path in the container where the volume mounts (e.g., "/data").
    - `name` string, required — Name is the name of the volume to mount. Must reference an existing volume by name or ID
    - `version` integer — Version is the volume version to mount. On create, defaults to the latest version. On update, defaults to the currently mounted version.

## Other responses

- `400` — Invalid request
- `404` — Deployment not found
- `500` — Internal server error

---

[API](https://skmtc.net/together/apis/together-apis.md) · [All operations](https://skmtc.net/together/apis/together-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/together/together-apis/versions/f26a23fab8e0/schema)
