Create or Update Deployment
Creates a new deployment or updates an existing one by name/tag, returning an S3 upload URL when a new file version needs to be uploaded.
Authorizations
API key must be provided in the Authorization header
Body
Deployment name (letters, numbers, hyphens, dots, underscores; must start with letter or number; max 128 chars).
"my-model"
Deployment tag used to differentiate variants of the same named deployment; defaults to 'default'.
"v2"
Docker image to run on worker instances; required.
"pytorch/pytorch:2.0.0"
GPU offer filter expression for selecting worker machines.
"gpu_ram>=16 num_gpus=1"
SHA-256 (or similar) hash of the deployment artifact to upload; required and used as a cache key.
"e3b0c44298fc1c149afb"
Size in bytes of the deployment artifact; required when file_hash is provided.
1048576
Environment variable string to inject into workers (e.g. '-e FOO=bar').
"-e MODEL=llama"
Disk storage to allocate per worker in GB; must be positive; defaults to 50.
100
Seconds after the last heartbeat before the deployment is automatically deleted; negative disables auto-expiry.
3600
Human-readable label for this artifact version; defaults to first 6 chars of file_hash.
"release-1.0"
Docker registry username for pulling private images.
Docker registry password for pulling private images.
Docker registry hostname/repo to authenticate against.
"docker.io"
Fixed number of cold standby workers for the backing endpoint.
2
Maximum number of workers for the backing endpoint.
10
Minimum load threshold for the backing endpoint.
0
Minimum cold load threshold for the backing endpoint.
0
Target utilization ratio (0-1) for the backing endpoint.
0.9
Cold-standby multiplier for the backing endpoint.
3
Maximum acceptable queue time in seconds.
60
Target queue time in seconds.
10
Seconds of inactivity before the endpoint may be suspended.
300
Ratio by which to over-recruit workers for traffic spike absorption.
1.2
Autoscaler deployment environment.
"prod"
Response
Returns {success: true, action: 'created'|'soft_update'|'autoscale_update'|'exists', deployment_id, endpoint_id, upload_url?, upload_fields?, evicted_versions?}
Always true on success.
One of: created, soft_update, autoscale_update, exists.
ID of the deployment.
ID of the associated endpoint.
Presigned S3 URL to upload the deployment blob (present when a new version needs to be uploaded).
Additional fields required for the S3 multipart POST upload (present with upload_url).
List of evicted version objects ({id, file_hash, version_label, file_size}) if LRU eviction occurred.