1. Installation
Mote API
english
  • 简体中文
  • english
  • Platform Usage
    • Create API Key
    • How It Works
  • Installation
    • Codex CLI
    • Codex App
    • Claude Code CLI
    • Claude Code App
    • Gemini
  • API reference
    • Chat
      • Openai
        • ChatCompletions Format
        • Responses Format
      • Gemini
        • Gemini Text Chat
        • Gemini Media Recognition
      • Native Claude Format
    • Images
      • Openai
        • Generate Images
        • Edit Image
      • Qwen
        • Generate Images
        • Edit Image
      • Nano Banana
        • Gemini Native Format
        • OpenAI Chat Format
    • Videos
      • Sora
        • Create Video
        • Get video task status
        • Get video content
      • Kling
        • Kling text-to-video
        • Get Kling text-to-video task status
        • Kling image-to-video
        • Get Kling image-to-video task status
      • Jimeng
        • Jimeng video generation
      • Create video generation task
      • Get video generation task status
    • Embeddings
      • Native OpenAI format
      • Native Gemini format
    • Completions
      • Native OpenAI format
    • Audio
      • Openai
        • Audio transcription
        • Audio translation
        • Text-to-speech
      • Native Gemini format
    • Realtime
      • Native OpenAI format
    • Rerank
      • Document reranking
    • Models
      • List Model
        • Native OpenAI format
        • Native Gemini format
    • Moderations
      • Native OpenAI format
    • Unimplemented
      • Fine-tuning
        • List fine-tuning tasks (not implemented)
        • Create fine-tuning task (not implemented)
        • Get fine-tuning task details (not implemented)
        • Cancel fine-tuning task (not implemented)
        • Get fine-tuning task events (not implemented)
      • Files
        • List files (not implemented)
        • Upload file (not implemented)
        • Get file info (not implemented)
        • Delete file (not implemented)
        • Get file content (not implemented)
  • Schemas
    • Schemas
      • User
      • Log
      • Model
      • Token
      • Usage
      • PageInfo
      • Channel
      • Redemption
      • ApiResponse
      • ModelsResponse
      • ErrorResponse
      • Message
      • MessageContent
      • Tool
      • ToolCall
      • GeminiModelsResponse
      • ChatCompletionResponse
      • ChatCompletionRequest
      • ChatCompletionStreamResponse
      • CompletionRequest
      • CompletionResponse
      • ResponseFormat
      • ResponsesRequest
      • ResponsesResponse
      • ResponsesStreamResponse
      • ClaudeRequest
      • ClaudeMessage
      • ClaudeResponse
      • EmbeddingRequest
      • EmbeddingResponse
      • ImageGenerationRequest
      • ImageEditRequest
      • ImageResponse
      • AudioTranscriptionRequest
      • AudioTranslationRequest
      • AudioTranscriptionResponse
      • SpeechRequest
      • RerankRequest
      • RerankResponse
      • VideoRequest
      • ModerationRequest
      • VideoResponse
      • ModerationResponse
      • VideoTaskResponse
      • GeminiRequest
      • VideoTaskMetadata
      • VideoTaskError
      • GeminiResponse
      • OpenAIVideo
      • OpenAIVideoError
  1. Installation

Claude Code CLI

Install and configure Claude Code CLI on your computer using configuration files.

Windows#

1. Install Node.js / Git#

Go to the Node.js official website, then download and install the LTS version. If Node.js is already installed, you can skip this step.
Verify the installation:
image.png
If a version number is displayed, Node.js has been installed successfully.
Please note that the Node.js version must be 18 or later.
If your version is lower than this, you can ask an AI assistant how to upgrade Node.js. Ask it to give you commands for collecting system information first, and then it can provide the fastest and most accurate guidance.
Go to the Git official website, download the installer, then follow the prompts to finish the installation.
image.png

2. Install Claude Code CLI#

Open PowerShell. We recommend running it as administrator. Then run:
image.png
If you see an error saying that scripts are disabled on this system, run PowerShell as administrator, then execute:
Set-ExecutionPolicy Unrestricted

3. Create Configuration Files#

First, create your API key: Create an API Key
Open PowerShell. We recommend running it as administrator. Then run:
# Target directory: C:\Users\<you>\.claude
$dir = Join-Path $env:USERPROFILE ".claude"
$settingsFile = Join-Path $dir "settings.json"
$claudeJsonFile = Join-Path $env:USERPROFILE ".claude.json"

# Create the directory. No error is reported if it already exists.
New-Item -ItemType Directory -Path $dir -Force | Out-Null

