curl --request POST \
--url https://api.baseten.co/v1/chains/{chain_id}/environments/{env_name}/chainlet_settings/instance_types/update \
--header "Authorization: Api-Key $BASETEN_API_KEY" \
--data '{
  "updates": [
    {
      "chainlet_name": "HelloWorld",
      "instance_type_id": "1x4"
    },
    {
      "chainlet_name": "RandInt",
      "instance_type_id": "A10G:2x24x96"
    }
  ]
}'
{
  "requires_redeployment": true,
  "chain_deployment": {
    "id": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "chain_id": "<string>",
    "environment": "<string>",
    "chainlets": [
      {
        "id": "<string>",
        "name": "<string>",
        "autoscaling_settings": {
          "min_replica": 123,
          "max_replica": 123,
          "autoscaling_window": 123,
          "scale_down_delay": 123,
          "concurrency_target": 123
        },
        "instance_type_name": "<string>",
        "active_replica_count": 123,
        "status": "BUILDING"
      }
    ],
    "status": "BUILDING"
  },
  "chainlet_environment_settings": [
    {
      "chainlet_name": "<string>",
      "autoscaling_settings": {
        "min_replica": 123,
        "max_replica": 123,
        "autoscaling_window": 123,
        "scale_down_delay": 123,
        "concurrency_target": 123
      },
      "instance_type": {
        "id": "<string>",
        "name": "<string>",
        "memory_limit_mib": 123,
        "millicpu_limit": 123,
        "gpu_count": 123,
        "gpu_type": "<string>",
        "gpu_memory_limit_mib": 123
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

You must specify the scheme 'Api-Key' in the Authorization header. For example, Authorization: Api-Key <Your_Api_Key>

Path Parameters

chain_id
string
required
env_name
string
required

Body

application/json

A request to update the instance types for chainlets in an environment. Multiples updates can be made in one request. The updates will be processed in batch and a new deployment will be created, deployed and promoted into the environment.

updates
object[]
required

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

A request to update the environment settings for a chainlet.

Example:
[
  {
    "chainlet_name": "HelloWorld",
    "instance_type_id": "1x4"
  },
  {
    "chainlet_name": "RandInt",
    "instance_type_id": "A10G:2x24x96"
  }
]

Response

200 - application/json
A response to update the environment settings for a chainlet. If updating the instance type resulted in a re-deployment, `requires_redeployment` will be True and the resulting deployment will be returned in the `chain_deployment` field.

A response to update the environment settings for a chainlet. If updating the instance type resulted in a re-deployment, requires_redeployment will be True and the resulting deployment will be returned in the chain_deployment field.

requires_redeployment
boolean
required

Whether the resource update requires a re-deployment to update the instance type.

chain_deployment
object | null
required

The chain deployment resulting from the resource update, if any.

chainlet_environment_settings
object[]
required

The updated chainlet environment settings

Environment settings for a chainlet.