> ## Documentation Index
> Fetch the complete documentation index at: https://docs.baseten.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Manage deployments

> Scale, promote, inspect, deactivate, and delete Baseten deployments from the console, the Baseten CLI, or the Management API.

Learn to operate deployments on Baseten. After you push a model, you'll
scale it ahead of traffic, promote new versions, inspect logs and metrics,
and deactivate or delete deployments you no longer need.

You can manage your deployments using any of the following methods:

* **[Console](https://app.baseten.co)**: the Baseten dashboard, for
  interactive changes and checking state.
* **[Baseten CLI](/reference/cli/baseten/overview)**: terminal commands for
  scripting and automation. Every command supports `--output json` and
  `--jq` filtering.
* **[Management API](/reference/management-api/overview)**: REST endpoints
  for managing models, deployments, and environments from your own code.
* **[CI/CD](/deployment/ci-cd)**: automated deploys and promotions from
  GitHub Actions.

## Authenticate

Sign in with your Baseten account and create an
[API key](/organization/api-keys):

<Tabs>
  <Tab title="UI">
    **To sign in**:

    1. Go to [app.baseten.co](https://app.baseten.co).
    2. Enter your email and choose **Continue**, or choose
       **Continue with Google** or **Continue with GitHub**.

    **To create an API key**:

    1. In your [workspace](https://app.baseten.co), open **API keys** in
       your settings.
    2. Choose **Create API key**.
  </Tab>

  <Tab title="Baseten CLI">
    **To sign in**:

    <CodeGroup>
      ```bash Command theme={"system"}
      baseten auth login
      ```

      ```txt Output theme={"system"}
      ? How would you like to authenticate?
        > Login with Baseten credentials (browser)
          Paste an API key

      Browser opened to authenticate...

      If it didn't open, visit:
        https://login.baseten.co/device?user_code=ABCD-1234

      Verification code: ABCD-1234
      ```
    </CodeGroup>

    Complete the sign-in in the browser; the CLI stores a profile that
    authenticates later commands.

    For more information, see
    [`baseten auth login`](/reference/cli/baseten/auth#login).

    **To create an API key**:

    Create a personal key, tied to your account and its permissions, for
    local development and testing:

    <CodeGroup>
      ```bash Command theme={"system"}
      baseten org api-key create --type personal --name <label>
      ```

      ```txt Output theme={"system"}
      Save this key now. It will not be shown again.
      abcd1234.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdef01
      ```
    </CodeGroup>

    Create a team key, not tied to any one user and optionally scoped to
    specific models, for production and shared automation:

    <CodeGroup>
      ```bash Command theme={"system"}
      baseten org api-key create --type workspace-invoke --name <label> --model-id <model-id>
      ```

      ```txt Output theme={"system"}
      Save this key now. It will not be shown again.
      abcd1234.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdef01
      ```
    </CodeGroup>

    For more information, see
    [`baseten org api-key`](/reference/cli/baseten/org-api-key). Commands
    also accept the key through the
    `BASETEN_API_KEY` environment variable instead of a profile.
  </Tab>

  <Tab title="REST API">
    **To authenticate API requests**:

    The API doesn't sign in; every request carries an API key. Create your
    first key in the console or CLI.

    1. Set the key as an environment variable, or store it in your secret
       manager:

           <CodeGroup>
             ```bash macOS/Linux theme={"system"}
             export BASETEN_API_KEY=<your-api-key>
             ```

             ```powershell Windows theme={"system"}
             setx BASETEN_API_KEY <your-api-key>
             ```
           </CodeGroup>

    2. Pass the key in the `Authorization` header on every request:

           <CodeGroup>
             ```bash Request theme={"system"}
             curl "https://api.baseten.co/v1/models" \
               -H "Authorization: Bearer $BASETEN_API_KEY"
             ```

             ```json Response theme={"system"}
             {
               "models": [
                 {
                   "id": "abc123",
                   "name": "HelloWorld",
                   "deployments_count": 1,
                   "production_deployment_id": "def456",
                   ...
                 }
               ]
             }
             ```
           </CodeGroup>

    **To create an API key with the API**:

    Once you have a first key, create more over the API. `type` takes
    `PERSONAL`, `WORKSPACE_MANAGE_ALL`, `WORKSPACE_INVOKE`, or
    `WORKSPACE_EXPORT_METRICS`:

    <CodeGroup>
      ```bash Request theme={"system"}
      curl -X POST "https://api.baseten.co/v1/api_keys" \
        -H "Authorization: Bearer $BASETEN_API_KEY" \
        -H "Content-Type: application/json" \
        -d '{"type": "PERSONAL", "name": "<label>"}'
      ```

      ```json Response theme={"system"}
      {"api_key": "abcd1234.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdef01"}
      ```
    </CodeGroup>

    For more information, see the
    [create API key endpoint](/reference/management-api/api-keys/creates-an-api-key).
  </Tab>
</Tabs>

<Note>
  For enterprise authentication, including identity-provider sign-in and SCIM
  user provisioning, see [SSO and SCIM](/organization/sso-and-scim) or
  [contact support](mailto:support@baseten.co) to enable it for your workspace.
</Note>

## Find your model and deployment IDs

Each deployment has an ID, associated with the model that owns it. Use the
two IDs together to target every operation on these pages. Both appear in
the model's page URL:

<img className="block dark:hidden" src="https://mintcdn.com/baseten-preview/AT9Kg9HcBD7pjaWB/_images/deployment-url-anatomy-light.svg?fit=max&auto=format&n=AT9Kg9HcBD7pjaWB&q=85&s=ece118e9d91a1dada600d0f126ae21bc" alt="Anatomy of the deployment page URL. In app.baseten.co/models/abc123/deployments/def456, abc123 is the model ID and def456 is the deployment ID." width="825" height="264" data-path="_images/deployment-url-anatomy-light.svg" />

<img className="hidden dark:block" src="https://mintcdn.com/baseten-preview/AT9Kg9HcBD7pjaWB/_images/deployment-url-anatomy-dark.svg?fit=max&auto=format&n=AT9Kg9HcBD7pjaWB&q=85&s=de17e279bb09fef84c657bbb6148baac" alt="Anatomy of the deployment page URL. In app.baseten.co/models/abc123/deployments/def456, abc123 is the model ID and def456 is the deployment ID." width="825" height="264" data-path="_images/deployment-url-anatomy-dark.svg" />

<Tabs>
  <Tab title="UI">
    **To find your IDs in the console**:

    1. Sign in to your workspace at
       [app.baseten.co](https://app.baseten.co) and choose **Dedicated Inference** in the
       sidebar.
    2. Select your model.
    3. Choose **Copy ID** next to the model name.
    4. Select the deployment under **Deployments**. The deployment ID is the
       last segment of the page URL.
  </Tab>

  <Tab title="Baseten CLI">
    **To list your models and deployments**:

    1. List your deployed models:

           <CodeGroup>
             ```bash Command theme={"system"}
             baseten model list
             ```

             ```txt Output theme={"system"}
             ID      NAME        TEAM     DEPLOYMENTS  CREATED
             abc123  HelloWorld  Baseten  1            2026-05-28T15:52:18Z
             ```
           </CodeGroup>

    2. Then list your model's deployments:

           <CodeGroup>
             ```bash Command theme={"system"}
             baseten model deployment list --model-id <model-id>
             ```

             ```txt Output theme={"system"}
             ID      NAME          ENVIRONMENT  STATUS  INSTANCE                 REPLICAS  CREATED
             def456  deployment-1  production   ACTIVE  1x2 - 1 vCPU, 2 GiB RAM  1         2026-05-28T15:52:19Z
             ```
           </CodeGroup>

    Commands that take `--model-id` and `--deployment-id` also accept
    `--model-name` and `--deployment-name` to target by name instead.

    For more information, see
    [`model list`](/reference/cli/baseten/model#list) and
    [`deployment list`](/reference/cli/baseten/model-deployment#list).
  </Tab>

  <Tab title="REST API">
    **To list your models and deployments**:

    1. List your deployed models:

           <CodeGroup>
             ```bash Request theme={"system"}
             curl "https://api.baseten.co/v1/models" \
               -H "Authorization: Bearer $BASETEN_API_KEY"
             ```

             ```json Response theme={"system"}
             {
               "models": [
                 {
                   "id": "abc123",
                   "name": "HelloWorld",
                   "deployments_count": 1,
                   "production_deployment_id": "def456",
                   ...
                 }
               ]
             }
             ```
           </CodeGroup>

    2. Then list your model's deployments:

           <CodeGroup>
             ```bash Request theme={"system"}
             curl "https://api.baseten.co/v1/models/{model_id}/deployments" \
               -H "Authorization: Bearer $BASETEN_API_KEY"
             ```

             ```json Response theme={"system"}
             {
               "deployments": [
                 {
                   "id": "def456",
                   "name": "deployment-1",
                   "model_id": "abc123",
                   "is_production": true,
                   "status": "ACTIVE",
                   ...
                 }
               ]
             }
             ```
           </CodeGroup>

    For more information, see the
    [list models](/reference/management-api/models/gets-all-models)
    and [list deployments](/reference/management-api/deployments/gets-all-deployments-of-a-model)
    endpoints.
  </Tab>
</Tabs>

## Find your task

* [Scale a deployment](/deployment/manage/scaling): change how much compute
  a serving deployment uses. Pre-scale before a traffic spike, scale to
  zero, or wake a scaled-to-zero deployment.
* [Manage the deployment lifecycle](/deployment/manage/lifecycle): change
  whether and where a deployment serves. Promote, deactivate, activate, and
  delete deployments.
* [Terminate a stuck replica](/troubleshooting/deployments#issue-a-single-replica-is-stuck-or-unhealthy):
  fix one bad copy inside a deployment and let the autoscaler replace it.
* [Pull logs and metrics](/deployment/manage/logs-and-metrics): read what a
  deployment, or a whole environment, is doing. Fetch or stream logs and
  read metrics from scripts.

## Next steps

For the concepts behind these operations, see
[Deployments](/deployment/deployments) and
[Environments](/deployment/environments). For incremental promotion, see
[Rolling deployments](/deployment/rolling-deployments).
