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 theClaude-Kirogroup
Get the right API key
Claude models on KiosAPI are served through theClaude-Kiro group, so your token must be created in that group:
- Log in to the KiosAPI Dashboard.
- Go to Console → Tokens and click Add Token.
- Select the group
Claude-Kiro(0.05× multiplier — much cheaper than default). - Save and copy the key.
Installation
Skip Onboarding
After installing, skip the interactive onboarding wizard by editing~/.claude.json:
Project Configuration
Create a.claude/settings.json file in your project root to inject environment variables:
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:
Global config file paths
Usage
Navigate to your project directory and launch Claude Code:Best Practices
CLAUDE.md
Create aCLAUDE.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:Troubleshooting
400 Bad Request / Invalid Beta Flag
Add this environment variable to your configuration: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-Kirogroup - 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_URLis set tohttps://kiosapi.com(no trailing slash, no/v1) - Check that the token group supports Claude models (
Claude-Kiro)
