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

# One-Click API Setup: Claude Code / Codex CLI

> Connect Claude Code or Codex CLI to EvoLink.AI with one command

## Overview

Setting things up by hand means installing the client, editing a config file, and filling in the endpoint and your API Key. The setup script (`evolink-config`) does all of that with one command:

* Checks your environment, and installs the client if it is not on your computer yet
* Writes the EvoLink endpoint and your API Key
* Sends one test message to confirm that calls go through
* Backs up every file before it changes it, and can undo everything with one command

The whole thing usually takes less than a minute.

| Client | One-click setup |
| - | - |
| Claude Code CLI | Supported |
| Codex CLI | Supported |
| Other clients | See the manual guides under "AI Coding Tools" |

> [!NOTE]
>
> The commands below are for macOS and Linux. On Windows, please follow the manual guide for [Claude Code CLI](https://evolink.ai/docs/en/integration-guide/claude-code-cli.md) or [Codex CLI](https://evolink.ai/docs/en/integration-guide/codex-cli.md) for now.

## Prerequisites

* **EvoLink API Key**: log in to the [EvoLink Dashboard](https://evolink.ai/dashboard), create a Key under API Keys, and copy it. A Key starts with `sk-`.
* **Node.js**: version 22 or later is recommended (18 is the minimum). Run `node -v` in a terminal to check. If it is not installed, download the LTS version from the [Node.js website](https://nodejs.org/).

## Set up Claude Code

Run this in a terminal:

```bash theme={null}
curl -fsSL https://cdn.evolink.ai/cli/setup.sh | bash
```

The script walks you through five steps:

**1. Environment**

Checks Node.js and Claude Code. If Claude Code is not installed yet, the script asks "Install now?"; press Enter and it installs it for you.

**2. API Key**

Paste your EvoLink API Key and press Enter. What you paste is not shown on screen. The script checks online that the Key is valid and shows your balance.

**3. Model**

Choose the model Claude Code uses by default. You can switch at any time inside Claude Code with `/model`.

**4. Review changes**

The script lists the files and settings it is about to change. Press Enter to apply them.

**5. Apply and verify**

After writing the settings, the script sends one test message (about 0.01 credits). A normal reply means the setup is complete.

When it finishes, open a new terminal window and run:

```bash theme={null}
claude
```

Inside Claude Code, run `/status`. If the Anthropic base URL shows the EvoLink address, the setup is in effect.

## Set up Codex CLI

Run this in a terminal:

```bash theme={null}
curl -fsSL https://cdn.evolink.ai/cli/setup.sh | bash -s -- codex
```

The steps are the same as above. When it finishes, start Codex with:

```bash theme={null}
codex -p evolink
```

> [!NOTE]
>
> The script creates a separate profile for Codex, `~/.codex/evolink.config.toml`, and does not change your own `~/.codex/config.toml`. Codex uses EvoLink only when you start it with `-p evolink`; a plain `codex` keeps your original settings.

## What the script changes

### Claude Code

| File | Change |
| - | - |
| `~/.claude/settings.json` | Writes the endpoint `ANTHROPIC_BASE_URL` and your Key `ANTHROPIC_AUTH_TOKEN`; sets `ANTHROPIC_API_KEY` to an empty value, so that an old Key left on the computer cannot cause 401 errors; pins the model version used for Sonnet; turns auto mode off (see the FAQ below for why). Everything else in the file is kept. |
| `~/.claude.json` | Skips the login screens shown on first launch; with your consent, marks the current folder as trusted. |

### Codex CLI

| File | Change |
| - | - |
| `~/.codex/evolink.config.toml` | New file. Holds the EvoLink endpoint, the default model, and your Key. Only you can read it. |
| `~/.codex/config.toml` | Not changed. |

### In both cases

* Every file is backed up to `~/.evolink/backups/` before it is changed.
* The script itself is saved under `~/.evolink/`, and its command is `~/.evolink/bin/evolink-config`. It does not change your PATH or your shell profile.
* Your Key is stored only in the config files on your computer and is sent only to the EvoLink API.

> [!NOTE]
>
> `evolink-config` only sets up the API connection. It is a different tool from the `evolink` command-line tool that generates images, video, and audio (see the CLI/MCP section). You can use both.

## Check, undo, and set up again

### Preview the changes (nothing is written)

```bash theme={null}
curl -fsSL https://cdn.evolink.ai/cli/setup.sh | bash -s -- --dry-run
```

### Check the current setup

```bash theme={null}
~/.evolink/bin/evolink-config doctor
```

Your Key is hidden in the output, so you can send it to support as it is. For Codex, use `~/.evolink/bin/evolink-config doctor codex`.

### Undo the setup

```bash theme={null}
~/.evolink/bin/evolink-config reset
```

The script puts back everything it changed. For Codex, use `~/.evolink/bin/evolink-config reset codex`.

### Change the Key or the default model

Run the setup command again.

## FAQ

### 1. What if it says Node.js was not found?

Install the LTS version from the [Node.js website](https://nodejs.org/), open a new terminal, and run the setup command again.

### 2. I already set things up by hand. Will my settings be overwritten?

Not as a whole. The script changes only the items listed above and keeps everything else. Before writing, it shows the old and new value of each item and backs up the original file.

### 3. Why is there no auto mode in Claude Code?

In auto mode, Claude Code stops asking you before each command. Instead, it first sends a review request, and a model decides whether the command is safe to run. These review requests are billed by tokens like any other request. They use `claude-sonnet-5`, whichever default model you chose.

To avoid charges you did not expect, the script turns auto mode off by default, and Claude Code asks you before it runs a command. The script also tells you this when it finishes.

If you want auto mode, turn it on like this:

```bash theme={null}
curl -fsSL https://cdn.evolink.ai/cli/setup.sh | bash -s -- --auto-mode
```

To turn it off again, run the setup command once more without `--auto-mode`.

### 4. Can I read the script before I run it?

Yes. Download it, read it, then run it:

```bash theme={null}
curl -fsSL https://cdn.evolink.ai/cli/setup.sh -o setup.sh
less setup.sh
bash setup.sh
```

### 5. What if it says "Rate limited (429)"?

Each account can check its Key only a limited number of times per minute. If you run the script several times in a row, you will see this message. Wait for the number of seconds shown in the message, then run the script again.

### 6. What if it still does not work after the setup?

Run `~/.evolink/bin/evolink-config doctor` and send the output to support. You can also check the troubleshooting sections of the [Claude Code CLI](https://evolink.ai/docs/en/integration-guide/claude-code-cli.md) and [Codex CLI](https://evolink.ai/docs/en/integration-guide/codex-cli.md) pages.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.