Baseten
App · 20 actions
Run and look after the AI models you deploy on Baseten: call a model, wake it, activate, deactivate or promote deployments, change autoscaling, read logs and manage environments and secrets. Start a workflow when a model or deployment is added, changes status or is promoted.
Actions
| Action | What it does |
|---|---|
| Activate deployment | Turn an inactive deployment back on so it serves requests. |
| Call model | Send input to one of your deployed models and get its answer, such as a summary or a transcript. |
| Create environment | Add an environment to a model, such as staging, with an address of its own that deployments can be promoted to. |
| Deactivate deployment | Turn a deployment off: it stops serving requests and costing money until it is activated again. |
| Delete deployment | Delete a deployment for good, such as an old version nobody uses. |
| Delete environment | Delete an environment other than production. |
| Delete secret | Delete a secret. |
| Get deployment | Get one deployment: its status (such as active or scaled to zero), running replicas, hardware and autoscaling settings. |
| Get deployment logs | Get a deployment's log lines, such as why it failed to start. |
| Get environment | Get one environment: the deployment it serves, any promotion under way, and its autoscaling settings. |
| Get model | Get one model: its name, how many deployments it has and which ones are in production and development. |
| List deployments | List a model's deployments with their status, running replicas and autoscaling settings. |
| List environments | List a model's environments, such as production and staging, with the deployment each one serves. |
| List models | List the models in your Baseten workspace, with their production and development deployments. |
| List secrets | List the names of the secrets your models can read, such as access tokens. |
| Promote deployment | Make a deployment the one an environment serves, such as moving a tested deployment into production. |
| Retry failed deployment | Build and deploy a failed deployment again. |
| Save secret | Add a secret your models can read, or replace the value of the one with that name. |
| Update autoscaling | Change how many replicas a deployment runs and when it adds or removes them. |
| Wake model | Start a model that has scaled to zero, ahead of the requests you expect, so nobody waits for it to load. |
Activate deployment
Turn an inactive deployment back on so it serves requests. Baseten bills for the hardware while it runs. Nothing changes if it is already active.
Inputs
- Model
model_idtextRequired - The model. Pick one, or give its ID from an earlier step.
- Deployment
deployment_idtextRequired - The deployment: the model's production or development deployment, or one by its ID from an earlier step.
Outputs
already_activetrue/false- True if it was already active
deploymentobject- The deployment, as it is now
Example output
{
"already_active": false,
"deployment": {
"active_replica_count": 1,
"autoscaling_settings": {
"autoscaling_window": 60,
"concurrency_target": 2,
"max_replica": 2,
"min_replica": 0,
"scale_down_delay": 900,
"target_utilization_percentage": 70
},
"created_at": "2026-11-01T09:00:00Z",
"environment": "production",
"id": "qwer5678",
"instance_type_name": "1x L4",
"is_development": false,
"is_production": true,
"labels": {},
"model_id": "abcd1234",
"name": "deployment-2",
"status": "ACTIVE"
}
}Call model
Send input to one of your deployed models and get its answer, such as a summary or a transcript. Baseten bills for the time it runs.
Inputs
- Model
model_idtextRequired - The model. Pick one, or give its ID from an earlier step.
- Input
model_inputobjectRequired - The JSON the model expects, such as {"prompt": "Hello"}. Each model defines its own.
- Environment
environmenttext - The environment to call. Defaults to production.
- Deployment
deployment_idtext - A deployment to call instead of an environment, such as the development deployment. Leave empty to use the environment.
Outputs
calledtext- What was called, such as production environment
outputobject- What the model answered
request_idtext- Baseten's ID for the request, to find it in the logs
Example output
{
"called": "production environment",
"output": {
"summary": "The customer wants a refund."
},
"request_id": "a1b2c3d4e5"
}Create environment
Add an environment to a model, such as staging, with an address of its own that deployments can be promoted to.
Inputs
- Model
model_idtextRequired - The model. Pick one, or give its ID from an earlier step.
- Name
nametextRequired - The new environment's name, such as staging.
- Minimum replicas
min_replicanumber - The fewest copies of the model kept running. 0 lets it scale to zero when idle.From 0 to 1000.
- Maximum replicas
max_replicanumber - The most copies of the model it may run at busy times.From 1 to 1000.
Outputs
environmentobject- The environment
Example output
{
"environment": {
"autoscaling_settings": {
"autoscaling_window": 60,
"concurrency_target": 2,
"max_replica": 2,
"min_replica": 0,
"scale_down_delay": 900,
"target_utilization_percentage": 70
},
"candidate_deployment": {
"active_replica_count": 1,
"autoscaling_settings": {
"autoscaling_window": 60,
"concurrency_target": 2,
"max_replica": 2,
"min_replica": 0,
"scale_down_delay": 900,
"target_utilization_percentage": 70
},
"created_at": "2026-11-01T09:00:00Z",
"environment": "production",
"id": "zxcv9012",
"instance_type_name": "1x L4",
"is_development": false,
"is_production": true,
"labels": {},
"model_id": "abcd1234",
"name": "deployment-2",
"status": "DEPLOYING"
},
"created_at": "2026-11-02T09:00:00Z",
"current_deployment": {
"active_replica_count": 1,
"autoscaling_settings": {
"autoscaling_window": 60,
"concurrency_target": 2,
"max_replica": 2,
"min_replica": 0,
"scale_down_delay": 900,
"target_utilization_percentage": 70
},
"created_at": "2026-11-01T09:00:00Z",
"environment": "production",
"id": "qwer5678",
"instance_type_name": "1x L4",
"is_development": false,
"is_production": true,
"labels": {},
"model_id": "abcd1234",
"name": "deployment-2",
"status": "ACTIVE"
},
"in_progress_promotion": {
"percent_traffic_to_new_version": 0,
"status": "RELEASING"
},
"instance_type": {
"id": "L4x4x16",
"name": "1x L4"
},
"model_id": "abcd1234",
"name": "staging",
"promotion_settings": {
"rolling_deploy": true
}
}
}Deactivate deployment
Turn a deployment off: it stops serving requests and costing money until it is activated again.
Inputs
- Model
model_idtextRequired - The model. Pick one, or give its ID from an earlier step.
- Deployment
deployment_idtextRequired - The deployment: the model's production or development deployment, or one by its ID from an earlier step.
Outputs
already_inactivetrue/false- True if it was already inactive
deploymentobject- The deployment, as it is now
Example output
{
"already_inactive": false,
"deployment": {
"active_replica_count": 1,
"autoscaling_settings": {
"autoscaling_window": 60,
"concurrency_target": 2,
"max_replica": 2,
"min_replica": 0,
"scale_down_delay": 900,
"target_utilization_percentage": 70
},
"created_at": "2026-11-01T09:00:00Z",
"environment": "production",
"id": "qwer5678",
"instance_type_name": "1x L4",
"is_development": false,
"is_production": true,
"labels": {},
"model_id": "abcd1234",
"name": "deployment-2",
"status": "DEACTIVATING"
}
}Delete deployment
Delete a deployment for good, such as an old version nobody uses. It can't be undone.
Inputs
- Model
model_idtextRequired - The model. Pick one, or give its ID from an earlier step.
- Deployment
deployment_idtextRequired - The deployment: the model's production or development deployment, or one by its ID from an earlier step.
Outputs
deletedtrue/false- Always true once done
deployment_idtext- The deployment deleted
model_idtext- Its model
Example output
{
"deleted": true,
"deployment_id": "zxcv9012",
"model_id": "abcd1234"
}Delete environment
Delete an environment other than production. The deployment it served scales down to zero but is kept.
Inputs
- Model
model_idtextRequired - The model. Pick one, or give its ID from an earlier step.
- Environment
environmenttextRequired - The environment, such as production or staging.
Outputs
deletedtrue/false- Always true once done
environmenttext- The environment deleted
model_idtext- Its model
Example output
{
"deleted": true,
"environment": "staging",
"model_id": "abcd1234"
}Delete secret
Delete a secret. Models that read it no longer get it.
Inputs
- Secret
secret_nametextRequired - The secret. Pick one, or give its name.
Outputs
deletedtrue/false- Always true once done
secret_nametext- The secret deleted
Example output
{
"deleted": true,
"secret_name": "hf_access_token"
}Get deployment
Get one deployment: its status (such as active or scaled to zero), running replicas, hardware and autoscaling settings.
Inputs
- Model
model_idtextRequired - The model. Pick one, or give its ID from an earlier step.
- Deployment
deployment_idtextRequired - The deployment: the model's production or development deployment, or one by its ID from an earlier step.
Outputs
deploymentobject- The deployment
Example output
{
"deployment": {
"active_replica_count": 1,
"autoscaling_settings": {
"autoscaling_window": 60,
"concurrency_target": 2,
"max_replica": 2,
"min_replica": 0,
"scale_down_delay": 900,
"target_utilization_percentage": 70
},
"created_at": "2026-11-01T09:00:00Z",
"environment": "production",
"id": "qwer5678",
"instance_type_name": "1x L4",
"is_development": false,
"is_production": true,
"labels": {},
"model_id": "abcd1234",
"name": "deployment-2",
"status": "ACTIVE"
}
}Get deployment logs
Get a deployment's log lines, such as why it failed to start. Without a time window, the last 30 minutes.
Inputs
- Model
model_idtextRequired - The model. Pick one, or give its ID from an earlier step.
- Deployment
deployment_idtextRequired - The deployment: the model's production or development deployment, or one by its ID from an earlier step.
- From
startdate and time - Logs from this time. Defaults to 30 minutes before 'To'.
- To
enddate and time - Logs up to this time, at most 7 days after 'From'. Defaults to now.
- Level
min_leveltext - Only lines at this level or more serious. Defaults to every line.One of:
DEBUG(Debug and up),INFO(Info and up),WARNING(Warnings and errors),ERROR(Errors only). - Containing
containstext - Only lines containing this text (capitals matter).
- Most lines
limitnumber - How many lines at most, 1 to 1000. Defaults to 500.From 1 to 1000.
- Newest first
newest_firsttrue/false - List the newest lines first.
Outputs
countnumber- How many
logslist- The log lines
Example output
{
"count": 1,
"logs": [
{
"level": "INFO",
"message": "Model loaded",
"replica": "a1b2c",
"request_id": "",
"time": "2026-11-06T09:00:00.000Z",
"timestamp": "1793955600000000000"
}
]
}Get environment
Get one environment: the deployment it serves, any promotion under way, and its autoscaling settings.
Inputs
- Model
model_idtextRequired - The model. Pick one, or give its ID from an earlier step.
- Environment
environmenttextRequired - The environment, such as production or staging.
Outputs
environmentobject- The environment
Example output
{
"environment": {
"autoscaling_settings": {
"autoscaling_window": 60,
"concurrency_target": 2,
"max_replica": 2,
"min_replica": 0,
"scale_down_delay": 900,
"target_utilization_percentage": 70
},
"candidate_deployment": {
"active_replica_count": 1,
"autoscaling_settings": {
"autoscaling_window": 60,
"concurrency_target": 2,
"max_replica": 2,
"min_replica": 0,
"scale_down_delay": 900,
"target_utilization_percentage": 70
},
"created_at": "2026-11-01T09:00:00Z",
"environment": "production",
"id": "zxcv9012",
"instance_type_name": "1x L4",
"is_development": false,
"is_production": true,
"labels": {},
"model_id": "abcd1234",
"name": "deployment-2",
"status": "DEPLOYING"
},
"created_at": "2026-11-02T09:00:00Z",
"current_deployment": {
"active_replica_count": 1,
"autoscaling_settings": {
"autoscaling_window": 60,
"concurrency_target": 2,
"max_replica": 2,
"min_replica": 0,
"scale_down_delay": 900,
"target_utilization_percentage": 70
},
"created_at": "2026-11-01T09:00:00Z",
"environment": "production",
"id": "qwer5678",
"instance_type_name": "1x L4",
"is_development": false,
"is_production": true,
"labels": {},
"model_id": "abcd1234",
"name": "deployment-2",
"status": "ACTIVE"
},
"in_progress_promotion": {
"percent_traffic_to_new_version": 0,
"status": "RELEASING"
},
"instance_type": {
"id": "L4x4x16",
"name": "1x L4"
},
"model_id": "abcd1234",
"name": "staging",
"promotion_settings": {
"rolling_deploy": true
}
}
}Get model
Get one model: its name, how many deployments it has and which ones are in production and development.
Inputs
- Model
model_idtextRequired - The model. Pick one, or give its ID from an earlier step.
Outputs
modelobject- The model
Example output
{
"model": {
"created_at": "2026-10-01T09:00:00Z",
"deployments_count": 2,
"development_deployment_id": "zxcv9012",
"id": "abcd1234",
"instance_type_name": "1x L4",
"name": "Support summarizer",
"production_deployment_id": "qwer5678",
"team_name": "Default"
}
}List deployments
List a model's deployments with their status, running replicas and autoscaling settings.
Inputs
- Model
model_idtextRequired - The model. Pick one, or give its ID from an earlier step.
- Status
statustext - Only deployments in this status.One of:
ACTIVE,SCALED_TO_ZERO(Scaled to zero),WAKING_UP(Waking up),INACTIVE,BUILDING,DEPLOYING,LOADING_MODEL(Loading model),UPDATING,DEACTIVATING,UNHEALTHY, and 4 more. - Name
nametext - Only the deployment with exactly this name.
Outputs
countnumber- How many
deploymentslist- The deployments
Example output
{
"count": 1,
"deployments": [
{
"active_replica_count": 1,
"autoscaling_settings": {
"autoscaling_window": 60,
"concurrency_target": 2,
"max_replica": 2,
"min_replica": 0,
"scale_down_delay": 900,
"target_utilization_percentage": 70
},
"created_at": "2026-11-01T09:00:00Z",
"environment": "production",
"id": "qwer5678",
"instance_type_name": "1x L4",
"is_development": false,
"is_production": true,
"labels": {},
"model_id": "abcd1234",
"name": "deployment-2",
"status": "ACTIVE"
}
]
}List environments
List a model's environments, such as production and staging, with the deployment each one serves.
Inputs
- Model
model_idtextRequired - The model. Pick one, or give its ID from an earlier step.
Outputs
countnumber- How many
environmentslist- The environments
Example output
{
"count": 1,
"environments": [
{
"autoscaling_settings": {
"autoscaling_window": 60,
"concurrency_target": 2,
"max_replica": 2,
"min_replica": 0,
"scale_down_delay": 900,
"target_utilization_percentage": 70
},
"candidate_deployment": {
"active_replica_count": 1,
"autoscaling_settings": {
"autoscaling_window": 60,
"concurrency_target": 2,
"max_replica": 2,
"min_replica": 0,
"scale_down_delay": 900,
"target_utilization_percentage": 70
},
"created_at": "2026-11-01T09:00:00Z",
"environment": "production",
"id": "zxcv9012",
"instance_type_name": "1x L4",
"is_development": false,
"is_production": true,
"labels": {},
"model_id": "abcd1234",
"name": "deployment-2",
"status": "DEPLOYING"
},
"created_at": "2026-11-02T09:00:00Z",
"current_deployment": {
"active_replica_count": 1,
"autoscaling_settings": {
"autoscaling_window": 60,
"concurrency_target": 2,
"max_replica": 2,
"min_replica": 0,
"scale_down_delay": 900,
"target_utilization_percentage": 70
},
"created_at": "2026-11-01T09:00:00Z",
"environment": "production",
"id": "qwer5678",
"instance_type_name": "1x L4",
"is_development": false,
"is_production": true,
"labels": {},
"model_id": "abcd1234",
"name": "deployment-2",
"status": "ACTIVE"
},
"in_progress_promotion": {
"percent_traffic_to_new_version": 0,
"status": "RELEASING"
},
"instance_type": {
"id": "L4x4x16",
"name": "1x L4"
},
"model_id": "abcd1234",
"name": "staging",
"promotion_settings": {
"rolling_deploy": true
}
}
]
}List models
List the models in your Baseten workspace, with their production and development deployments.
Inputs
- Name
nametext - Only the model with exactly this name.
Outputs
countnumber- How many
modelslist- The models
Example output
{
"count": 1,
"models": [
{
"created_at": "2026-10-01T09:00:00Z",
"deployments_count": 2,
"development_deployment_id": "zxcv9012",
"id": "abcd1234",
"instance_type_name": "1x L4",
"name": "Support summarizer",
"production_deployment_id": "qwer5678",
"team_name": "Default"
}
]
}List secrets
List the names of the secrets your models can read, such as access tokens. Their values are never shown.
Inputs
None.
Outputs
countnumber- How many
secretslist- The secrets
Example output
{
"count": 1,
"secrets": [
{
"created_at": "2026-11-01T09:00:00Z",
"id": "sec123",
"name": "hf_access_token",
"team_name": "Default"
}
]
}Promote deployment
Make a deployment the one an environment serves, such as moving a tested deployment into production.
Inputs
- Model
model_idtextRequired - The model. Pick one, or give its ID from an earlier step.
- Deployment
deployment_idtextRequired - The deployment: the model's production or development deployment, or one by its ID from an earlier step.
- Environment
environmenttext - The environment to promote it to. Defaults to production.
- Scale down the one it replaces
scale_down_previoustrue/false - Scale the deployment the environment served before down to zero. Baseten does this unless told not to.
Outputs
deploymentobject- The promoted deployment
environmenttext- The environment it was promoted to
Example output
{
"deployment": {
"active_replica_count": 1,
"autoscaling_settings": {
"autoscaling_window": 60,
"concurrency_target": 2,
"max_replica": 2,
"min_replica": 0,
"scale_down_delay": 900,
"target_utilization_percentage": 70
},
"created_at": "2026-11-01T09:00:00Z",
"environment": "production",
"id": "qwer5678",
"instance_type_name": "1x L4",
"is_development": false,
"is_production": true,
"labels": {},
"model_id": "abcd1234",
"name": "deployment-2",
"status": "ACTIVE"
},
"environment": "production"
}Retry failed deployment
Build and deploy a failed deployment again. If it can't be retried, the result says why.
Inputs
- Model
model_idtextRequired - The model. Pick one, or give its ID from an earlier step.
- Deployment
deployment_idtextRequired - The deployment: the model's production or development deployment, or one by its ID from an earlier step.
Outputs
deploymentobject- The deployment
reasontext- Why it couldn't be retried, if it wasn't
retriedtrue/false- True if the retry started
Example output
{
"deployment": {
"active_replica_count": 1,
"autoscaling_settings": {
"autoscaling_window": 60,
"concurrency_target": 2,
"max_replica": 2,
"min_replica": 0,
"scale_down_delay": 900,
"target_utilization_percentage": 70
},
"created_at": "2026-11-01T09:00:00Z",
"environment": "production",
"id": "qwer5678",
"instance_type_name": "1x L4",
"is_development": false,
"is_production": true,
"labels": {},
"model_id": "abcd1234",
"name": "deployment-2",
"status": "BUILDING"
},
"reason": "",
"retried": true
}Save secret
Add a secret your models can read, or replace the value of the one with that name. Running deployments get the new value at once.
Inputs
- Name
nametextRequired - The secret's name, such as hf_access_token. Baseten treats hf_access_token and hf-access-token as the same name.
- Value
valuetextRequired - The secret's value.
Outputs
secretobject- The secret, without its value
Example output
{
"secret": {
"created_at": "2026-11-01T09:00:00Z",
"id": "sec123",
"name": "hf_access_token",
"team_name": "Default"
}
}Update autoscaling
Change how many replicas a deployment runs and when it adds or removes them. Only the settings you fill in change; the rest keep their values.
Inputs
- Model
model_idtextRequired - The model. Pick one, or give its ID from an earlier step.
- Deployment
deployment_idtextRequired - The deployment: the model's production or development deployment, or one by its ID from an earlier step.
- Minimum replicas
min_replicanumber - The fewest copies of the model kept running. 0 lets it scale to zero when idle.From 0 to 1000.
- Maximum replicas
max_replicanumber - The most copies of the model it may run at busy times.From 1 to 1000.
- Requests per replica
concurrency_targetnumber - How many requests one replica handles at once before another is added.From 1 to 100000.
- Target utilization (%)
target_utilization_percentagenumber - How much of the requests-per-replica figure to aim for, 1 to 100, leaving headroom for bursts.From 1 to 100.
- Autoscaling window (seconds)
autoscaling_windownumber - How many seconds of recent traffic to look at when deciding to scale.From 1 to 86400.
- Scale-down delay (seconds)
scale_down_delaynumber - How many seconds to wait before removing a replica once traffic drops.From 0 to 86400.
Outputs
autoscaling_settingsobject- The settings once the change applies
changedlist- The settings that changed
messagetext- What Baseten said
statustext- ACCEPTED, QUEUED or UNCHANGED
Example output
{
"autoscaling_settings": {
"autoscaling_window": 60,
"concurrency_target": 2,
"max_replica": 2,
"min_replica": 1,
"scale_down_delay": 900,
"target_utilization_percentage": 70
},
"changed": [
"min_replica"
],
"message": "Autoscaling settings update accepted",
"status": "ACCEPTED"
}Wake model
Start a model that has scaled to zero, ahead of the requests you expect, so nobody waits for it to load. Returns at once.
Inputs
- Model
model_idtextRequired - The model. Pick one, or give its ID from an earlier step.
- Environment
environmenttext - The environment to wake. Defaults to production.
- Deployment
deployment_idtext - A deployment to wake instead of an environment, such as the development deployment. Leave empty to use the environment.
Outputs
calledtext- What was called, such as production environment
wokentrue/false- Always true once asked
Example output
{
"called": "production environment",
"woken": true
}