1. 开发工具接入
RezeAI
  • 快速开始
    • Product Introduction
    • BaseUrl
    • Generate calling code quickly using AI
    • Plugin Configuration Guide
    • Large Model Support and Channel Capability Description
    • Claude code error code explanation
  • 开发工具接入
    • OpenClaw
    • Claude Code
    • OpenCode
    • Codex
    • Gemini CLI
  • 接口说明
    • Models
      • List models
        • Native OpenAI format
        • Native Gemini format
    • Images
      • Native Gemini format
        • OpenAI chat format
        • Gemini native format
      • Native OpenAI format
        • Generate image
        • Edit image
    • Chat
      • Native OpenAI format
        • Responses format
      • Native Claude format
    • Audio
      • Native OpenAI format
        • Audio transcription
        • Audio translation
        • Text-to-speech
      • Native Gemini format
    • Wanxiang 2.7 Images
      • Wanxiang 2.7 text-to-image (sync)
      • Wanxiang 2.7 image edit (async polling)
    • GeminiVeo
      • Gemini Veo
        • Create video task
        • Create video task (/video/generations)
      • Task query
        • Query video task
        • Query video task (/video/generations)
        • Proxy-download the video of a completed task
    • Seedance Asset Library
      • Asset groups
        • ModelArk asset Universal OpenAPI (official Query style)
        • Create asset group
        • List asset groups
        • Get asset group details
        • Update asset group
        • Delete asset group
      • Assets
        • Create asset (upload URL)
        • List assets
        • Get asset details
        • Update asset
        • Delete asset
      • Live person verification
        • Create live person H5 verification session
        • Query live person verification result
    • Sora
      • Sora 2
        • Remix video
    • Kling
      • Text-to-video
        • Kling text-to-video
      • Image-to-video
        • Kling image-to-video
      • Task query
        • Query text-to-video task
        • Query image-to-video task
    • Jimeng
      • Jimeng official API
        • Jimeng official submit/query (distinguished by Action)
    • Embeddings
      • Native OpenAI format
      • Native Gemini format
    • Completions
      • Native OpenAI format
    • Realtime
      • Native OpenAI format
    • Rerank
      • Document reranking
    • Moderations
      • Native OpenAI format
    • 数据模型
      • Schemas
        • ModelsResponse
        • ToolCall
        • GeminiModelsResponse
        • ChatCompletionResponse
        • CompletionRequest
        • CompletionResponse
        • ResponsesResponse
        • ClaudeRequest
        • ClaudeMessage
        • ClaudeResponse
        • EmbeddingResponse
        • ImageResponse
        • AudioTranscriptionResponse
        • RerankResponse
        • ModerationRequest
        • ModerationResponse
        • GeminiRequest
        • GeminiResponse
      • Model
      • Usage
      • SoraVideoTaskCreated
      • KlingErrorResponse
      • JimengVideoTaskCreated
      • HailuoVideoTaskCreated
      • ViduVideoTaskCreated
      • GeminiVeoVideoTaskCreated
      • VertexVeoVideoTaskCreated
      • HappyHorseMediaItem
      • MediaItem
      • KlingTaskCreated
      • HappyHorseVideoTaskCreated
      • Message
      • SoraErrorResponse
      • KlingVideoTaskStatus
      • JimengErrorResponse
      • HailuoErrorResponse
      • ViduErrorResponse
      • ListFilterBase
      • GeminiVeoErrorResponse
      • VertexVeoErrorResponse
      • WanVideoTaskCreated
      • HappyHorseVideoTaskStatus
      • ArkListFilterBase
      • MessageContent
      • JimengOfficialSubmitRequest
      • ErrorResponse
      • ListAssetGroupsRequest
      • HappyHorseErrorResponse
      • SeedanceErrorResponse
      • Tool
      • ImageGenerationResponse
      • WanImageGenerationResponse
      • ListAssetsRequest
      • WanErrorResponse
      • GetAssetRequest
      • GetAssetGroupRequest
      • ChatCompletionRequest
      • UpdateAssetGroupRequest
      • UpdateAssetRequest
      • DeleteAssetRequest
      • ResponseFormat
      • DeleteAssetGroupRequest
      • ResponsesRequest
      • GatewayError
      • ArkGatewayError
      • EmbeddingRequest
      • SpeechRequest
      • RerankRequest
      • VideoRequest
      • VideoResponse
      • VideoTaskResponse
      • VideoTaskMetadata
      • VideoTaskError
      • OpenAIVideoError
      • HappyHorseVideoRequest
      • SeedanceVideoRequest
      • ProjectName
      • WanVideoRequest
      • ArkProjectName
      • SoraVideoRequest
      • KlingVideoRequest
      • JimengVideoRequest
      • HailuoVideoRequest
      • ViduVideoRequest
      • GeminiVeoVideoRequest
      • VertexVeoVideoRequest
      • CreateAssetGroupRequest
      • Wan27ImageRequest
      • SeedanceMetadata
      • VideoTaskCreated
      • CreateAssetRequest
      • Wan27ImageEditRequest
      • SeedanceVideoTaskCreated
      • SoraVideoTaskStatus
      • JimengVideoTaskStatus
      • HailuoVideoTaskStatus
      • ViduVideoTaskStatus
      • GeminiVeoVideoTaskStatus
      • VertexVeoVideoTaskStatus
      • VideoTaskStatus
      • SeedanceVideoTaskStatus
      • WanVideoTaskStatus
      • ListAssetsFilter
      • ArkListAssetsFilter
      • JimengOfficialGetResultRequest
      • CreateVisualValidateSessionRequest
      • GetVisualValidateResultRequest
      • UpstreamResultEnvelope
      • ArkUpstreamResultEnvelope
  1. 开发工具接入

