Skip to main content
POST
/
v1
/
models
/
{model_id}
/
deployments
cURL
curl --request POST \
--url https://api.baseten.co/v1/models/{model_id}/deployments \
--header "Authorization: Bearer $BASETEN_API_KEY" \
--data '{
  "source": null
}'
{
  "model": {
    "id": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "name": "<string>",
    "deployments_count": 123,
    "production_deployment_id": "<string>",
    "development_deployment_id": "<string>",
    "instance_type_name": "<string>",
    "team_name": "<string>"
  },
  "deployment": {
    "id": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "name": "<string>",
    "model_id": "<string>",
    "is_production": true,
    "is_development": true,
    "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,
      "target_in_flight_tokens": 123,
      "max_scale_down_rate": 123
    },
    "instance_type_name": "<string>",
    "environment": "<string>",
    "labels": {}
  }
}

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

model_id
string
required

Body

application/json

Body for adding a deployment to an existing model via POST /v1/models/{model_id}/deployments.

source
Source · object
required

Where the new deployment is created from.

Response

200 - application/json

A newly created deployment and its model.

model
ModelV1 · object
required

The model the deployment belongs to. May have been created by this call.

deployment
DeploymentV1 · object
required

The newly created deployment.