Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
188 changes: 106 additions & 82 deletions en/start.md
Original file line number Diff line number Diff line change
@@ -1,82 +1,106 @@
# Using Agent Router with Claude Code

## Install Claude Code

::: code-group

```bash [pnpm]
pnpm install -g @anthropic-ai/claude-code
```

```bash [npm]
npm install -g @anthropic-ai/claude-code
```

```bash [yarn]
yarn global add @anthropic-ai/claude-code
```

:::

## Configure Environment Variables

Enter the following commands in your terminal to set environment variables for using AgentRouter's Anthropic API:

::: code-group

```bash [Linux/macOS]
# Set AgentRouter's API base URL
export ANTHROPIC_BASE_URL=https://agentrouter.org/

# Set your AgentRouter API key, available at https://agentrouter.org/console/token
export ANTHROPIC_AUTH_TOKEN=sk-xxx
export ANTHROPIC_API_KEY=sk-xxx
```

```powershell [Windows PowerShell]
# Set AgentRouter's API base URL
$env:ANTHROPIC_BASE_URL="https://agentrouter.org/"

# Set your AgentRouter API key, available at https://agentrouter.org/console/token
$env:ANTHROPIC_AUTH_TOKEN="sk-xxx"
$env:ANTHROPIC_API_KEY="sk-xxx"
```

:::

