Gets all environments for a given model
curl --request GET \
--url https://api.baseten.co/v1/models/{model_id}/environments \
--header "Authorization: Api-Key $BASETEN_API_KEY"{
"environments": [
{
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"model_id": "<string>",
"current_deployment": {
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"model_id": "<string>",
"is_production": true,
"is_development": true,
"status": "BUILDING",
"active_replica_count": 123,
"autoscaling_settings": {
"min_replica": 123,
"max_replica": 123,
"autoscaling_window": 123,
"scale_down_delay": 123,
"concurrency_target": 123,
"target_utilization_percentage": 123
},
"instance_type_name": "<string>",
"environment": "<string>"
},
"autoscaling_settings": {
"min_replica": 123,
"max_replica": 123,
"autoscaling_window": 123,
"scale_down_delay": 123,
"concurrency_target": 123,
"target_utilization_percentage": 123
},
"promotion_settings": {
"redeploy_on_promotion": true,
"rolling_deploy": true,
"ramp_up_while_promoting": true,
"ramp_up_duration_seconds": 600
},
"instance_type": {
"id": "<string>",
"name": "<string>",
"memory_limit_mib": 123,
"millicpu_limit": 123,
"gpu_count": 123,
"gpu_type": "<string>",
"gpu_memory_limit_mib": 123
}
}
]
}You must specify the scheme 'Api-Key' in the Authorization header. For example, Authorization: Api-Key <Your_Api_Key>
list of environments
list of environments
Show child attributes
Name of the environment
Time the environment was created in ISO 8601 format
Unique identifier of the model
Current deployment of the environment
Show child attributes
Unique identifier of the deployment
Time the deployment was created in ISO 8601 format
Name of the deployment
Unique identifier of the model
Whether the deployment is the production deployment of the model
Whether the deployment is the development deployment of the model
Status of the deployment
BUILDING, DEPLOYING, DEPLOY_FAILED, LOADING_MODEL, ACTIVE, UNHEALTHY, BUILD_FAILED, BUILD_STOPPED, DEACTIVATING, INACTIVE, FAILED, UPDATING, SCALED_TO_ZERO, WAKING_UP Number of active replicas
Autoscaling settings for the deployment. If null, the model has not finished deploying
Show child attributes
Minimum number of replicas
Maximum number of replicas
Timeframe of traffic considered for autoscaling decisions
Waiting period before scaling down any active replica
Number of requests per replica before scaling up
Target utilization percentage for scaling up/down.
Name of the instance type the model deployment is running on
The environment associated with the deployment
Autoscaling settings for the environment
Show child attributes
Minimum number of replicas
Maximum number of replicas
Timeframe of traffic considered for autoscaling decisions
Waiting period before scaling down any active replica
Number of requests per replica before scaling up
Target utilization percentage for scaling up/down.
Promotion settings for the environment
Show child attributes
Whether to deploy on all promotions. Enabling this flag allows model code to safely handle environment-specific logic. When a deployment is promoted, a new deployment will be created with a copy of the image.
true
Whether the environment should rely on rolling deploy orchestration.
true
Whether to ramp up traffic while promoting
true
Duration of the ramp up in seconds
600
Instance type for the environment
Show child attributes
Identifier string for the instance type
Display name of the instance type
Memory limit of the instance type in Mebibytes
CPU limit of the instance type in millicpu
Number of GPUs on the instance type
Type of GPU on the instance type
Memory limit of the GPU on the instance type in Mebibytes
Was this page helpful?
curl --request GET \
--url https://api.baseten.co/v1/models/{model_id}/environments \
--header "Authorization: Api-Key $BASETEN_API_KEY"{
"environments": [
{
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"model_id": "<string>",
"current_deployment": {
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"model_id": "<string>",
"is_production": true,
"is_development": true,
"status": "BUILDING",
"active_replica_count": 123,
"autoscaling_settings": {
"min_replica": 123,
"max_replica": 123,
"autoscaling_window": 123,
"scale_down_delay": 123,
"concurrency_target": 123,
"target_utilization_percentage": 123
},
"instance_type_name": "<string>",
"environment": "<string>"
},
"autoscaling_settings": {
"min_replica": 123,
"max_replica": 123,
"autoscaling_window": 123,
"scale_down_delay": 123,
"concurrency_target": 123,
"target_utilization_percentage": 123
},
"promotion_settings": {
"redeploy_on_promotion": true,
"rolling_deploy": true,
"ramp_up_while_promoting": true,
"ramp_up_duration_seconds": 600
},
"instance_type": {
"id": "<string>",
"name": "<string>",
"memory_limit_mib": 123,
"millicpu_limit": 123,
"gpu_count": 123,
"gpu_type": "<string>",
"gpu_memory_limit_mib": 123
}
}
]
}