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

# CLI

> Common questions about LinkModel CLI setup, credentials, automation, and troubleshooting.

## How do I install the CLI?

See [CLI Installation](/cli-installation).

## How do I authenticate the CLI?

See [CLI Authentication](/cli-authentication). The CLI supports interactive setup, `LINKMODEL_API_KEY`, and one-off `--api-key` usage.

## Can I use the same API key for the CLI and API?

Yes. The CLI uses the same LinkModel API key as direct API calls.

## Can I use the CLI in scripts?

Yes. Use `--json` for automation:

```bash theme={null}
lkm image "a product photo" --json
lkm video status <task_id> --wait --json
```

For script patterns and exit codes, see [CLI Automation](/cli-automation).

## Why does my task keep running after timeout or Ctrl-C?

Generation tasks run server-side. If the local CLI times out or is interrupted, resume with `lkm image status <task_id> --wait` or `lkm video status <task_id> --wait`.

## Where do I find model-specific options?

Use [Model Schemas](/cli-model-schemas) to inspect the flags generated for each model.

## Where do I find the full CLI guide?

Open the [CLI guide](/cli).
