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

# How to manage static keys

[Static keys](/iam/authorization/static-keys) provide a method of authentication in Nebius AI Cloud services from third-party tools and systems.

## Before you start

[Install](../../../cli/install) and [configure](../../../cli/configure) the Nebius AI Cloud CLI.

## Create a static key

Run the following command:

```bash theme={null}
nebius iam static-key issue \
  --account-service-account-id=<service_account_ID> \
  --service=<CONTAINER_REGISTRY|OBSERVABILITY> \
  --expires-at=<date_in_ISO_8601_format> 
```

In this command, change the following parameters:

* `--account-service-account-id`: The ID of the service account for which the static key is created.

* `--service`: The service for which you create the static key. The following values are possible:

  * `CONTAINER_REGISTRY`: [Container Registry](../../../container-registry)
  * `OBSERVABILITY`: [Observability services](../../../observability)

* `--expires-at` (optional): The date of expiration in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. The default lifetime of a static key is 6 months.

Output example:

```yaml theme={null}
...
    metadata:
      parent_id: project-***
    spec:
      account:
        service_account:
          id: serviceaccount-***
      service: CONTAINER_REGISTRY
  resource_id: statickey-***
token: ********
```

<Warning>
  Save the token from the `token` parameter of the output. You will not be able to access it later.
</Warning>

You can also get the ID of the static key from the `resource_id` parameter. The ID can be helpful later if you need to get the information about the static key or revoke it.

## List static keys

To get all static keys in your tenant, run the following command:

```bash theme={null}
nebius iam static-key list
```

To get the details about a static key, run the following command:

```bash theme={null}
nebius iam static-key get --id=<static_key_ID>
```

## Revoke a static key

You can revoke a static key by using the following command:

```bash theme={null}
nebius iam static-key delete --id=<static_key_ID>
```

If you only know the token value, run the following command to revoke the token:

```bash theme={null}
nebius iam static-key revoke --token=<static_key_token> 
```
