Create an API key
Create an API key with the CLI to authenticate requests to a Managed Inference endpoint.
Create an API key from the CLI and use it to authenticate requests to a Managed Inference endpoint that requires an authorization header.
Prerequisites
You need the following before you start:
- A running CosmicAC deployment. See Installation.
- The CosmicAC CLI installed and configured. See Install the CLI.
Steps
Create the key
Create a key, replacing <name> with a display name:
cosmicac api-keys create <name>CosmicAC shows the full key only once. Copy it and store it somewhere safe.
If you lose the key, you cannot recover it. Revoke the key and create a new one.
Confirm the key
List your keys:
cosmicac api-keys listThe new key appears at the top of the list with its ID, name, preview, and status.