v1

latestOpenAPI 3.1.02026-07-26157321426.3 KB

Creates an environment

Creates an environment for the specified model and returns the environment.

post/v1/models/{model_id}/environments

Request body

namestring required

Name of the environment

Example request

{
  "name": "staging",
  "autoscaling_settings": {
    "max_replica": 7,
    "autoscaling_window": 600,
    "scale_down_delay": 120,
    "concurrency_target": 2,
    "target_utilization_percentage": 70,
    "target_in_flight_tokens": 40000,
    "max_scale_down_rate": 20
  },
  "promotion_settings": {
    "redeploy_on_promotion": true,
    "rolling_deploy": true,
    "rolling_deploy_config": {
      "max_surge_percent": 25,
      "max_unavailable_percent": 10,
      "stabilization_time_seconds": 300
    },
    "ramp_up_while_promoting": true,
    "ramp_up_duration_seconds": 600
  }
}

Response

namestring required

Name of the environment

created_atstring date-time required

Time the environment was created in ISO 8601 format

model_idstring required

Unique identifier of the model

Example response

{
  "promotion_settings": {
    "redeploy_on_promotion": true,
    "rolling_deploy": true,
    "rolling_deploy_config": {
      "max_surge_percent": 25,
      "max_unavailable_percent": 10,
      "stabilization_time_seconds": 300
    },
    "ramp_up_while_promoting": true,
    "ramp_up_duration_seconds": 600
  }
}