Gemini CLI

Gemini CLI Integration with RezeAI Tutorial#

Google's official Gemini CLI is an extremely powerful endpoint AI tool (with a built-in, highly praised interactive interface). Through simple environment variable configuration, you can seamlessly switch its default cloud computing power to the high-performance model services provided by RezeAI.

I. Preparation Before Integration (3 Core Elements)#

Before starting, please be sure to clarify the following 3 parameters. Please pay special attention to the format requirements of the Base URL:
| Configuration Items | Recommended Content | Notes |
| :--- | :--- | :--- |
| API Key | sk-xxxxxxxxxxxxxxxx | The plain text key obtained from the RezeAI console, do not include the Bearer prefix. |
| Base URL | https://api.rezeai.com | ⚠Cannot include /v1**. Because Gemini CLI automatically appends the official path to the end. | | Model Name | Enter the name of a Gemini model supported by RezeAI | It is recommended to use a natively supported model name such as gemini-2.5-flash-thinking. |

II. Installing Gemini CLI#

Gemini CLI depends on a Node.js environment. Please ensure that Node.js is installed on your computer.
If your environment does not have Node.js, click to download
Open a terminal (Windows recommends PowerShell, Mac recommends Terminal), and run the following official command for global installation:

III. Configuring Environment Variables (Core Step)#

Gemini CLI does not recognize generic OpenAI environment variable names; you must use its proprietary variable names (GEMINI_API_KEY, GOOGLE_GEMINI_BASE_URL, etc.).
Please copy and modify the following commands according to your operating system (replace with your own API Key and model name), and run them in the terminal:
Windows (PowerShell):

$env:GEMINI_API_KEY="sk-your Reze key"

$env:GOOGLE_GEMINI_BASE_URL="https://api.rezeai.com"

$env:GEMINI_MODEL="gemini-2.5-flash-thinking"
Windows (CMD):

set GEMINI_API_KEY=sk-your Reze key

set GOOGLE_GEMINI_BASE_URL=https://api.rezeai.com

set GEMINI_MODEL=gemini-2.5-flash-thinking
macOS / Linux:
💡 Advanced Tips: The above environment variables are only valid for the current terminal window by default. To make them permanent, add them to your system's "Advanced System Settings -> Environment Variables", or write them to your Mac/Linux's ~/.bashrc / ~/.zshrc configuration file.

IV. One-Click Startup and First Boot#

After injecting the environment variables, enter the following command in the same terminal window to start:
Possible prompts on first boot:
1.
Install VS Code plugin: If prompted Do you want to connect VS Code to Gemini CLI?, it is strongly recommended to press 1 (Yes). This allows AI to directly read the code in your editor.
2.
Passwordless Login: Because you have correctly configured your environment variables, the program will automatically skip the login menu and directly enter the dialog interface with the ">" prompt.
After the ">", type Hello, please introduce yourself. If you receive a reply quickly, congratulations, the integration is successful!

V. Common Problem Troubleshooting (FAQ)#

Q1: ​​Error Invalid URL (POST /v1/v1beta/models/...:streamGenerateContent)
Cause: This is the most common error! It means that your GOOGLE_GEMINI_BASE_URL is entered as https://api.rezeai.com/v1.
Solution: Please delete /v1 at the end of the URL. It must remain the clean root domain https://api.rezeai.com, then restart the terminal to test.
Q2: After starting, a bunch of red text pops up: [API Error: Content generator not initialized], and it forcibly prompts you to select an authentication method?
Reason: This indicates that Gemini CLI has not read your environment variables.
Solution:
1.
Please check if you mistakenly wrote OPENAI_API_KEY as the variable name (it must be GEMINI_API_KEY).
2.
Check if you accidentally closed the terminal after configuring the environment variables. Please run gemini in the same window where you configured the environment variables.
Q3: The dialog prompts that the model cannot be found or is invalid?
Solution: Please check if the model name entered in the environment variable $env:GEMINI_MODEL is correct. It is recommended to use the full name of a real Gemini series model within the RezeAI platform for testing.
修改于 2026-08-18 13:45:00
上一页
Codex
下一页
Native OpenAI format
Built with