# 1. Write settings.json for API configuration.
$settingsJson = @'
{
  "env": {
    "ANTHROPIC_AUTH_TOKEN": "replace_with_your_API_KEY_here",
    "ANTHROPIC_API_KEY": "",
    "ANTHROPIC_BASE_URL": "https://api.moteapi.com"
  }
}
'@
[System.IO.File]::WriteAllText($settingsFile, $settingsJson, (New-Object System.Text.UTF8Encoding($false)))

# 2. Write .claude.json to skip login. Note that this file is in the user home directory.
$claudeJson = @'
{
  "hasCompletedOnboarding": true
}
'@
[System.IO.File]::WriteAllText($claudeJsonFile, $claudeJson, (New-Object System.Text.UTF8Encoding($false)))

Write-Host "Configuration complete!"
Write-Host "  - settings.json: $settingsFile"
Write-Host "  - .claude.json: $claudeJsonFile"
image.png

4. Verify the Installation#

Reopen PowerShell or your IDE, then run:
If you see the prompt below, select the first yes, then press Enter.
This prompt asks you to authorize Claude Code to access and execute code in the current folder, so it can read, modify, and run project files.
image.png
Next, type the following in the dialog:
Hello!
If Claude Code replies normally and the backend shows the correct request records, the configuration was successful.
image.png

macOS#

1. Install Node.js#

First, make sure Homebrew is installed on your computer. If it is not installed, open the Homebrew website and copy the installation command from the page to install it with one command.
Some resources required during Homebrew installation are hosted overseas, so you may need to enable a TUN proxy.
image.png
After Homebrew is installed, use it to install Node.js. If Node.js is already installed, you can skip this step.
image.png
Use the following command to verify the installation:
image.png
If a version number is displayed, Node.js has been installed successfully.
Please note that the Node.js version must be 18 or later.
If your version is lower than this, you can ask an AI assistant how to upgrade Node.js. Ask it to give you commands for collecting system information first, and then it can provide the fastest and most accurate guidance.

2. Install Claude Code CLI#

Open a new terminal, then run:
image.png

3. Create Configuration Files#

First, create your API key: Create an API Key
Open a new terminal, then run:
Use the following command to view the configuration file contents. Do not forget to replace the API key:
image.png

4. Verify the Installation#

Reopen Terminal or your IDE, then run:
If you see the prompt below, select the first yes, then press Enter.
This prompt asks you to authorize Claude Code to access and execute code in the current folder, so it can read, modify, and run project files.
image.png
Next, type the following in the dialog:
Hello!
If Claude Code replies normally and the backend shows the correct request records, the configuration was successful.
image.png

Linux#

1. Install Node.js#

Use the following commands to install Node.js. If Node.js is already installed, you can skip this step.
Verify the installation:
image.png
Please note that the Node.js version must be 18 or later.
If your version is lower than this, you can ask an AI assistant how to upgrade Node.js. Ask it to give you commands for collecting system information first, and then it can provide the fastest and most accurate guidance.

2. Install Claude Code CLI#

image.png
The final message in the screenshot says that the current npm version is low. You may not see this message, and it can be ignored.
If you encounter other issues, you can ask an AI assistant.

3. Create Configuration Files#

First, create your API key: Create an API Key
Open a new terminal, then run:
Use the following command to view the configuration file contents. Do not forget to replace the API key:
image.png

4. Verify the Installation#

Reopen Terminal or your IDE, then run:
If you see the prompt below, select the first yes, then press Enter.
This prompt asks you to authorize Claude Code to access and execute code in the current folder, so it can read, modify, and run project files.
image.png
Next, type the following in the dialog:
hi
If Claude Code replies normally and the backend shows the correct request records, the configuration was successful.
image.png

FAQ#

1. Unable to connect to Anthropic services#

Error Screenshot#

image.png

Solution#

Add the following line to the ~/.claude.json file:
"hasCompletedOnboarding": true,
Note that this line ends with a comma. Add it in the middle of the JSON object.
image.png

2. Invalid API key. Please run /login#

Error Screenshot#

image.png

Solution#

This problem occurs because the environment variables were not configured correctly. You can refer to the earlier tutorial and configure the environment variables again.
The main variables are:
ANTHROPIC_BASE_URL
ANTHROPIC_AUTH_TOKEN

3. 401 {"error":"Invalid API key"}#

Error Screenshot#

image.png

Solution#

This problem occurs because the API key is incorrect. You can generate a new API key on the website, then refer to the earlier tutorial and set the ANTHROPIC_AUTH_TOKEN environment variable again.
Modified at 2026-07-13 06:13:21
Previous
Codex App
Next
Claude Code App
Built with