# Codex CLI

Codex reads skills from `~/.agents/skills` (every project) and `.agents/skills` in your repository. Install the VidLab skill there and start Codex from a terminal where `VIDLAB_API_KEY` is set.

## Set up

1. Put your key in your environment ([how](/vidlab-api/docs/agent-skill#1-set-your-key)) and open a new terminal.
2. Install the skill for every project:

```bash
npx skills add https://vidlab.ai -g -a codex -y
```

Leave out `-g` to install it for the current repository only (it is saved in `.agents/skills/vidlab`). By hand instead:

```bash
mkdir -p ~/.agents/skills/vidlab && curl -fsSL https://vidlab.ai/vidlab-api/SKILL.md -o ~/.agents/skills/vidlab/SKILL.md
```

3. Start Codex in that terminal and check it with a free question:

```text
Use the VidLab skill: list three video models and the price of a 5 second clip at 720p.
```

## Network access

Codex runs commands in a sandbox. The skill calls `https://vidlab.ai/v1` over HTTPS, so allow network access for the session when Codex asks (or start it with a mode that allows the network). A command that fails with a connection error before any answer from VidLab is the sandbox, not your key.

## Tips

- Check the key is set without printing it: `test -n "$VIDLAB_API_KEY" && echo set || echo missing`.
- Update the skill by running the install command again.
