Skip to content
Integrations/Agent Harnesses

Claude Code

Connect Claude Code to AudioLab Router.

Configuration

Install Claude Code and Node.js 20 or later. Create an AudioLab workspace key with llm.write, available credits, and access to the selected model. Export it as AUDIOLAB_API_KEY in the terminal that launches the agent.

Terminal
# Generated by AudioLab Router. Credentials are read from your environment.
export ANTHROPIC_BASE_URL='https://api.tryaudiolab.ai'
export ANTHROPIC_AUTH_TOKEN="$AUDIOLAB_API_KEY"
export ANTHROPIC_API_KEY=''
export ANTHROPIC_MODEL='anthropic/claude-sonnet-5'
export ANTHROPIC_DEFAULT_OPUS_MODEL='anthropic/claude-sonnet-5'
export ANTHROPIC_DEFAULT_SONNET_MODEL='anthropic/claude-sonnet-5'
export ANTHROPIC_DEFAULT_HAIKU_MODEL='anthropic/claude-sonnet-5'
export CLAUDE_CODE_MAX_OUTPUT_TOKENS='4096'
export MAX_THINKING_TOKENS='0'
export DISABLE_PROMPT_CACHING='1'
export CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING='1'
export CLAUDE_CODE_EFFORT_LEVEL='high'

Automatic Setup

The command previews the files and fields it changes. Confirm to apply; it stores a private backup and prints an undo command. It does not store the API key or change your shell profile. Automatic file setup supports macOS and Linux.

Terminal
npx https://tryaudiolab.ai/cli/router-0.1.0.tgz setup --agent claude-code

Launch

Terminal
npx https://tryaudiolab.ai/cli/router-0.1.0.tgz run claude-code

The launcher scopes gateway credentials to this process. Existing Claude login and shell settings are preserved. Use Claude models; provider-hosted tools and extended thinking depend on the Messages endpoint contract.

Supported Configuration

The recipe disables explicit prompt caching and extended/adaptive thinking and fixes effort to high, which is the provider default accepted by the Messages adapter. It pins all three Claude model aliases to the selected Claude model. Keep output at 4096 tokens or less. Signed thinking replay, provider-hosted tools, cache directives, and arbitrary beta fields are not supported. Project or user settings.json environment entries can override shell values; remove conflicting routing entries before launching. Claude Code 2.1.270 was checked against a local streaming fixture and the Router request validator; this is not a live-provider or long-session certification.

Verify the Connection

Send a short text prompt, then a read-only tool request in a disposable project. Check the model, request record, and usage in Router. Test streaming and a follow-up turn before using a longer workflow. Client-specific tools and permissions remain managed by Claude Code.

The setup command can check authentication and model discovery without generating a response. See the protocol contracts for model and feature limits.

Reference

Claude Code Configuration — Official Documentation

AudioLab Setup Command