Skip to main content

Claude Code

Claude Code is Anthropic’s official agentic coding tool that runs in your terminal. This guide shows you how to configure it to use KiosAPI as the backend provider.

Prerequisites

  • Node.js 18+ — check with node --version
  • A KiosAPI API key (starts with sk-) created in the Claude-Kiro group

Get the right API key

Claude models on KiosAPI are served through the Claude-Kiro group, so your token must be created in that group:
  1. Log in to the KiosAPI Dashboard.
  2. Go to Console → Tokens and click Add Token.
  3. Select the group Claude-Kiro (0.05× multiplier — much cheaper than default).
  4. Save and copy the key.
A key created in another group (for example default or Free) cannot call Claude models. If you get a “no available channel” or model-not-found error, check the token’s group first. See Choosing a Token Group.

Installation

Verify the installation:

Skip Onboarding

After installing, skip the interactive onboarding wizard by editing ~/.claude.json:
This prevents Claude Code from prompting you to sign in with an Anthropic account.

Project Configuration

Create a .claude/settings.json file in your project root to inject environment variables:
Replace sk-xxx with your actual KiosAPI key from the Claude-Kiro group.
ANTHROPIC_BASE_URL must be https://kiosapi.com — no /v1, no trailing slash. Claude Code appends the API path automatically.

Current Claude models on KiosAPI

The authoritative list with live pricing is the Models & Pricing page (filter by the Claude-Kiro group).

Global Configuration

You can also set these environment variables globally so Claude Code works in any directory.

Windows (PowerShell)

macOS / Linux

Add the following to ~/.bashrc or ~/.zshrc:
Then reload your shell:

Global config file paths

Usage

Navigate to your project directory and launch Claude Code:
This opens an interactive session where you can ask Claude to read, write, and modify code.

Best Practices

CLAUDE.md

Create a CLAUDE.md file in your project root to give Claude persistent context about your codebase, conventions, and common commands. Claude Code reads this file automatically on startup.

File Permissions

Claude Code will ask for permission before reading or writing files. You can pre-approve directories by adding them to .claude/settings.json:

Context Management

Long sessions can consume a lot of context. Use these slash commands to manage it:

Switching Models

Change the default model globally:
Or switch to a lighter model for faster responses:

Troubleshooting

400 Bad Request / Invalid Beta Flag

Add this environment variable to your configuration:
This disables experimental beta headers that KiosAPI may not support.

Length / Max Output Token Error

Add this to your .claude/settings.json env block:

No Available Channel / Model Not Found

  • Verify your token is in the Claude-Kiro group
  • Verify the model name against the pricing page — old model IDs like claude-3-5-sonnet-* no longer exist
  • Run claude config set --global env '{"ANTHROPIC_MODEL": "claude-sonnet-5"}' to reset to a current model

Connection Refused / 401 Unauthorized

  • Verify your API key is correct and starts with sk-
  • Ensure ANTHROPIC_BASE_URL is set to https://kiosapi.com (no trailing slash, no /v1)
  • Check that the token group supports Claude models (Claude-Kiro)

Verify Your Setup

Run a simple test:
If Claude responds, your configuration is working correctly.

Need Help?