Update a serverless endpoint
Update selected settings on a Runpod Serverless endpoint, including compute, workers, scaling, storage, and container configuration.
Authorizations
Runpod API key authentication. Generate an API key in the Runpod console and send it in the Authorization header as Bearer <api_key>. Keys are scoped to the permissions granted when created; requests may return 403 when a valid key lacks access to the requested resource or action.
Console sessions (Clerk JWTs) act for the signed-in user. To act for a team instead, also send X-Team-Id: <team_id>; it applies only when the user owns or belongs to that team, otherwise the request runs against the user's own account. API keys created inside a team already act for that team and do not need the header.
Body
Only provided fields are changed.
The container's command, as a single raw string. This is the field entrypoint and cmd encode into, exposed in its stored form.
Two shapes are accepted. A bare shell string is treated as CMD and split into arguments, which is what the console's "Container start command" field writes. A JSON object of the form {"entrypoint":[...],"cmd":[...]} sets either or both explicitly.
Responses always return both representations: args exactly as stored, plus the deconstructed entrypoint and cmd. Supplying args together with entrypoint or cmd is allowed only when they describe the same command, so a read-modify-write client can send back everything it received. Send "" to clear, omit to leave unchanged.
"--model meta-llama/Llama-3-8B --max-model-len 8192"
"{\"entrypoint\":[\"/bin/bash\",\"-c\"],\"cmd\":[\"python -u main.py\"]}"
""
Container registry credential ID for a private image: one of
your credentials from /v2/registries. Leave it unset for a
private Amazon ECR image. Runpod pulls those with an ECR
delegation (/v2/registries/delegations) matched to the
image's account, region and repository at pull time, so there
is no delegation ID to pass here (a delegation ID is not a
credential ID). A credential set here is used instead of any
delegation.
null
Partial GPU update — every field is optional and an omitted one is left
unchanged. Unlike create, pools is optional, so changing only a CUDA
constraint does not require resending the pool list.
excludedTypes requires pools, because the two are one selection and
only a supplied pools replaces it — an exclusion on its own would
otherwise be silently dropped.
Volumes to mount on the endpoint's workers. A network or global
list that is present replaces the endpoint's current list of that kind;
an empty list detaches it, and an omitted list is left unchanged. Both
kinds cannot be present on the endpoint at once, so to switch kinds send
[] for one and the new list for the other in the same request. Changes
apply to workers created afterwards. At most one global volume, GPU
endpoints only. network may accompany the deprecated networkVolumes field
only if the two agree exactly.
ID of a serverless template whose container settings are
applied as if they were provided in this PATCH body (image,
args, disk, ports, env, registry). Explicit body fields
override the template's; env merges template and body per
key (body wins) and, per PATCH semantics, replaces the
endpoint's env. One-time application — no link to the
template is retained. Must be one of your templates or a
public template (unknown or inaccessible ID → 404); must be
a serverless template (→ 422).
"30zmvf89kd"
Response
OK
Reusable container configuration shared across templates, pods, serverless endpoints, and clusters. Adding a field here automatically propagates to all of them.
The container's command, as a single raw string. This is the field entrypoint and cmd encode into, exposed in its stored form.
Two shapes are accepted. A bare shell string is treated as CMD and split into arguments, which is what the console's "Container start command" field writes. A JSON object of the form {"entrypoint":[...],"cmd":[...]} sets either or both explicitly.
Responses always return both representations: args exactly as stored, plus the deconstructed entrypoint and cmd. Supplying args together with entrypoint or cmd is allowed only when they describe the same command, so a read-modify-write client can send back everything it received. Send "" to clear, omit to leave unchanged.
"--model meta-llama/Llama-3-8B --max-model-len 8192"
"{\"entrypoint\":[\"/bin/bash\",\"-c\"],\"cmd\":[\"python -u main.py\"]}"
""
Container registry credential ID for a private image: one of
your credentials from /v2/registries. Leave it unset for a
private Amazon ECR image. Runpod pulls those with an ECR
delegation (/v2/registries/delegations) matched to the
image's account, region and repository at pull time, so there
is no delegation ID to pass here (a delegation ID is not a
credential ID). A credential set here is used instead of any
delegation.
null
The tags on this resource that are visible to the caller. Keys and values are returned exactly as stored. Tags under the reserved runpod: prefix, such as the cost center, are never listed here. Absent when the resource's tags are unavailable to the caller; an empty array means none are visible.
Request-routing semantics for a modern serverless endpoint.
QUEUE— submit asynchronous or synchronous jobs through the managed queue.LOAD_BALANCER— send requests directly to worker-defined HTTP paths. Configure viaenv:PORT(server port, default 80),PORT_HEALTH(health-check port, default 80), andHEALTH_CHECK_PATH(path the load balancer polls for worker health, default/ping).
QUEUE, LOAD_BALANCER Request URLs appropriate to the endpoint's top-level type.
Queue-based endpoints provide job submission and management URLs;
load-balancing endpoints provide base and health because their
remaining paths are worker-defined.
Request and response bodies for the queue-based URLs are documented in the serverless operation reference. Load-balancing endpoints are documented in Load balancing endpoints.
- Option 1
- Option 2