VAL Router is live — one key, one endpoint, every model we serve. Zero data retention, OpenAI & Anthropic compatible.

See plans

Client guides

Wire up any client.

Set up Claude Code, Codex, Cursor, Cline, OpenCode, Open Claw, Hermes Agent, 9Router and MCP against the gateway. Two lines per client.

00 Pick your client

Every client below needs the same two things: the gateway base URL and your sk- key. The rest is copy-paste.

  • Claude Code

    The Anthropic Messages format. Two environment variables and the CLI is on the gateway.

  • Codex

    Set a custom model provider in ~/.codex/config.toml pointing at the gateway.

  • Cursor

    Override the OpenAI base URL in Settings so Cursor talks to the gateway.

  • Cline

    Add an OpenAI Compatible provider with the gateway base URL and key.

  • OpenCode

    Register the gateway as a provider with @ai-sdk/openai-compatible in opencode.json.

  • Open Claw

    OpenAI-compatible. Point the base URL at the gateway and set the key.

  • Hermes Agent

    Hermes runs on an OpenAI-compatible provider. Add the gateway as a custom endpoint.

  • 9Router

    Add the gateway as an OpenAI-compatible upstream in 9Router.

  • MCP

    Connect an MCP client to the gateway MCP server and call models as tools.

01 Claude Code

The Anthropic Messages format. Two environment variables and the CLI is on the gateway.

  1. Install Claude Code

    npm install -g @anthropic-ai/claude-code

  2. Export the base URL and key

    Claude Code reads ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN.

  3. Run it

    claude — every request now routes through the gateway.

one-line setup
echo 'export ANTHROPIC_BASE_URL="https://router.byvall.com/v1"' >> ~/.zshrc && echo 'export ANTHROPIC_AUTH_TOKEN="val-router-..."' >> ~/.zshrc && source ~/.zshrc
shell
export ANTHROPIC_BASE_URL="https://router.byvall.com/v1"
export ANTHROPIC_AUTH_TOKEN="val-router-..."
claude

02 Codex

Set a custom model provider in ~/.codex/config.toml pointing at the gateway.

  1. Install Codex

    npm install -g @openai/codex

  2. Edit ~/.codex/config.toml

    Add the agw provider with the gateway base URL.

  3. Export the key and run

    codex reads AGW_KEY from the environment.

~/.codex/config.toml
model = "deepseek/deepseek-v4-pro-0813"

[model_providers.agw]
name = "AI Gateway"
base_url = "https://router.byvall.com/v1"
env_key = "AGW_KEY"
shell
export AGW_KEY="val-router-..."

03 Cursor

Override the OpenAI base URL in Settings so Cursor talks to the gateway.

  1. Open Settings → Models

    Scroll to the OpenAI API section.

  2. Enable "Override OpenAI Base URL"

    Paste the gateway base URL.

  3. Paste your key and add a model

    Use any model id from the catalogue.

base url
https://router.byvall.com/v1
api key
val-router-...

04 Cline

Add an OpenAI Compatible provider with the gateway base URL and key.

  1. Open Cline settings → API Provider

    Choose "OpenAI Compatible".

  2. Set the base URL and key

    Base URL is the gateway, key is your val-router- key.

  3. Pick a model

    Paste a model id from the catalogue.

settings
Base URL: https://router.byvall.com/v1
API Key:  val-router-...
Model:    deepseek/deepseek-v4-pro-0813

05 OpenCode

Register the gateway as a provider with @ai-sdk/openai-compatible in opencode.json.

  1. Create or edit opencode.json

    In your project root or ~/.config/opencode/.

  2. Add the agw provider

    Use the @ai-sdk/openai-compatible npm package.

  3. Select the model

    opencode lists the models you declare.

opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "agw": {
      "npm": "@ai-sdk/openai-compatible",
      "options": {
        "baseURL": "https://router.byvall.com/v1",
        "apiKey": "val-router-..."
      },
      "models": {
        "deepseek/deepseek-v4-pro-0813": {}
      }
    }
  }
}

06 Open Claw

OpenAI-compatible. Point the base URL at the gateway and set the key.

  1. Open Open Claw settings

    Find the provider / endpoint section.

  2. Set the base URL

    Use the gateway base URL.

  3. Set the key and model

    val-router- key plus any catalogue model id.

env
OPENAI_BASE_URL=https://router.byvall.com/v1
OPENAI_API_KEY=val-router-...

07 Hermes Agent

Hermes runs on an OpenAI-compatible provider. Add the gateway as a custom endpoint.

  1. Open the Hermes provider config

    Add a custom OpenAI-compatible provider.

  2. Set base URL and key

    Base URL is the gateway, key is your val-router- key.

  3. Choose a model

    Any id from the catalogue works.

provider
base_url = https://router.byvall.com/v1
api_key  = val-router-...
model    = deepseek/deepseek-v4-pro-0813

08 9Router

Add the gateway as an OpenAI-compatible upstream in 9Router.

  1. Open 9Router → Providers

    Add a new OpenAI-compatible provider.

  2. Enter the base URL and key

    Base URL is the gateway.

  3. Route a model to it

    Map any catalogue model to the provider.

upstream
https://router.byvall.com/v1

09 MCP

Connect an MCP client to the gateway MCP server and call models as tools.

  1. Open your MCP client config

    For example Cline or Claude mcp settings.

  2. Add the gateway server

    Point the URL at the gateway MCP endpoint.

  3. Authorize with your key

    Pass the val-router- key as a bearer token.

mcp.json
{
  "mcpServers": {
    "ai-gateway": {
      "url": "https://router.byvall.com/v1/mcp",
      "headers": { "Authorization": "Bearer val-router-..." }
    }
  }
}

10 Next steps

Full endpoint reference, or talk to support if a client is not listed.

ARMING ROTORS
0%
ALT: 0.0mVEL: 0.0 m/sRPM: 0LAT 6.2088 · LNG 106.8456
Client guides — VAL Router