Skip to main content
PATCH
/
v1
/
chains
/
{chain_id}
/
environments
/
{env_name}
/
chainlet_settings
/
autoscaling_settings
cURL
curl --request PATCH \
--url https://api.baseten.co/v1/chains/{chain_id}/environments/{env_name}/chainlet_settings/autoscaling_settings \
--header "Authorization: Bearer $BASETEN_API_KEY" \
--data '{
  "updates": [
    {
      "autoscaling_settings": {
        "autoscaling_window": 800,
        "concurrency_target": 4,
        "max_replica": 3,
        "max_scale_down_rate": null,
        "min_replica": 2,
        "scale_down_delay": 63,
        "target_in_flight_tokens": null,
        "target_utilization_percentage": null
      },
      "chainlet_name": "HelloWorld"
    }
  ]
}'
{
  "message": "<string>"
}

Authorizations

Authorization
string
header
required

Pass your Baseten API key. Clients automatically send Authorization: Bearer <key>. Direct callers can also use Authorization: Api-Key <key>; both schemes are accepted.

Path Parameters

chain_id
string
required
env_name
string
required

Body

application/json

A request to update the autoscaling settings for a multiple chainlets in an environment. If a chainlet name doesn't exist, an error is returned.

updates
ChainletEnvironmentAutoscalingSettingsUpdateV1 · object[]
required

Mapping of chainlet name to the desired chainlet autoscaling settings. If the chainlet name doesn't exist, an error is returned.

Examples:
[
{
"autoscaling_settings": {
"autoscaling_window": 800,
"concurrency_target": 4,
"max_replica": 3,
"max_scale_down_rate": null,
"min_replica": 2,
"scale_down_delay": 63,
"target_in_flight_tokens": null,
"target_utilization_percentage": null
},
"chainlet_name": "HelloWorld"
}
]
[
{
"autoscaling_settings": {
"autoscaling_window": null,
"concurrency_target": null,
"max_replica": null,
"max_scale_down_rate": null,
"min_replica": 0,
"scale_down_delay": null,
"target_in_flight_tokens": null,
"target_utilization_percentage": null
},
"chainlet_name": "HelloWorld"
},
{
"autoscaling_settings": {
"autoscaling_window": null,
"concurrency_target": null,
"max_replica": null,
"max_scale_down_rate": null,
"min_replica": 0,
"scale_down_delay": null,
"target_in_flight_tokens": null,
"target_utilization_percentage": null
},
"chainlet_name": "RandInt"
}
]

Response

200 - application/json

The response to a request to update autoscaling settings.

status
enum<string>
required

Status of the request to update autoscaling settings

Available options:
ACCEPTED,
QUEUED,
UNCHANGED
message
string
required

A message describing the status of the request to update autoscaling settings