---
title: "ezgh auth set-api-key"
description: "Store an API key as the profile's credential, read from stdin."
---

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

# ezgh auth set-api-key

{/* Generated by ezgh-cli's internal/tools/clidocs from the ezgh command tree. Don't edit: change the command's help in ezgh-cli and regenerate. */}

```sh
ezgh auth set-api-key [flags]
```

Store an API key (ezgh\_…) as the profile's credential, in place of a login. The key is read from stdin, never from an argument (arguments end up in shell history and process lists):

```text
ezgh auth set-api-key --profile ci < key.txt
ezgh auth set-api-key --profile ci          (then paste it; it isn't echoed)
```

The key is checked with EZGH Cloud before it's stored, unless `--no-verify`. `EZGH_API_KEY`, when set, still wins over it.

Part of [`ezgh auth`](/cli/reference/auth).

## Flags

| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| `--no-verify` | boolean |  | store the key without checking it with EZGH Cloud |

This command also takes the [global flags](/cli/reference#global-flags).

Source: https://docs.ezghcloud.com/cli/reference/auth-set-api-key/index.mdx
