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

Codex CLI

Install and configure Codex CLI on your computer using environment-variable-style configuration files.

Windows#

1. Install Node.js#

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.

2. Install Codex CLI#

Open PowerShell and 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
Run the following in PowerShell:
# Target directory
$dir = Join-Path $env:USERPROFILE ".codex"

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

# Write auth.json in UTF-8 without BOM. Existing file will be overwritten.
$auth = @'
{
  "OPENAI_API_KEY": "replace_with_your_API_KEY_here"
}
'@
[System.IO.File]::WriteAllText(
  (Join-Path $dir "auth.json"),
  $auth,
  (New-Object System.Text.UTF8Encoding($false))
)

# Write config.toml in UTF-8 without BOM. Existing file will be overwritten.
$config = @'
model_provider = "moteapi"
model = "gpt-5.5"
model_reasoning_effort = "high"
disable_response_storage = true
preferred_auth_method = "apikey"
requires_openai_auth = true

enableRouteSelection = true

[model_providers.moteapi]
name = "moteapi"
base_url = "https://api.moteapi.com/chatgpt/v1"
wire_api = "responses"
'@
[System.IO.File]::WriteAllText(
  (Join-Path $dir "config.toml"),
  $config,
  (New-Object System.Text.UTF8Encoding($false))
)
Verify that the configuration was created successfully:
Get-Content "$env:USERPROFILE\.codex\auth.json"
Get-Content "$env:USERPROFILE\.codex\config.toml"
image.png

4. Verify the Installation#

Enter codex in PowerShell to start Codex:
image.png
Then type the following in the dialog:
Hello!
Say hello to it. If Codex replies normally and you can see the request record on the platform, the installation 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 Codex CLI#

Install it with npm:
image.png

3. Create Configuration Files#

First, create your API key: Create an API Key
Run the following in Terminal:
Verify that the configuration was created successfully:
image.png

4. Verify the Installation#

Enter codex in Terminal to start Codex, then type the following in the dialog:
Hello!
If Codex replies normally and you can see the request record on the platform, 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 Codex CLI#

Install it with npm:
If the output looks like the screenshot below, the installation was successful.
image.png

3. Create Configuration Files#

First, create your API key: Create an API Key
Run the following in Terminal:
Verify that the configuration was created successfully:
image.png

4. Verify the Installation#

Enter codex in Terminal to start Codex, then type the following in the dialog:
Hello!
If Codex replies normally and you can see the request record on the platform, the configuration was successful.
image.png

FAQ#

1. Since this folder is not version controlled, we recommend requiring approval of all edits and commands.#

Error Screenshot#

image.png

Solution#

Select the first option.
This prompt asks whether you allow Codex to work in this folder without asking for confirmation every time.
Repeated confirmations can be inconvenient, so you can select the first option and let it continue.
Modified at 2026-07-13 05:54:11
Previous
How It Works
Next
Codex App
Built with