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. 开发工具接入

Codex

Codex Integration with RezeAI Tutorial#

Codex is a powerful coding agent tool that supports reading, modifying, and running project code in the terminal (CLI) or VS Code.
This article will guide you through seamlessly switching your Codex underlying model to RezeAI by customizing the Provider and ensuring compatibility with OpenAI Responses.

I. Preparations Before Integration (3 Core Elements)#

Before starting the configuration, please clarify the following 3 core parameters, which will be frequently used in subsequent configurations:
| Configuration Items | Recommended Content | Notes |
| :--- | :--- | :--- |
| API Key | sk-xxxxxxxxxxxxxxxx | Please enter the plain text key directly |
| Base URL | https://api.rezeai.com/v1 | Includes /v1. | | Model Name | For example, gpt-5 or claude-sonnet-4-6 | Enter a model that RezeAI actually supports and that your account has permission to access. |

II. Quick Integration Guide#

Step 1: Install Codex CLI#

Please ensure that Node.js is installed on your computer.
If your environment does not have Node.js, click to download
Open a terminal and run the following command to install it globally:

Step 2: Create a Configuration File (config.toml)#

Codex officially recommends defining custom Providers using a config.toml file.
1.
Locate or create the configuration directory:
Windows: C:\Users\Your Username.codex
macOS / Linux: ~/.codex
2.
Create a file named config.toml in this directory.
3.
Paste the following content completely and save:
# Basic Configuration
model_provider = "RezeAI"
model = "Please replace with the actual model name supported by RezeAI"
preferred_auth_method = "apikey"
disable_response_storage = true

# RezeAI Custom Provider Configuration

[model_providers.rezeai]
name = "RezeAI"
base_url = "https://api.rezeai.com/v1"
env_key = "REZEAI_API_KEY"
wire_api = "responses"
Parameter Explanation: This configuration directly specifies the API gateway (base_url) and tells Codex to retrieve the password from the system's REZEAI_API_KEY environment variable.

Step 3: Configure the API Key Environment Variable#

For security, please do not write the API Key directly in the configuration file. Please inject the environment variable in the terminal using the following command, depending on your operating system:
Windows PowerShell (temporarily applies to the current window):
$env:REZEAI_API_KEY="sk-your RezeAI key"
Windows PowerShell (permanently writes to user variables, requires terminal restart):
[System.Environment]::SetEnvironmentVariable("REZEAI_API_KEY", "sk-your RezeAI key", "User")
macOS / Linux:

Step 4: Startup and Testing#

After configuration, navigate to any of your project's code directories using the terminal and run:
After startup, try entering a simple read-only analysis command, such as: Please summarize the main module structure of the current repository. If Codex responds and outputs results correctly, congratulations, your RezeAI integration is complete!

III. Using the Extension in VS Code#

Codex's CLI terminal version and IDE extension share the same underlying configuration.
Once you've completed the config.toml and environment variable configurations mentioned above, you can directly search for and install the Codex plugin from the VS Code extension store. It's ready to use out of the box, without any additional tedious configuration in VS Code.

IV. Troubleshooting Common Issues (FAQ)#

Q1: ​​Authentication Failed after startup?
Check if your terminal environment variable REZEAI_API_KEY is set successfully. If you are using Windows' permanent write command, you must completely close and reopen the terminal for it to take effect.
Check if you accidentally added the Bearer prefix to the key you entered.
Q2: Model Not Found after startup? **
The model field in the config.toml file cannot be filled in arbitrarily. Please strictly refer to the list of available models provided in the RezeAI console and fill in the complete name without any errors.
Q3: The connection is established, but the experience is unstable and errors occur frequently?
Codex's Provider strongly depends on the responses interface. If instability occurs under high concurrency or special network environments, please ensure that wire_api = "responses" in config.toml is spelled correctly and check whether the currently selected model is fully compatible with OpenAI's Responses specification.**
修改于 2026-08-18 13:42:17
上一页
OpenCode
下一页
Gemini CLI
Built with