> ## 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.

# Deploy a Model Labs listing

> Deploy a Baseten for Model Labs listing into your workspace or team using the REST API.

Deploy a model published through [Baseten for Model Labs](/labs/platform/manage) into your workspace with [`POST /v1/models`](/reference/management-api/models/creates-a-model-from-a-source). Set `source.kind` to `library_listing` and supply the listing identifiers. Baseten creates a model and its first deployment from the listing.

## Get the listing identifiers

Ask the listing publisher for its `lab_display_name` and `user_defined_listing_id`. Your organization must have access to the published listing. Use a Baseten API key with permission to create models in the destination team.

## Create the model

Replace `<LAB_DISPLAY_NAME>` and `<LISTING_ID>` with the identifiers from the publisher. Set `source.deployed_model_name` to name your model, or omit it to use the listing's configured name.

```bash theme={"system"}
curl --request POST https://api.baseten.co/v1/models \
  --header "Authorization: Bearer $BASETEN_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "source": {
      "kind": "library_listing",
      "lab_display_name": "<LAB_DISPLAY_NAME>",
      "user_defined_listing_id": "<LISTING_ID>",
      "deployed_model_name": "my-library-model"
    }
  }'
```

The response contains `model` and `deployment` objects. Save `model.id` and `deployment.id` to check the deployment's status and call it.

### Deploy into a specific team

Use [`GET /v1/teams`](/reference/management-api/teams/lists-all-teams) to find the destination team ID:

```bash theme={"system"}
curl https://api.baseten.co/v1/teams \
  --header "Authorization: Bearer $BASETEN_API_KEY"
```

Send the same create request body to [`POST /v1/teams/{team_id}/models`](/reference/management-api/models/creates-a-team-model-from-a-source), replacing `<TEAM_ID>` in the URL:

```text theme={"system"}
https://api.baseten.co/v1/teams/<TEAM_ID>/models
```

The team ID belongs in the URL. The organization-scoped `/v1/models` endpoint uses the organization's default team.

## Check the deployment

Creation returns before the deployment is ready. Replace `<MODEL_ID>` and `<DEPLOYMENT_ID>` with the IDs from the create response and check the [deployment status](/reference/management-api/deployments/gets-a-models-deployment-by-id):

```bash theme={"system"}
curl 'https://api.baseten.co/v1/models/<MODEL_ID>/deployments/<DEPLOYMENT_ID>' \
  --header "Authorization: Bearer $BASETEN_API_KEY"
```

When `status` is `ACTIVE`, [call the deployment](/inference/calling-your-model) with the input format specified by the listing publisher. If the deployment fails, check its [deployment logs](/reference/management-api/deployments/get-deployment-logs).

## Next steps

* [Create a model from your own archive](/examples/create-a-model-with-rest).
* [Manage deployments](/deployment/manage/overview).
* [Publish and manage library listings](/labs/platform/manage).
