Skip to main content

Documentation Index

Fetch the complete documentation index at: https://platform.stepfun.ai/docs/llms.txt

Use this file to discover all available pages before exploring further.

Claude Code is an AI coding assistant that runs in the terminal. It can complete code generation, debugging, refactoring, engineering management, and other development tasks through natural language commands. By configuring its API endpoint, Claude Code can route model requests to a custom AI service. This guide explains how to configure Step API access in Claude Code and verify that the model is available.

Overview

Claude Code is designed for developers who prefer terminal-based workflows. After the configuration is complete, you can use natural language to drive coding tasks directly inside local projects.

Prerequisites

Operating System

Claude Code supports the following systems:
  • macOS
  • Linux
  • Windows (PowerShell or Windows Terminal is recommended)

Node.js Environment

Claude Code depends on Node.js. We recommend installing Node.js >= 18. Example installation methods for different systems:
  • macOS: use Homebrew or nvm
  • Linux: use the system package manager or nvm
  • Windows: use the official Node.js installer or Chocolatey
Example commands:
brew install node
nvm install 18
sudo apt install nodejs npm
choco install nodejs
After installation, run the following commands to verify your environment:
node -v
npm -v

Subscribe to Step Plan

Before you start, make sure your account has an active Step Plan subscription. Model calls and quota usage will work only after your account has the required plan or calling permissions. To subscribe or purchase a plan, visit Step Plan Subscription.

Get a Step API Key

Before calling models, get an API Key from the Step Open Platform. We recommend creating a new key in the console and avoiding hardcoding it into your code repository. Recommended practices:
  • Store the key in an environment variable
  • Or manage the key through a local configuration file

Configuration Steps

Install Claude Code

Run the following command in your terminal:
npm install -g @anthropic-ai/claude-code
After installation, verify the version:
claude --version

Create the Configuration File

macOS / Linux (Bash)
curl -fsSL https://cdn.jsdelivr.net/gh/Zgh332358/claude-key-setup@main/configure_claude.sh -o configure_claude.sh
chmod +x configure_claude.sh
bash configure_claude.sh
Windows (PowerShell as Administrator)Note: You must run the script in PowerShell as Administrator. Otherwise, the script will show a prompt and exit.
  1. Right-click the Windows Start menu, then select “Terminal (Admin)” or “Windows PowerShell (Admin)”.
  2. Run the following commands:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass; irm https://raw.githubusercontent.com/Zgh332358/claude-key-setup/main/configure_claude.ps1 -OutFile configure_claude.ps1; .\configure_claude.ps1

Start Claude Code

Enter any code project directory:
cd your-project
Start Claude Code:
claude
If Do you want to use this API key? appears on first launch, select Yes.

Test the Integration

After entering Claude Code, run the following command to view the current configuration status:
/status
Confirm that the following information is correct:
  • The API Key is loaded
  • The Base URL is correct (https://api.stepfun.ai/step_plan)
  • The default model name is correct (<model_id>)
Then run this test instruction:
write a minimal python hello world program into hello.py
If Claude Code successfully creates the file and writes code into it, the model integration is working.

Common Issues

Model Does Not Exist

Example error:
model does not exist
Possible causes:
  • The model name is incorrect (it should be <model_id>)
  • The current account does not have permission to use this model
  • The Base URL points to the wrong endpoint (it should be https://api.stepfun.ai/step_plan)

Invalid API Key

Example error:
401 invalid_api_key
Possible causes:
  • The API Key was entered incorrectly
  • The key has expired or been deleted
  • The key does not match the current API domain

Insufficient Quota

Example error:
402 quota_exceeded
This usually means the current account has used up its calling quota. Add balance or upgrade your plan.

Changes Do Not Take Effect After Modifying the Configuration

We recommend checking:
  1. Whether Claude Code has been fully restarted.
  2. Whether the configuration file uses valid JSON.
  3. Whether the terminal environment variables have been refreshed.

Summary

After configuration is complete, Claude Code can initiate model calls through the Step API in the terminal for code generation, debugging, and development workflow automation. We recommend verifying the configuration with /status and a minimal task before using it in a real project.