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

# baseten volume tag

> Set and delete volume tags

Manage a volume's tags. A tag is a mutable name that points to one version. Setting the tag again moves it, while the previous version remains reachable by digest. `baseten volume stat` and `baseten volume versions` show a volume's tags. `baseten volume ls` shows the tags in a namespace.

A volume reference starts with `bdn:<namespace>/<volume>`. It can include a `:<tag>` or `@<digest>` selector and a trailing path, as in `bdn:weights/llama:prod/config/model.json`. You must include the `bdn:` prefix. Without a selector, the reference uses the volume's `head` version. Write a digest with or without its `b3:` prefix and shorten it to 12 or more hexadecimal characters.

## `set`

```sh theme={"system"}
baseten volume tag set [OPTIONS]
```

Point the tag in `--tag` to the version selected by `--volume-ref`. The command creates a tag that doesn't exist. A volume reference without a selector uses the `head` version. A `:<tag>` or `@<digest>` selector uses that version. Don't include a path because a tag names an entire version.

Setting a tag that already exists overwrites it. Pass `--expires-at` to make the tag expire at that time. Setting it again without `--expires-at` clears the tag's expiration time. The tag is still removed if its version or volume expires.

`--tag` can be `head`. Setting it changes which version a reference without a tag or digest resolves to. `head` can't use `--expires-at` or point to an expiring version. Setting `head` prompts for confirmation unless you pass `--yes`.

### Options

**--expires-at** `TEXT`

Time at which the tag expires, as an RFC 3339 date-time with a UTC offset, as in 2030-01-01T00:00:00Z. It must be in the future and at most ten years ahead. Omit it for a tag that does not expire. Omitting it on an existing tag clears its expiration time.

**--full-ref** `BOOL`

Write refs with the whole digest instead of shortening it to 12 hex characters.

**-q, --jq** `TEXT`

Filter JSON output with a jq expression; implies --output json (or jsonl for streamed commands)

**-o, --output** `TEXT` (default: text)

Output format

One of: `text`, `json`, `jsonl`, `none`

**--profile** `TEXT`

Use a specific stored profile for this command, overriding BASETEN\_PROFILE and the current profile

**--tag** `TEXT` *required*

Tag to point at the version. May be 'head'.

**--volume-ref** `TEXT` *required*

Ref of the version to tag, as bdn:`namespace`/`volume` for the version head points at, or with a :`tag` or @`digest` selector for that version.

**--yes** `BOOL`

Skip confirmation for 'head'. Required when stdin is not a terminal and --tag is 'head'.

**-v, --verbose** `BOOL`

Enable verbose logging

### Examples

Point a tag at a version

```sh theme={"system"}
baseten volume tag set --volume-ref bdn:<namespace>/<volume>@b3:<digest> --tag prod
```

Move a tag to the version head points at

```sh theme={"system"}
baseten volume tag set --volume-ref bdn:<namespace>/<volume> --tag prod
```

Point a tag at the version another tag selects, with the tag expiring at the start of 2030

```sh theme={"system"}
baseten volume tag set --volume-ref bdn:<namespace>/<volume>:canary --tag nightly --expires-at 2030-01-01T00:00:00Z
```

Move head, which is what refs without a tag or digest resolve to

```sh theme={"system"}
baseten volume tag set --volume-ref bdn:<namespace>/<volume>@b3:<digest> --tag head --yes
```

### Filter output with `--jq`

Print the ref of the version the tag now points at, pinned to its digest

```sh theme={"system"}
baseten volume tag set --volume-ref bdn:<namespace>/<volume>@b3:<digest> --tag prod --jq '.version_ref'
```

### Output

**Text mode (`--output text`):** One field per line: the ref of the version the tag now points at, the tag, the digest, when the tag expires, and the volume's sequence.

**JSON mode (`--output json`):** Returns the tag, digest, pinned version reference, expiration, and volume sequence.

## `delete`

```sh theme={"system"}
baseten volume tag delete [OPTIONS]
```

Delete the tag in `--tag` from the volume named by `--volume-ref`. The version remains reachable by digest and by any other tag. Deleting a tag that doesn't exist succeeds and reports that the command made no change.

`--volume-ref` must name a volume without a selector or path because a tag belongs to the volume, not to one version. Deleting `head` prevents references without a tag or digest from resolving until you set `head` again. Deleting `head` prompts for confirmation unless you pass `--yes`.

### Options

**-q, --jq** `TEXT`

Filter JSON output with a jq expression; implies --output json (or jsonl for streamed commands)

**-o, --output** `TEXT` (default: text)

Output format

One of: `text`, `json`, `jsonl`, `none`

**--profile** `TEXT`

Use a specific stored profile for this command, overriding BASETEN\_PROFILE and the current profile

**--tag** `TEXT` *required*

Name of the tag to delete.

**--volume-ref** `TEXT` *required*

Ref of the volume the tag belongs to, as bdn:`namespace`/`volume`, with no selector and no path.

**--yes** `BOOL`

Skip confirmation for 'head'. Required when stdin is not a terminal and --tag is 'head'.

**-v, --verbose** `BOOL`

Enable verbose logging

### Examples

Delete a tag

```sh theme={"system"}
baseten volume tag delete --volume-ref bdn:<namespace>/<volume> --tag prod
```

### Filter output with `--jq`

Print whether the tag existed

```sh theme={"system"}
baseten volume tag delete --volume-ref bdn:<namespace>/<volume> --tag prod --jq '.deleted'
```

### Output

**Text mode (`--output text`):** One field per line: the tag, whether the command deleted it, and the volume's sequence.

**JSON mode (`--output json`):** Returns the tag, whether the command deleted it, and the volume sequence.
