Skip to main content
Anthropic’s Claude Code is an agentic coding tool that runs directly in your terminal. This tutorial walks you through installing Claude Code, pointing it at KiosAPI, and verifying that your setup is working — so you can start coding with Claude models through KiosAPI’s unified API gateway.

Prerequisites

  • Node.js 18+ — verify with node --version
  • A KiosAPI API key (starts with sk-) from the DashboardToken Management

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 asks 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 with the Claude Code config command:
Or switch to a lighter model for faster responses:

Troubleshooting

400 Bad Request / Invalid beta flag

If you see an error like Invalid beta flag or a 400 status code:
Make sure CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS is set to "1" in your configuration. This disables experimental beta headers that KiosAPI may not support.

Output length / max tokens error

If you get an error about output length or max tokens exceeded:
Add the following to your .claude/settings.json env block:

401 Unauthorized / Connection refused

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

Need Help?