> [!IMPORTANT]
> Make sure to replace sk-xxx with the Token provided by AgentRouter. You can get your API Key from the [AgentRouter Console](https://agentrouter.org/console/token).


## Launch Directly

After configuring the environment variables, use your terminal to open the project directory you want to work with, then run the following command to start Claude Code:

```bash
# Navigate to project directory
cd my-project

# Launch Claude Code directly
claude
```

::: tip
You can add the environment variable configuration to your shell configuration file to avoid manual setup each time:

::: code-group

```bash [Linux/macOS]
# Add to ~/.bashrc or ~/.zshrc file
export ANTHROPIC_BASE_URL=https://agentrouter.org/
export ANTHROPIC_AUTH_TOKEN=sk-xxx
export ANTHROPIC_API_KEY=sk-xxx
```

```powershell [Windows PowerShell]
# Add to PowerShell profile ($PROFILE)
$env:ANTHROPIC_BASE_URL="https://agentrouter.org/"
$env:ANTHROPIC_AUTH_TOKEN="sk-xxx"
$env:ANTHROPIC_API_KEY="sk-xxx"
```

:::
# Using Agent Router with Claude Code

## Install Claude Code

::: code-group

```bash [pnpm]
pnpm install -g @anthropic-ai/claude-code
```

```bash [npm]
npm install -g @anthropic-ai/claude-code
```

```bash [yarn]
yarn global add @anthropic-ai/claude-code
```

:::

## Configure Environment Variables

Enter the following commands in your terminal to set environment variables for using AgentRouter's Anthropic API:

::: code-group

```bash [Linux/macOS]
# Set AgentRouter's API base URL
export ANTHROPIC_BASE_URL=https://agentrouter.org/

# Set your AgentRouter API key, available at https://agentrouter.org/console/token
export ANTHROPIC_AUTH_TOKEN=sk-xxx
export ANTHROPIC_API_KEY=sk-xxx

# (Optional) Set the main model for Claude Code - used for code generation and analysis
export ANTHROPIC_MODEL=claude-sonnet-4-5-20250929

# (Optional) Set the fast/small model for quick tasks and tool calls - replaces deprecated ANTHROPIC_SMALL_FAST_MODEL
export ANTHROPIC_DEFAULT_HAIKU_MODEL=claude-haiku-4-5-20251001
```

```powershell [Windows PowerShell]
# Set AgentRouter's API base URL
$env:ANTHROPIC_BASE_URL="https://agentrouter.org/"

# Set your AgentRouter API key, available at https://agentrouter.org/console/token
$env:ANTHROPIC_AUTH_TOKEN="sk-xxx"
$env:ANTHROPIC_API_KEY="sk-xxx"

# (Optional) Set the main model for Claude Code - used for code generation and analysis
$env:ANTHROPIC_MODEL="claude-sonnet-4-5-20250929"

# (Optional) Set the fast/small model for quick tasks and tool calls - replaces deprecated ANTHROPIC_SMALL_FAST_MODEL
$env:ANTHROPIC_DEFAULT_HAIKU_MODEL="claude-haiku-4-5-20251001"
```

:::

> [!IMPORTANT]
> Make sure to replace sk-xxx with the Token provided by AgentRouter. You can get your API Key from the [AgentRouter Console](https://agentrouter.org/console/token).

## Model Configuration

### ANTHROPIC_MODEL
The primary model used by Claude Code for code generation and comprehensive analysis tasks. This is the main workhorse model that handles the majority of Claude Code operations. It's optimized for producing high-quality code solutions.

### ANTHROPIC_DEFAULT_HAIKU_MODEL
The fast and lightweight model used for quick tasks and tool calls. This model replaces the deprecated `ANTHROPIC_SMALL_FAST_MODEL` and is optimized for rapid responses and efficient tool execution. It's ideal for tasks that don't require extensive processing, such as making API calls, executing tools, and handling simple transformations.

## Launch Directly

After configuring the environment variables, use your terminal to open the project directory you want to work with, then run the following command to start Claude Code:

```bash
# Navigate to project directory
cd my-project

# Launch Claude Code directly
claude
```

::: tip
You can add the environment variable configuration to your shell configuration file to avoid manual setup each time:

::: code-group

```bash [Linux/macOS]
# Add to ~/.bashrc or ~/.zshrc file
export ANTHROPIC_BASE_URL=https://agentrouter.org/
export ANTHROPIC_AUTH_TOKEN=sk-xxx
export ANTHROPIC_API_KEY=sk-xxx
export ANTHROPIC_MODEL=claude-sonnet-4-5-20250929
export ANTHROPIC_DEFAULT_HAIKU_MODEL=claude-haiku-4-5-20251001
```

```powershell [Windows PowerShell]
# Add to PowerShell profile ($PROFILE)
$env:ANTHROPIC_BASE_URL="https://agentrouter.org/"
$env:ANTHROPIC_AUTH_TOKEN="sk-xxx"
$env:ANTHROPIC_API_KEY="sk-xxx"
$env:ANTHROPIC_MODEL="claude-sonnet-4-5-20250929"
$env:ANTHROPIC_DEFAULT_HAIKU_MODEL="claude-haiku-4-5-20251001"
```

:::

24 changes: 24 additions & 0 deletions es/start.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ export ANTHROPIC_BASE_URL=https://agentrouter.org/
# Establecer tu clave API de AgentRouter, disponible en https://agentrouter.org/console/token
export ANTHROPIC_AUTH_TOKEN=sk-xxx
export ANTHROPIC_API_KEY=sk-xxx

# (Opcional) Establecer el modelo principal para Claude Code - utilizado para generación de código y análisis
export ANTHROPIC_MODEL=claude-sonnet-4-5-20250929

# (Opcional) Establecer el modelo rápido/ligero para tareas rápidas y llamadas de herramientas - reemplaza el deprecated ANTHROPIC_SMALL_FAST_MODEL
export ANTHROPIC_DEFAULT_HAIKU_MODEL=claude-haiku-4-5-20251001
```

```powershell [Windows PowerShell]
Expand All @@ -40,13 +46,26 @@ $env:ANTHROPIC_BASE_URL="https://agentrouter.org/"
# Establecer tu clave API de AgentRouter, disponible en https://agentrouter.org/console/token
$env:ANTHROPIC_AUTH_TOKEN="sk-xxx"
$env:ANTHROPIC_API_KEY="sk-xxx"

# (Opcional) Establecer el modelo principal para Claude Code - utilizado para generación de código y análisis
$env:ANTHROPIC_MODEL="claude-sonnet-4-5-20250929"

# (Opcional) Establecer el modelo rápido/ligero para tareas rápidas y llamadas de herramientas - reemplaza el deprecated ANTHROPIC_SMALL_FAST_MODEL
$env:ANTHROPIC_DEFAULT_HAIKU_MODEL="claude-haiku-4-5-20251001"
```

:::

> [!IMPORTANT]
> Asegúrate de reemplazar sk-xxx con el Token proporcionado por AgentRouter. Puedes obtener tu clave API en la [Consola de AgentRouter](https://agentrouter.org/console/token).

## Configuración de Modelos

### ANTHROPIC_MODEL
El modelo principal utilizado por Claude Code para generación de código y tareas de análisis integral. Este es el modelo de trabajo principal que maneja la mayoría de las operaciones de Claude Code. Está optimizado para producir soluciones de código de alta calidad.

### ANTHROPIC_DEFAULT_HAIKU_MODEL
El modelo rápido y ligero utilizado para tareas rápidas y llamadas de herramientas. Este modelo reemplaza el deprecated `ANTHROPIC_SMALL_FAST_MODEL` y está optimizado para respuestas rápidas y ejecución eficiente de herramientas. Es ideal para tareas que no requieren procesamiento extenso, como realizar llamadas API, ejecutar herramientas y manejar transformaciones simples.

## Lanzamiento Directo

Expand All @@ -70,13 +89,18 @@ Puedes agregar la configuración de variables de entorno a tu archivo de configu
export ANTHROPIC_BASE_URL=https://agentrouter.org/
export ANTHROPIC_AUTH_TOKEN=sk-xxx
export ANTHROPIC_API_KEY=sk-xxx
export ANTHROPIC_MODEL=claude-sonnet-4-5-20250929
export ANTHROPIC_DEFAULT_HAIKU_MODEL=claude-haiku-4-5-20251001
```

```powershell [Windows PowerShell]
# Agregar al perfil de PowerShell ($PROFILE)
$env:ANTHROPIC_BASE_URL="https://agentrouter.org/"
$env:ANTHROPIC_AUTH_TOKEN="sk-xxx"
$env:ANTHROPIC_API_KEY="sk-xxx"
$env:ANTHROPIC_MODEL="claude-sonnet-4-5-20250929"
$env:ANTHROPIC_DEFAULT_HAIKU_MODEL="claude-haiku-4-5-20251001"
```

:::

Loading