# I Code Easy public documentation corpus I Code Easy provides public developer documentation for supported AI coding clients and API workflows. Prices and availability can change. Check the public pricing page and current product documentation before making decisions. ## https://icodeeasy.cc/docs/one-key-multiple-clients/ Title: 一个 API Key 如何配置 Claude Code、Codex 与 Gemini CLI? Description: 用同一个 I Code Easy API Key 配置文档化的 Claude Code、Codex 与 Gemini CLI,同时保留每个客户端所需的协议专用配置,并完成安全验证。 Last modified: 2026-08-17 ## 一个 API Key 如何配置 Claude Code、Codex 与 Gemini CLI? 在控制台创建 I Code Easy API Key 后,可以把同一把 Key 填入已文档化的 Claude Code、Codex 和 Gemini CLI 配置;每个客户端仍要使用各自协议对应的环境变量或配置文件。 ### 分别完成客户端配置 请依次使用 [Claude Code](https://icodeeasy.cc/docs/claude-code/)、[Codex](https://icodeeasy.cc/docs/codex/) 和 [Gemini CLI](https://icodeeasy.cc/docs/gemini-cli/) 指南,不要把一个客户端的配置原样复制给另一个客户端。 ### 先确认兼容性 通过[模型能力目录](https://icodeeasy.cc/docs/model-capabilities/)确认所选客户端与模型的组合。 ### 下一步 若终端或凭据尚未准备好,请先看[环境准备](https://icodeeasy.cc/docs/env-setup/)。 ## https://icodeeasy.cc/docs/connection-and-recovery/ Title: 连接慢或请求失败时如何排查与恢复? Description: 排查凭据、模型支持、限流、客户端配置与网络可达性,并在需要时使用文档化备用访问域名恢复请求和继续排查。 Last modified: 2026-08-17 ## 连接慢或请求失败时如何排查与恢复? 主 API 域名是 `https://api.icodeeasy.cc`;`https://jp.icodeeasy.cc` 与 `https://sg.icodeeasy.cc` 是文档化的备用访问域名,可在重新检查客户端配置后使用。 ### 先区分问题类型 检查 API Key、模型支持情况、限流响应、客户端专用 Base URL 与网络可达性。Gemini CLI 配置的是域名,不能追加 `/v1beta`。 ### 按客户端恢复 产品提供路由与故障恢复行为,但客户端配置仍然重要。请复查 [Claude Code](https://icodeeasy.cc/docs/claude-code/)、[Codex](https://icodeeasy.cc/docs/codex/)、[Gemini CLI](https://icodeeasy.cc/docs/gemini-cli/) 或 [FAQ](https://icodeeasy.cc/docs/faq/)。 ### 下一步 更换模型前,请查阅[模型能力目录](https://icodeeasy.cc/docs/model-capabilities/)。 ## https://icodeeasy.cc/docs/pricing-balance-and-usage/ Title: 在哪里查看人民币价格、余额与用量明细? Description: 通过公开价格页和控制台查看实时人民币价格、余额、请求日志、Token 用量、账单明细及当前支付方式的最新说明。 Last modified: 2026-08-17 ## 在哪里查看人民币价格、余额与用量明细? 人民币实时价格可在公开价格页或 `/api/public/model-pricing` 查询,价格与汇率信息可能变化;控制台会在可用时显示余额、请求日志、Token 用量和账单明细。 ### 查看实时数据 打开[价格页](https://icodeeasy.cc/#pricing)、[控制台价格](https://icodeeasy.cc/dashboard/pricing/)、[请求日志](https://icodeeasy.cc/dashboard/logs/)或[公开价格 API](https://icodeeasy.cc/api/public/model-pricing)。 ### 充值说明 支付宝可用于充值;银行卡是否可用及报价金额以服务端返回的支付配置为准。 ### 下一步 需要程序查询余额时,请看[余额查询 API](https://icodeeasy.cc/docs/balance-query/)。 ## https://icodeeasy.cc/docs/api-data-and-privacy/ Title: API 请求内容和元数据如何处理? Description: 了解 API 请求内容和元数据如何用于路由、用量、安全与支持,并跳转阅读完整隐私政策、服务条款和可接受使用规则。 Last modified: 2026-08-17 ## API 请求内容和元数据如何处理? I Code Easy 会处理请求内容和元数据,用于路由、用量计算、安全维护和支持服务;本页是通俗指引,完整规则请阅读[隐私政策](https://icodeeasy.cc/privacy/)。 ### 可能保留的信息 除隐私政策列明的运营、计费、安全、反滥用、排障、争议、法律、备份或用户启用功能所需情形外,请求和响应正文通常不会被持久保存;元数据、用量、错误、延迟、安全日志与风险信号可能被保留。 ### 重要边界 模型提供方会依其自身条款、隐私政策及数据处理规则处理请求。I Code Easy 声明不会出售 API 请求内容或个人信息;请同时阅读[服务条款](https://icodeeasy.cc/terms/)和[可接受使用](https://icodeeasy.cc/acceptable-use/)。 ### 下一步 账户记录可参阅[价格、余额与用量](https://icodeeasy.cc/docs/pricing-balance-and-usage/)。 ## https://icodeeasy.cc/docs/claude-code/ Title: Claude Code / Desktop 安装与配置 Description: 安装 Claude Code 或 Claude Desktop,安全保存凭据并配置 I Code Easy API 地址,完成启动、模型选择与基础故障检查。 Last modified: 2026-08-14 ## Claude Code / Claude Desktop 安装与配置 Anthropic 官方 CLI 工具和桌面图形版客户端都可以接入 I Code Easy API 网关。 **推荐 MacOS 用户使用 iTerm2 终端,体验更佳。** ### 第一步:安装 Claude Code **MacOS / Linux / WSL** ```bash curl -fsSL https://claude.ai/install.sh | bash ``` **Windows PowerShell** ```powershell irm https://claude.ai/install.ps1 | iex ``` **Windows CMD** ```cmd curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd ``` 原生安装会自动在后台更新,保持最新版本。 **npm 安装(需先完成「环境准备」)** ```bash npm i -g @anthropic-ai/claude-code ``` --- ### 第二步:配置 API #### Linux / MacOS 配置 添加到 `~/.bashrc` 或 `~/.zshrc`(默认推荐 `kimi-k2.7`): ```bash export ANTHROPIC_AUTH_TOKEN="你的API Key" export ANTHROPIC_BASE_URL="https://api.icodeeasy.cc" export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC="1" ``` 不要设置 `CLAUDE_CODE_ATTRIBUTION_HEADER=0`;部分 Claude Code 专用通道会校验客户端原生归因信息。 如果 `api.icodeeasy.cc` 连接慢,可以把 `ANTHROPIC_BASE_URL` 换成 `https://jp.icodeeasy.cc` 或 `https://sg.icodeeasy.cc`。 保存后运行 `source ~/.bashrc` 或 `source ~/.zshrc` 使配置生效。 #### Windows 配置 在 PowerShell 中运行: ```powershell # 设置 API 密钥 [Environment]::SetEnvironmentVariable("ANTHROPIC_AUTH_TOKEN", "你的API Key", "User") # 设置 API 接入地址 [Environment]::SetEnvironmentVariable("ANTHROPIC_BASE_URL", "https://api.icodeeasy.cc", "User") # 禁用非必要流量 [Environment]::SetEnvironmentVariable("CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC", "1", "User") ``` 如果 `api.icodeeasy.cc` 连接慢,可以把 `ANTHROPIC_BASE_URL` 换成 `https://jp.icodeeasy.cc` 或 `https://sg.icodeeasy.cc`。 设置后需要重新打开 PowerShell 才能生效。 可以在新的 PowerShell 窗口中验证用户级环境变量: ```powershell [Environment]::GetEnvironmentVariable("ANTHROPIC_AUTH_TOKEN", "User") [Environment]::GetEnvironmentVariable("ANTHROPIC_BASE_URL", "User") [Environment]::GetEnvironmentVariable("CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC", "User") ``` `SetEnvironmentVariable` 写入的是用户级持久环境变量,不会立即更新当前 PowerShell 会话。新开一个 PowerShell 窗口后再用 `claude` 启动。 --- ### 第三步:启动 Claude Code ```bash cd your-project-folder claude ``` --- ### Claude Desktop 图形版配置 Claude 桌面端图形版可以通过开发者模式直接配置第三方 API 网关。 #### 开启开发者模式 在菜单栏依次点击 `Help` -> `Troubleshooting` -> `Enable Developer mode`,然后重启 Claude Desktop。 #### 配置 API 网关 重启后在菜单栏依次点击 `Developer` -> `Configure third-party inference`,按下面填写: | 配置项 | 填写内容 | | --- | --- | | Connection | `Gateway` | | Base URL | `https://api.icodeeasy.cc` | | API key | 你的 API Key | 如果 `api.icodeeasy.cc` 连接慢,可以把 Base URL 换成 `https://jp.icodeeasy.cc` 或 `https://sg.icodeeasy.cc`。 #### 设定模型 在模型名称中填入要使用的模型,例如 `claude-opus-5`、`claude-sonnet-4-6`、`kimi-k2.7`、`glm-5.3` 等,保存后重启 Claude Desktop。Claude 模型可使用 Claude 接入点。 如果要固定使用 Claude Fable 5,请参考 [Claude Fable 5 使用指南](https://icodeeasy.cc/docs/claude-fable-5/)。 ## https://icodeeasy.cc/docs/codex/ Title: Codex 安装与配置 Description: 安装 Codex CLI,使用 auth.json 保存 API Key,设置 I Code Easy provider 与 Base URL,并运行第一次 Codex 会话。 Last modified: 2026-09-09 ## Codex 安装与配置 OpenAI 代码助手,强大的 AI 编程工具。 请先完成「环境准备」章节,确保 Node.js 和 npm 已安装。 已经完成安装,需要理解模型、Provider、权限、会话和 Token 配置时,请继续阅读 [Codex config.toml 进阶指南](https://icodeeasy.cc/docs/codex-config/)。 --- ### Linux / MacOS 配置 #### 步骤 1: 安装 Codex ```bash npm install -g @openai/codex@latest ``` #### 步骤 2: 创建配置文件夹 在用户目录下创建 `.codex` 文件夹。 ```bash mkdir -p ~/.codex ``` #### 步骤 3: 创建 config.toml 在 `.codex` 文件夹里创建 `config.toml` 文件,并填入下面的内容: ```toml model_provider = "icodeeasy" model = "gpt-5.6-sol" cli_auth_credentials_store = "file" suppress_unstable_features_warning = true personality = "pragmatic" [model_providers.icodeeasy] name = "icodeeasy" base_url = "https://api.icodeeasy.cc" wire_api = "responses" requires_openai_auth = true ``` 如果 `api.icodeeasy.cc` 连接慢,可以把 `base_url` 换成 `https://jp.icodeeasy.cc` 或 `https://sg.icodeeasy.cc`。 #### 步骤 4: 登录并生成 auth.json 到 [密钥设置](https://icodeeasy.cc/dashboard/keys) 复制 API Key,然后在终端运行以下命令。粘贴后按 Enter; 输入不会显示,也不会把密钥保存到 shell 启动文件: ```bash read -s OPENAI_API_KEY printf '\n' printf '%s' "$OPENAI_API_KEY" | codex login --with-api-key unset OPENAI_API_KEY codex login status ``` Codex 会把凭据写入 `~/.codex/auth.json`。不要手工创建或编辑该文件;`config.toml` 负责模型与 Provider,`auth.json` 只负责登录凭据。建议确认两个文件仅当前用户可读写: ```bash chmod 600 ~/.codex/config.toml ~/.codex/auth.json ``` #### 步骤 5: 启动 Codex ```bash cd your-project-folder codex ``` --- ### Windows 配置 #### 步骤 1: 安装 Codex ```powershell npm install -g @openai/codex@latest ``` #### 步骤 2: 创建配置文件夹 查看用户目录: ```powershell echo $env:USERPROFILE ``` 在用户目录下创建 `.codex` 文件夹: ```powershell New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.codex" ``` #### 步骤 3: 创建 config.toml 在 `.codex` 文件夹里创建 `config.toml` 文件,并填入下面的内容: ```toml model_provider = "icodeeasy" model = "gpt-5.6-sol" cli_auth_credentials_store = "file" suppress_unstable_features_warning = true personality = "pragmatic" [model_providers.icodeeasy] name = "icodeeasy" base_url = "https://api.icodeeasy.cc" wire_api = "responses" requires_openai_auth = true [features] elevated_windows_sandbox = true ``` 如果 `api.icodeeasy.cc` 连接慢,可以把 `base_url` 换成 `https://jp.icodeeasy.cc` 或 `https://sg.icodeeasy.cc`。 #### 步骤 4: 登录并生成 auth.json 到 [密钥设置](https://icodeeasy.cc/dashboard/keys) 复制 API Key,然后运行: ```powershell $secureKey = Read-Host "API Key" -AsSecureString $plainKey = [System.Net.NetworkCredential]::new("", $secureKey).Password $plainKey | codex login --with-api-key $plainKey = $null codex login status ``` Codex 会把凭据写入 `$env:USERPROFILE\.codex\auth.json`。不要手工创建或编辑该文件, 也不需要设置永久的 `OPENAI_API_KEY` 用户环境变量。 #### 步骤 5: 启动 Codex 新开一个 PowerShell,进入工程目录并启动: ```powershell cd your-project-folder codex ``` --- ### VSCode 配置 **请先按上面的步骤配置好 Codex CLI,并确认 `codex login status` 成功。VSCode 扩展会复用同一用户目录下的 `config.toml` 和 Codex 缓存的登录凭据。** #### 步骤 1: 安装 Codex 扩展 在 VSCode 扩展市场搜索并安装 `Codex`。 #### 步骤 2: 打开配置文件 Codex VSCode 扩展会复用用户目录下的 `.codex/config.toml` 配置。请按上面的 Linux / MacOS 或 Windows 步骤创建 `.codex` 文件夹和 `config.toml` 文件。 #### 步骤 3: 配置 API Key 通常不需要再次输入 API Key。如果扩展仍提示登录,请先在 VSCode 集成终端运行 `codex login status`,再执行 `Developer: Reload Window`。 ## https://icodeeasy.cc/docs/gemini-cli/ Title: Gemini CLI 安装与配置 Description: 安装 Gemini CLI,配置自定义服务地址与认证,并掌握非流式严格 JSON、SSE 流式响应、结构化输出和视频分析 Demo 的正确用法。 Last modified: 2026-09-03 ## Gemini CLI 安装与配置 Google AI 编程助手,适合超大上下文代码任务。 请先完成「环境准备」章节,确保 Node.js 和 npm 已安装。 --- ### Linux / macOS 配置 #### 步骤 1: 安装 Gemini CLI ```bash npm i -g @google/gemini-cli ``` #### 步骤 2: 配置环境变量 添加到 `~/.bashrc` 或 `~/.zshrc`: ```bash # API 接入地址:只填写域名,不要追加 /v1beta export GOOGLE_GEMINI_BASE_URL="https://api.icodeeasy.cc" # 使用本站 API Key export GEMINI_API_KEY="你的API Key" # 推荐快速模型。也可以改为 gemini-3.1-pro-preview 等强模型 export GEMINI_MODEL="gemini-3.7-flash" # 推荐显式使用 Gemini API v1beta export GOOGLE_GENAI_API_VERSION="v1beta" ``` 保存后运行 `source ~/.bashrc` 或 `source ~/.zshrc` 使配置生效。 > 注意:`GOOGLE_GEMINI_BASE_URL` 不要写成 `https://api.icodeeasy.cc/v1beta`,否则 Gemini CLI 会拼出 `/v1beta/v1beta/models/...` 导致请求路径错误。 > 如果 `api.icodeeasy.cc` 连接慢,可以把 `GOOGLE_GEMINI_BASE_URL` 换成 `https://jp.icodeeasy.cc` 或 `https://sg.icodeeasy.cc`,同样不要追加 `/v1beta`。 #### 步骤 3: 启动 Gemini ```bash cd your-project-folder gemini ``` --- ### Windows 配置 #### 步骤 1: 安装 Gemini CLI ```powershell npm i -g @google/gemini-cli ``` #### 步骤 2: 配置环境变量(PowerShell) ```powershell # API 接入地址:只填写域名,不要追加 /v1beta [Environment]::SetEnvironmentVariable("GOOGLE_GEMINI_BASE_URL", "https://api.icodeeasy.cc", "User") # 使用本站 API Key [Environment]::SetEnvironmentVariable("GEMINI_API_KEY", "你的API Key", "User") # 推荐快速模型。也可以改为 gemini-3.1-pro-preview 等强模型 [Environment]::SetEnvironmentVariable("GEMINI_MODEL", "gemini-3.7-flash", "User") # 推荐显式使用 Gemini API v1beta [Environment]::SetEnvironmentVariable("GOOGLE_GENAI_API_VERSION", "v1beta", "User") ``` 设置后需要重新打开 PowerShell 才能生效。 如果 `api.icodeeasy.cc` 连接慢,可以把 `GOOGLE_GEMINI_BASE_URL` 换成 `https://jp.icodeeasy.cc` 或 `https://sg.icodeeasy.cc`,同样不要追加 `/v1beta`。 #### 步骤 3: 启动 Gemini 新开一个 PowerShell,进入工程目录并启动: ```powershell cd your-project-folder gemini ``` --- ### 模型选择 常用模型: | 用途 | 模型 | |---|---| | 新一代快速模型 | `gemini-3.8-flash` | | 上一代快速模型 | `gemini-3.7-flash` | | 快速模型 | `gemini-3.6-flash` | | 快速响应 | `gemini-3-flash-preview` | | 低成本快速 | `gemini-2.5-flash` | | 更强推理 | `gemini-3.1-pro-preview` | | 稳定 2.5 Pro | `gemini-2.5-pro` | Gemini CLI 内置的 `flash` 选项可能会解析到旧的 `gemini-3-flash-preview`。如果客户端或插件传入 `gemini-3-flash`,本站会自动映射到 `gemini-3-flash-preview`。文本模型 `gemini-2.5-flash` 也继续可用:自 2026-08-03 起按原名直接提供(不再透明升级到 `gemini-3.6-flash`),按 2.5 Flash 价格计费。 --- ### Raw API 与严格 JSON 示例 如果业务程序需要直接解析模型返回值,建议务必在 `generationConfig` 中配置完整的 `responseJsonSchema`,并同时设置 `responseMimeType: application/json`。仅在提示词里写“返回 JSON”,或者只设置 `responseMimeType`,都不足以稳定约束字段结构和 JSON 语法。 > **重点:** `responseMimeType` 只声明期望的输出类型;`responseJsonSchema` 才负责约束字段、类型、必填项和嵌套结构。只要业务目标是拿到可解析的 JSON,就建议配置完整的 `responseJsonSchema`。 下面示例使用环境变量保存 API Key。请替换成你自己的 Key,不要把真实 Key 提交到代码仓库: ```bash export ICODEEASY_API_KEY="你的API Key" ``` #### 非流式:严格 JSON(推荐) 非流式 `generateContent` 会在模型完成后一次性返回整个响应,更适合需要完整 JSON、结构校验或写入数据库的任务。 当请求明确配置 JSON MIME 或 Schema 时,本站会在非流式响应交付前检查完整结束状态、业务文本是否为合法 JSON,以及本站支持范围内的 Schema 约束。首次结果不符合契约时,服务端会在可重试条件满足时进行一次有限自动重试;再次失败则返回可重试的服务错误,而不会把格式错误的正文当作成功结果交给业务程序。客户端仍应保留自己的 JSON 和字段校验。 ```bash curl --silent --show-error \ "https://api.icodeeasy.cc/v1beta/models/gemini-3.7-flash:generateContent" \ -H "x-goog-api-key: ${ICODEEASY_API_KEY}" \ -H "Content-Type: application/json" \ --data-binary '{ "systemInstruction": { "parts": [ { "text": "只输出符合 responseJsonSchema 的 JSON,不要输出 Markdown 代码块或额外说明。" } ] }, "contents": [ { "role": "user", "parts": [ { "text": "请评估这句话描述的发布风险:数据库迁移尚未做回滚演练。" } ] } ], "generationConfig": { "temperature": 0.1, "responseMimeType": "application/json", "responseJsonSchema": { "type": "object", "properties": { "riskLevel": { "type": "string", "enum": ["low", "medium", "high"] }, "summary": { "type": "string" }, "reasons": { "type": "array", "items": { "type": "string" } } }, "required": ["riskLevel", "summary", "reasons"], "additionalProperties": false } } }' \ --output gemini-response.json ``` 接口最外层响应本身是 Gemini 协议 JSON;真正的业务 JSON 位于 `candidates[].content.parts[].text` 中。安装了 `jq` 后,可以这样提取并验证: ```bash jq -e '.candidates[0].finishReason == "STOP"' gemini-response.json > /dev/null jq -r '[.candidates[0].content.parts[]? | select(.thought != true) | (.text // "")] | join("")' \ gemini-response.json > result.json jq -e . result.json ``` 如果最后一条命令报解析错误,就不要把结果交给后续业务逻辑;应记录本次响应并按业务容忍度重试。生产代码还应检查 `finishReason`,只有完整结束的响应才进入业务处理。 #### 流式:SSE 严格 JSON 流式接口适合需要尽早展示内容的场景。`curl -N` 会关闭输出缓冲,让 SSE 数据到达后立即写出: SSE 数据一旦发送就无法由服务端撤回,因此不具备非流式接口的“完整响应校验后再交付”能力。严格 JSON 是核心业务契约时,应优先使用上面的非流式示例。 ```bash curl -N --silent --show-error \ "https://api.icodeeasy.cc/v1beta/models/gemini-3.7-flash:streamGenerateContent?alt=sse" \ -H "x-goog-api-key: ${ICODEEASY_API_KEY}" \ -H "Content-Type: application/json" \ -H "Accept: text/event-stream" \ --data-binary '{ "systemInstruction": { "parts": [ { "text": "只输出符合 responseJsonSchema 的 JSON,不要输出 Markdown 代码块或额外说明。" } ] }, "contents": [ { "role": "user", "parts": [ { "text": "请评估这句话描述的发布风险:数据库迁移尚未做回滚演练。" } ] } ], "generationConfig": { "temperature": 0.1, "responseMimeType": "application/json", "responseJsonSchema": { "type": "object", "properties": { "riskLevel": { "type": "string", "enum": ["low", "medium", "high"] }, "summary": { "type": "string" }, "reasons": { "type": "array", "items": { "type": "string" } } }, "required": ["riskLevel", "summary", "reasons"], "additionalProperties": false } } }' \ --output gemini-response.sse ``` SSE 中每一行 `data:` 后面的 Gemini 协议外壳是 JSON,但其中的 `parts[].text` 通常只是业务 JSON 的一个片段。不能逐条对 `text` 执行 `JSON.parse`;必须按顺序拼接所有非思考文本,流结束后再解析一次。 下面命令会忽略非 JSON 的 SSE 结束标记,拼接文本片段并验证最终结果: ```bash sed -n 's/^data: *//p' gemini-response.sse \ | jq -jR ' fromjson? | [.candidates[]?.content.parts[]? | select(.thought != true) | (.text // "")] | join("") ' > result.json jq -e . result.json ``` 正式集成时应使用客户端语言的 SSE 解析库,并同时处理断流、超时、非 `STOP` 结束原因和 JSON 校验失败。若核心目标是稳定取得一份可机器解析的 JSON,优先使用非流式接口。 #### 关键参数说明 | 参数 | 含义 | |---|---| | `:generateContent` | 非流式接口;模型完成后一次性返回,最适合严格 JSON。 | | `:streamGenerateContent?alt=sse` | SSE 流式接口;业务 JSON 可能被拆成多个文本片段。 | | `x-goog-api-key` | 本站 API Key 请求头。 | | `systemInstruction` | 系统级输出要求,用于再次强调“只输出 JSON”;它不能替代 Schema。 | | `contents` | 本次任务的对话内容;`role: user` 表示用户输入。 | | `temperature` | 输出随机性。`0.1` 可降低格式波动,但不能单独保证 JSON 一定合法。 | | `responseMimeType` | 声明期望模型生成 `application/json`,减少普通文本或 Markdown 代码围栏;它不能替代 Schema。 | | `responseJsonSchema` | **建议配置。** 如果想拿到可机器解析的 JSON,这是最重要的约束参数,用于明确字段、类型、枚举、必填项和嵌套结构。 | | `required` | 指定必须出现的字段。 | | `additionalProperties: false` | 禁止 Schema 之外的额外顶层字段。 | | 数组的 `items` | 声明每个数组元素的结构;省略后可能得到结构合法但业务字段缺失的结果。 | | `curl -N` | 关闭 cURL 输出缓冲,用于实时读取 SSE。 | 本站会为部分“明确要求只输出 JSON、但漏传 MIME”的 Gemini 请求提供兼容补充,但不会从普通自然语言提示中猜测任意业务 Schema,也不会覆盖调用方已经设置的 MIME 或 Schema。为了让请求在不同模型版本和服务环境下保持一致,请始终由客户端显式发送完整约束。 即使设置了 MIME 和 Schema,生成式模型仍不能提供数学意义上的 100% 格式保证。推荐的兜底顺序是:完整 `responseJsonSchema` + `application/json` → 低温度 → 非流式完整接收 → JSON/字段校验 → 失败后有限重试。 --- ### 视频分析 Demo Gemini 模型支持视频理解输入:把视频作为 `inlineData`(base64)随请求一起发送,模型看完视频后按你的要求输出分析结果。常用的支持视频的模型:`gemini-3.7-flash`、`gemini-3.6-flash`。 下面是一个完整可运行的 Demo:读取本地 MP4 → 组装请求 → 非流式调用 → 提取并校验 JSON 结果。 ```bash # 0) 如果还没设置,先配置本站 API Key export ICODEEASY_API_KEY="你的API Key" # 1) 本地视频转 base64(macOS 用:base64 -i demo.mp4 | tr -d '\n' > demo.b64) base64 -w0 demo.mp4 > demo.b64 # 2) 用 jq 组装请求,避免手工拼接超长 JSON jq -n --rawfile data demo.b64 '{ contents: [ { role: "user", parts: [ {text: "请观看这段视频,输出内容摘要、分镜描述和关键词,严格按 Schema 返回 JSON。"}, {inlineData: {mimeType: "video/mp4", data: $data}} ] } ], generationConfig: { temperature: 0.1, responseMimeType: "application/json", responseJsonSchema: { type: "object", properties: { summary: {type: "string"}, scenes: {type: "array", items: {type: "string"}}, keywords: {type: "array", items: {type: "string"}} }, required: ["summary", "scenes", "keywords"], additionalProperties: false } } }' > video-request.json # 3) 非流式调用 curl --silent --show-error \ "https://api.icodeeasy.cc/v1beta/models/gemini-3.7-flash:generateContent" \ -H "x-goog-api-key: ${ICODEEASY_API_KEY}" \ -H "Content-Type: application/json" \ --data-binary @video-request.json \ --output video-response.json # 4) 检查结束状态并提取业务 JSON jq -e '.candidates[0].finishReason == "STOP"' video-response.json > /dev/null jq -r '[.candidates[0].content.parts[]? | select(.thought != true) | (.text // "")] | join("")' \ video-response.json > video-result.json jq -e . video-result.json ``` 可以用下面的命令确认视频已被识别(`promptTokensDetails` 中会出现 `VIDEO` 模态的 token 数): ```bash jq '.usageMetadata' video-response.json ``` 注意事项: - 视频按输入 token 计费,与文本同价;`usageMetadata` 里 `VIDEO` 模态的 token 数就是计费依据。 - base64 会比原视频大约 1/3,建议单条视频控制在十几 MB 以内;更长的视频建议切分成多段分别发送。 - 不支持通过 `fileData.fileUri` 传外链:模型服务不会代拉外部 URL。请一律把视频下载到本地,按上面的 Demo 用 `inlineData` 发送。 - 视频请求耗时随片长增加,请把客户端超时适当调大(建议 5 分钟以上);模型高峰期可能偶发 503 / “服务暂时不可用”,间隔几十秒重试即可。 - 本接口用于视频理解/分析,不包含视频生成。 --- ### 常见问题 | 现象 | 原因 | 解决方法 | |---|---|---| | 请求路径出现 `/v1beta/v1beta/models/...` | `GOOGLE_GEMINI_BASE_URL` 多写了 `/v1beta` | 改成 `https://api.icodeeasy.cc` | | `api.icodeeasy.cc` 连接慢 | 当前网络到主接入域名质量不佳 | 改成 `https://jp.icodeeasy.cc` 或 `https://sg.icodeeasy.cc`,不要追加 `/v1beta` | | `model_not_found: gemini-3-flash` | 当前可用的模型 ID 使用 preview 名称 | 使用 `gemini-3-flash-preview`;本站也会自动映射 | | 401 / missing authorization | 没有设置本站 API Key | 设置 `GEMINI_API_KEY="你的API Key"` | | 用 `/v1/responses` 调 Gemini 报错 | Gemini CLI 使用 Gemini 原生 API,不是 OpenAI Responses API | 使用 `/v1beta/models/{model}:generateContent` 或让 Gemini CLI 自动请求 | | 要求返回 JSON,偶尔仍解析失败 | 未配置完整 `responseJsonSchema`、只依赖提示词,或把 SSE 文本片段逐条解析 | 务必显式配置完整 `responseJsonSchema` 和 JSON MIME;优先非流式;SSE 先拼接再校验并有限重试 | ## https://icodeeasy.cc/docs/model-capabilities/ Title: 模型能力目录 Description: 按文本、图片和视频分类查看公开模型的规范化请求 ID、兼容协议、支持客户端、工具调用、输入输出能力与限制,并根据最近核对日期判断信息新鲜度。 Last modified: 2026-09-23 ## 模型能力目录 已核验日期: 2026-08-28. 这是经过审阅的能力快照,不代表实时服务健康状态。 价格会变化,请查看 [/dashboard/pricing/](https://icodeeasy.cc/dashboard/pricing/) 或 [/api/public/model-pricing](https://icodeeasy.cc/api/public/model-pricing). ### 能力状态说明 - `supported`: 支持 - `conditional`: 有条件支持 - `not_supported`: 不支持 - `not_published`: 未公开承诺 ### 文本模型 | 模型 / 请求 ID | 协议 | 客户端 | 能力 / 限制 | | --- | --- | --- | --- | | Claude Opus 5.5 · `claude-opus-5-5` | anthropic_messages, anthropic_count_tokens | claude_code, cursor, cherry_studio, trae | streaming: 支持 · tool_calling: 支持 · image_input: 有条件支持 — 取决于兼容的接入点与请求格式 · video_input: 不支持 · 限制: — | | Claude Opus 5 · `claude-opus-5` | anthropic_messages, anthropic_count_tokens | claude_code, cursor, cherry_studio, trae | streaming: 支持 · tool_calling: 支持 · image_input: 有条件支持 — 取决于兼容的接入点与请求格式 · video_input: 不支持 · 限制: — | | Claude Opus 4.8 · `claude-opus-4-8` | anthropic_messages, anthropic_count_tokens | claude_code, cursor, cherry_studio, trae | streaming: 支持 · tool_calling: 支持 · image_input: 有条件支持 — 取决于兼容的接入点与请求格式 · video_input: 不支持 · 限制: — | | GPT-6 Astra · `gpt-6-astra` | responses, responses_compact, chat_completions | codex, vscode_codex, cursor, cherry_studio, trae | streaming: 支持 · tool_calling: 支持 · image_input: 有条件支持 — 取决于兼容的接入点与请求格式 · video_input: 不支持 · 限制: — | | GPT-6 Sol · `gpt-6-sol` | responses, responses_compact, chat_completions | codex, vscode_codex, cursor, cherry_studio, trae | streaming: 支持 · tool_calling: 支持 · image_input: 有条件支持 — 取决于兼容的接入点与请求格式 · video_input: 不支持 · 限制: — | | GPT-6 Luna · `gpt-6-luna` | responses, responses_compact, chat_completions | codex, vscode_codex, cursor, cherry_studio, trae | streaming: 支持 · tool_calling: 支持 · image_input: 未公开承诺 · video_input: 不支持 · 限制: — | | GPT-5.6 Sol · `gpt-5.6-sol` | responses, responses_compact, chat_completions | codex, vscode_codex, cursor, cherry_studio, trae | streaming: 支持 · tool_calling: 支持 · image_input: 有条件支持 — 取决于兼容的接入点与请求格式 · video_input: 不支持 · 限制: — | | GPT-5.6 Terra · `gpt-5.6-terra` | responses, responses_compact, chat_completions | codex, vscode_codex, cursor, cherry_studio, trae | streaming: 支持 · tool_calling: 支持 · image_input: 有条件支持 — 取决于兼容的接入点与请求格式 · video_input: 不支持 · 限制: — | | GPT-5.6 Luna · `gpt-5.6-luna` | responses, responses_compact, chat_completions | codex, vscode_codex, cursor, cherry_studio, trae | streaming: 支持 · tool_calling: 支持 · image_input: 未公开承诺 · video_input: 不支持 · 限制: — | | GPT-5.5 · `gpt-5.5` | responses, responses_compact, chat_completions | codex, vscode_codex, cursor, cherry_studio, trae | streaming: 支持 · tool_calling: 支持 · image_input: 有条件支持 — 取决于兼容的接入点与请求格式 · video_input: 不支持 · 限制: — | | Grok 4.7 · `grok-4.7` | responses, responses_compact, chat_completions, anthropic_messages | codex, claude_code, vscode_codex, cursor, cherry_studio, trae | streaming: 支持 · tool_calling: 支持 · image_input: 有条件支持 — 取决于兼容的接入点与请求格式 · video_input: 不支持 · 限制: — | | Grok 4.6 · `grok-4.6` | responses, responses_compact, chat_completions | codex, vscode_codex, cursor, cherry_studio, trae | streaming: 支持 · tool_calling: 支持 · image_input: 有条件支持 — 取决于兼容的接入点与请求格式 · video_input: 不支持 · 限制: — | | Gemini 3.6 Flash · `gemini-3.6-flash` | gemini_generate_content, gemini_stream_generate_content | gemini_cli, cherry_studio, trae | streaming: 支持 · tool_calling: 有条件支持 — 取决于兼容的协议与请求格式 · image_input: 有条件支持 — 取决于兼容的接入点与请求格式 · video_input: 有条件支持 — 取决于兼容的接入点与请求格式 · 限制: — | | GLM 5.3 Flash · `glm-5.3-flash` | chat_completions, anthropic_messages, anthropic_count_tokens | claude_code, cursor, cherry_studio, trae, openai_sdk | streaming: 支持 · tool_calling: 支持 · image_input: 支持 · video_input: 未公开承诺 · 限制: — | | GLM 5.3 · `glm-5.3` | chat_completions, anthropic_messages, anthropic_count_tokens, responses, responses_compact | codex, claude_code, cursor, cherry_studio, trae | streaming: 支持 · tool_calling: 有条件支持 — 取决于兼容的协议与请求格式 · image_input: 未公开承诺 · video_input: 不支持 · 限制: — | | MiniMax M3 · `MiniMax-M3` | chat_completions, anthropic_messages, anthropic_count_tokens | claude_code, cursor, cherry_studio, trae | streaming: 支持 · tool_calling: 有条件支持 — 取决于兼容的协议与请求格式 · image_input: 未公开承诺 · video_input: 不支持 · 限制: — | | Doubao Seed 2.1 Turbo · `doubao-seed-2.1-turbo` | chat_completions, anthropic_messages, anthropic_count_tokens, responses | codex, claude_code, cursor, cherry_studio, trae | streaming: 支持 · tool_calling: 有条件支持 — 取决于兼容的协议与请求格式 · image_input: 未公开承诺 · video_input: 不支持 · 限制: — | | Kimi K3 · `kimi-k3` | chat_completions, anthropic_messages, anthropic_count_tokens, responses, responses_compact | codex, claude_code, cursor, cherry_studio, trae | streaming: 支持 · tool_calling: 支持 · image_input: 未公开承诺 · video_input: 未公开承诺 · 限制: — | | DeepSeek V4.1 Flash · `deepseek-flash` | chat_completions, anthropic_messages, anthropic_count_tokens, responses | codex, claude_code, cursor, cherry_studio, trae | streaming: 支持 · tool_calling: 有条件支持 — 取决于兼容的协议与请求格式 · image_input: 支持 · video_input: 不支持 · 限制: — | | DeepSeek V4 Flash · `deepseek-v4-flash` | chat_completions, anthropic_messages, anthropic_count_tokens, responses | codex, claude_code, cursor, cherry_studio, trae | streaming: 支持 · tool_calling: 有条件支持 — 取决于兼容的协议与请求格式 · image_input: 未公开承诺 · video_input: 不支持 · 限制: — | | DeepSeek V4 Flash Vision Exp · `deepseek-v4-flash-vision-exp` | chat_completions | cursor, cherry_studio, trae, openai_sdk | streaming: 支持 · tool_calling: 有条件支持 — 取决于兼容的协议与请求格式 · image_input: 支持 · video_input: 不支持 · 限制: — | ### 图像模型 | 模型 / 请求 ID | 协议 | 客户端 | 能力 / 限制 | | --- | --- | --- | --- | | GPT Image 2 · `gpt-image-2` | images_generations, images_edits | openai_sdk, cherry_studio, trae | text_to_image: 支持 · image_to_image: 支持 · image_editing: 支持 · reference_images: 有条件支持 — 需要以支持的请求格式提供有效参考图 · 限制: 参考图:最多 4 张 | | GPT Image 2.5 Flare · `gpt-image-2.5-flare` | images_generations, images_edits | openai_sdk, cherry_studio, trae | text_to_image: 支持 · image_to_image: 支持 · image_editing: 支持 · reference_images: 有条件支持 — 需要以支持的请求格式提供有效参考图 · 限制: 参考图:最多 4 张 · 分辨率: 1k, 2k, 4k | | GPT Image 2.5 Sunburst · `gpt-image-2.5-sunburst` | images_generations, images_edits | openai_sdk, cherry_studio, trae | text_to_image: 支持 · image_to_image: 支持 · image_editing: 支持 · reference_images: 有条件支持 — 需要以支持的请求格式提供有效参考图 · 限制: 参考图:最多 4 张 · 分辨率: 1k, 2k, 4k | | Gemini 3.1 Flash Image Preview · `gemini-3.1-flash-image-preview` | images_generations, images_edits, gemini_generate_content | gemini_cli, openai_sdk, cherry_studio, trae | text_to_image: 支持 · image_to_image: 支持 · image_editing: 支持 · native_generation: 支持 · reference_images: 有条件支持 — 需要以支持的请求格式提供有效参考图 · 限制: 参考图:最多 4 张 · 分辨率: 1k, 2k, 4k | | Gemini 2.5 Flash Image · `gemini-2.5-flash-image` | images_generations, images_edits, gemini_generate_content | gemini_cli, openai_sdk, cherry_studio, trae | text_to_image: 支持 · image_to_image: 支持 · image_editing: 支持 · native_generation: 支持 · reference_images: 有条件支持 — 需要以支持的请求格式提供有效参考图 · 限制: 参考图:最多 4 张 · 分辨率: 1k | | Gemini 3 Pro Image Preview · `gemini-3-pro-image-preview` | images_generations, images_edits, gemini_generate_content | gemini_cli, openai_sdk, cherry_studio, trae | text_to_image: 支持 · image_to_image: 支持 · image_editing: 支持 · native_generation: 支持 · reference_images: 有条件支持 — 需要以支持的请求格式提供有效参考图 · 限制: 参考图:最多 4 张 · 分辨率: 1k, 2k, 4k | | Grok Imagine 1.0 · `grok-imagine-1.0` | images_generations | openai_sdk, cherry_studio, trae | text_to_image: 支持 · image_to_image: 未公开承诺 · image_editing: 不支持 · reference_images: 未公开承诺 · 限制: — | | Doubao Seedream 5.0 Lite · `doubao-seedream-5-0-lite` | images_generations | openai_sdk, cherry_studio, trae | text_to_image: 支持 · image_to_image: 有条件支持 — 需要以支持的请求格式提供有效参考图 · image_editing: 未公开承诺 · reference_images: 有条件支持 — 需要以支持的请求格式提供有效参考图 · 限制: — | | FLUX 2 Pro · `flux-2-pro` | images_generations | openai_sdk, cherry_studio, trae | text_to_image: 支持 · image_to_image: 有条件支持 — 需要以支持的请求格式提供有效参考图 · image_editing: 未公开承诺 · reference_images: 有条件支持 — 需要以支持的请求格式提供有效参考图 · 限制: — | | Midjourney · `midjourney` | images_generations | openai_sdk, cherry_studio, trae | text_to_image: 支持 · image_to_image: 不支持 · image_editing: 不支持 · reference_images: 不支持 · 限制: 输入:仅提示词 | ### 视频模型 | 模型 / 请求 ID | 协议 | 客户端 | 能力 / 限制 | | --- | --- | --- | --- | | Doubao Seedance 2.5 · `doubao-seedance-2.5` | videos_generations_async, video_task_read, video_task_content, video_task_delete | video_api | text_to_video: 支持 · image_to_video: 支持 · first_frame: 支持 · last_frame: 支持 · reference_images: 支持 · audio: 支持 · 限制: 分辨率: 480p, 720p · 画面比例: 16:9, 4:3, 1:1, 3:4, 9:16, 21:9, adaptive · 时长: 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30 · 参考图:最多 2 张 · 帧比例:自适应 | | MiniMax H3 · `MiniMax-H3` | videos_generations_async, video_task_read, video_task_content, video_task_delete | video_api | text_to_video: 支持 · image_to_video: 支持 · first_frame: 支持 · last_frame: 支持 · reference_images: 支持 · audio: 不支持 · 限制: 分辨率: 768P, 2K · 画面比例: 21:9, 16:9, 4:3, 1:1, 3:4, 9:16 · 时长: 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 · 参考图:最多 2 张 | | Kling V3 · `kling-v3` | videos_generations_async, video_task_read, video_task_content, video_task_delete | video_api | text_to_video: 支持 · image_to_video: 支持 · first_frame: 支持 · last_frame: 支持 · reference_images: 支持 · audio: 支持 · 限制: 分辨率: 720p, 1080p, 4K · 画面比例: 16:9, 9:16, 1:1 · 时长: 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 · 参考图:最多 2 张 | | Grok Imagine 1.5 Video · `grok-imagine-1.5-video` | videos_generations_async, video_task_read, video_task_content, video_task_delete | video_api | text_to_video: 支持 · image_to_video: 支持 · first_frame: 不支持 · last_frame: 不支持 · reference_images: 支持 · audio: 不支持 · 限制: 分辨率: 480p, 720p · 画面比例: 16:9, 9:16, 1:1, 3:2, 2:3 · 时长: 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30 · 参考图:最多 7 张 | ### 兼容别名与退役重定向 - `opus5` → `claude-opus-5` (别名) - `opus4.8` → `claude-opus-4-8` (别名) - `gpt-5.6` → `gpt-5.6-terra` (别名) - `GPT-5.6 Terra` → `gpt-5.6-terra` (别名) - `grok-4.5` → `grok-4.6` (别名) - `glm-5.1` → `glm-5.3` (别名) - `glm-5.2` → `glm-5.3` (别名) - `doubao-seed-2.0-pro` → `doubao-seed-2.1-turbo` (别名) - `k3` → `kimi-k3` (别名) - `gemini-3.1-flash-image` → `gemini-3.1-flash-image-preview` (别名) - `gemini-2.5-flash-image-preview` → `gemini-2.5-flash-image` (别名) - `gemini-3-pro-image` → `gemini-3-pro-image-preview` (别名) - `doubao-seedream-5.0-lite` → `doubao-seedream-5-0-lite` (别名) - `flux.2-pro` → `flux-2-pro` (别名) - `mj` → `midjourney` (别名) - `grok-imagine-1.5-video-ext` → `grok-imagine-1.5-video` (别名) ### 详细指南: - [image-generation](https://icodeeasy.cc/docs/image-generation/) — 图片生成 - [video-generation](https://icodeeasy.cc/docs/video-generation/) — 视频生成 ## https://icodeeasy.cc/docs/faq/ Title: 常见问题 Description: 排查 API Key、401、429、Windows 环境变量、客户端连接与问题反馈等常见情况,快速定位配置或额度异常。 Last modified: 2026-08-17 ## 常见问题 ### Q: 一把 API Key 可以配置多个客户端吗? 同一把 I Code Easy API Key 可以用于 Claude Code、Codex 和 Gemini CLI,但每个客户端仍需使用各自协议对应的配置。请按[多客户端配置指南](https://icodeeasy.cc/docs/one-key-multiple-clients/)分别设置。 ### Q: 在哪里查看当前价格、余额和用量? 人民币价格和汇率可能变化,可在公开价格页、控制台价格页或公开价格 API 查看;控制台也会在可用时显示余额、请求日志、Token 用量和账单明细。请看[价格、余额与用量指南](https://icodeeasy.cc/docs/pricing-balance-and-usage/)。 ### Q: API 请求内容和隐私如何处理? 请求内容和元数据用于路由、用量计算、安全维护和支持服务;请求或响应正文通常不会被持久保存,但隐私政策列明的运营、安全及其他必要情形除外。请阅读[请求数据与隐私指南](https://icodeeasy.cc/docs/api-data-and-privacy/)和完整的[隐私政策](https://icodeeasy.cc/privacy/)。 ### Q: 模型支持是否等于所有客户端协议都支持? 不等于。模型、客户端和请求协议的组合可能有不同能力或限制,应先确认具体组合。请查看[模型能力目录](https://icodeeasy.cc/docs/model-capabilities/)。 ### Q: API Key 泄露了怎么办? 请立即在 **API Keys** 页面点击"轮换 Key"生成新的密钥,旧 Key 将立即失效。 ### Q: 请求返回 401 错误? 请检查: 1. API Key 是否正确 2. API Key 是否已过期或被禁用 3. 环境变量或配置文件是否正确设置 4. 是否重新打开了终端使配置生效 ### Q: 请求返回 429 错误? 这表示请求频率过高,请稍后重试。建议在代码中添加重试逻辑。 ### Q: Windows 环境变量设置后不生效? 设置环境变量后需要**重新打开 PowerShell** 才能生效。 ### Q: api.icodeeasy.cc 连接慢怎么办? 可以把 Base URL 换成 I Code Easy 备用接入域名 `https://jp.icodeeasy.cc` 或 `https://sg.icodeeasy.cc`。 - Claude Code(包括通过 Claude Code 使用 Kimi)/ GLM / MiniMax:修改 `ANTHROPIC_BASE_URL` - Kimi Code CLI:修改 `~/.kimi-code/config.toml` 中对应 Provider 的 `base_url`,并保留 `/v1` - Codex:修改 `base_url` 或 `OPENAI_BASE_URL` - Gemini CLI:修改 `GOOGLE_GEMINI_BASE_URL`,不要追加 `/v1beta` ### Q: 遇到问题如何反馈? 可以在 **工单** 页面提交工单,我们会尽快处理。 ## https://icodeeasy.cc/en/docs/one-key-multiple-clients/ Title: How can one API key configure Claude Code, Codex, and Gemini CLI? Description: Use one I Code Easy API key in the documented Claude Code, Codex, and Gemini CLI setups while keeping each client's protocol-specific configuration. Last modified: 2026-08-17 ## How can one API key configure Claude Code, Codex, and Gemini CLI? Create an I Code Easy API key in the dashboard, then enter that same key in the documented Claude Code, Codex, and Gemini CLI setups. Each client still needs its own protocol-specific configuration. ### Configure each client Follow [Claude Code](https://icodeeasy.cc/en/docs/claude-code/), [Codex](https://icodeeasy.cc/en/docs/codex/), and [Gemini CLI](https://icodeeasy.cc/en/docs/gemini-cli/) one at a time; do not copy one client configuration into another. ### Check compatibility first Use the [model capabilities](https://icodeeasy.cc/en/docs/model-capabilities/) guide to confirm that your selected client and model work together. ### Continue setup Start with [environment setup](https://icodeeasy.cc/en/docs/env-setup/) if your terminal or credentials are not ready. ## https://icodeeasy.cc/en/docs/connection-and-recovery/ Title: How do I troubleshoot slow connections or failed requests? Description: Troubleshoot credentials, model support, limits, client configuration, and network reachability, then use the documented backup access domains when needed. Last modified: 2026-08-17 ## How do I troubleshoot slow connections or failed requests? Use `https://api.icodeeasy.cc` as the primary API domain. `https://jp.icodeeasy.cc` and `https://sg.icodeeasy.cc` are documented backup access domains when you need to retry your client configuration. ### Check the likely cause Verify the API key, selected model, rate-limit response, client-specific Base URL, and network reachability. Gemini CLI uses a domain and must not append `/v1beta`. ### Recover safely The product provides routing and failure-recovery behavior, but client setup still matters. Recheck [Claude Code](https://icodeeasy.cc/en/docs/claude-code/), [Codex](https://icodeeasy.cc/en/docs/codex/), [Gemini CLI](https://icodeeasy.cc/en/docs/gemini-cli/), or the [FAQ](https://icodeeasy.cc/en/docs/faq/). ### Next guide Review [model capabilities](https://icodeeasy.cc/en/docs/model-capabilities/) before changing models. ## https://icodeeasy.cc/en/docs/pricing-balance-and-usage/ Title: Where can I check RMB prices, balance, and usage details? Description: Check live RMB prices, account balance, request logs, token usage, billing details, and payment availability through the public and dashboard surfaces. Last modified: 2026-08-17 ## Where can I check RMB prices, balance, and usage details? Check live RMB prices on the public pricing surface or `/api/public/model-pricing`; prices and rate information can change. The dashboard shows balance, request logs, token usage, and billing breakdowns where available. ### Check live values Open [pricing](https://icodeeasy.cc/#pricing), [dashboard pricing](https://icodeeasy.cc/dashboard/pricing/), [request logs](https://icodeeasy.cc/dashboard/logs/), or [the public pricing API](https://icodeeasy.cc/api/public/model-pricing). ### Recharge boundary Alipay is available for recharge. Card availability and the quoted charge depend on the payment configuration returned by the server. ### Next guide See the [balance query API](https://icodeeasy.cc/en/docs/balance-query/) for programmatic balance checks. ## https://icodeeasy.cc/en/docs/api-data-and-privacy/ Title: How are API request content and metadata handled? Description: Understand how API request content and metadata support routing, usage, security, and support, then review the complete privacy policy and terms. Last modified: 2026-08-17 ## How are API request content and metadata handled? I Code Easy processes request content and metadata to route requests, calculate usage, maintain security, and provide support. This is a plain-language guide; read the [privacy policy](https://icodeeasy.cc/privacy/) for the full policy. ### What may be retained Request and response bodies are generally not persistently stored except for necessary operational, billing, security, anti-abuse, troubleshooting, dispute, legal, backup, or user-enabled feature cases. Metadata, usage, errors, latency, security logs, and risk signals may be retained. ### Important boundary Model providers process requests under their own terms, privacy policies, and data-handling rules. I Code Easy states that it does not sell API request content or personal information; see [terms](https://icodeeasy.cc/terms/) and [acceptable use](https://icodeeasy.cc/acceptable-use/). ### Next guide Review [pricing and usage](https://icodeeasy.cc/en/docs/pricing-balance-and-usage/) for account records. ## https://icodeeasy.cc/en/docs/claude-code/ Title: Claude Code / Desktop Setup Description: Install Claude Code or Claude Desktop, store credentials safely, configure the I Code Easy API address, and verify a first session. Last modified: 2026-08-14 ## Claude Code / Claude Desktop Setup Anthropic's official CLI tool and desktop client can both connect through the I Code Easy API gateway. **MacOS users are encouraged to use iTerm2 for a better terminal experience.** ### Step 1: Install Claude Code **MacOS / Linux / WSL** ```bash curl -fsSL https://claude.ai/install.sh | bash ``` **Windows PowerShell** ```powershell irm https://claude.ai/install.ps1 | iex ``` **Windows CMD** ```cmd curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd ``` The native installer updates Claude Code automatically in the background. **npm installation (after completing Environment Setup)** ```bash npm i -g @anthropic-ai/claude-code ``` --- ### Step 2: Configure API #### Linux / MacOS Add the following to `~/.bashrc` or `~/.zshrc` (default model recommendation: `kimi-k2.7`): ```bash export ANTHROPIC_AUTH_TOKEN="your API Key" export ANTHROPIC_BASE_URL="https://api.icodeeasy.cc" export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC="1" ``` Do not set `CLAUDE_CODE_ATTRIBUTION_HEADER=0`; some Claude Code-only channels validate the native client attribution metadata. If `api.icodeeasy.cc` is slow from your network, change `ANTHROPIC_BASE_URL` to `https://jp.icodeeasy.cc` or `https://sg.icodeeasy.cc`. Save the file and run `source ~/.bashrc` or `source ~/.zshrc`. #### Windows Run in PowerShell: ```powershell # Set API key [Environment]::SetEnvironmentVariable("ANTHROPIC_AUTH_TOKEN", "your API Key", "User") # Set API base URL [Environment]::SetEnvironmentVariable("ANTHROPIC_BASE_URL", "https://api.icodeeasy.cc", "User") # Disable non-essential traffic [Environment]::SetEnvironmentVariable("CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC", "1", "User") ``` If `api.icodeeasy.cc` is slow from your network, change `ANTHROPIC_BASE_URL` to `https://jp.icodeeasy.cc` or `https://sg.icodeeasy.cc`. Open a new PowerShell window after setting environment variables. Verify user-level environment variables in the new window: ```powershell [Environment]::GetEnvironmentVariable("ANTHROPIC_AUTH_TOKEN", "User") [Environment]::GetEnvironmentVariable("ANTHROPIC_BASE_URL", "User") [Environment]::GetEnvironmentVariable("CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC", "User") ``` `SetEnvironmentVariable` writes persistent user-level variables. It does not update the current PowerShell session. Open a new PowerShell window before starting `claude`. --- ### Step 3: Start Claude Code ```bash cd your-project-folder claude ``` --- ### Claude Desktop Configuration Claude Desktop can connect to a third-party gateway through Developer Mode. #### Enable Developer Mode In the menu bar, click `Help` -> `Troubleshooting` -> `Enable Developer mode`, then restart Claude Desktop. #### Configure Gateway After restart, click `Developer` -> `Configure third-party inference` in the menu bar and fill in: | Field | Value | | --- | --- | | Connection | `Gateway` | | Base URL | `https://api.icodeeasy.cc` | | API key | your API Key | If `api.icodeeasy.cc` is slow from your network, change Base URL to `https://jp.icodeeasy.cc` or `https://sg.icodeeasy.cc`. #### Set Model Enter the model name you want to use, such as `claude-opus-5`, `claude-sonnet-4-6`, `kimi-k2.7`, or `glm-5.3`, save, and restart Claude Desktop. Claude models can use the Claude endpoints. To pin Claude Fable 5, see the [Claude Fable 5 Guide](https://icodeeasy.cc/en/docs/claude-fable-5/). ## https://icodeeasy.cc/en/docs/codex/ Title: Codex Setup Description: Install Codex CLI, store the API key in auth.json, configure the I Code Easy provider and Base URL, and start a first Codex session. Last modified: 2026-09-09 ## Codex Setup Codex is OpenAI's coding assistant. Complete the Environment Setup chapter first and make sure Node.js and npm are installed. After basic setup, use the [Codex config.toml guide](https://icodeeasy.cc/en/docs/codex-config/) to choose reasoning effort, credential storage, Provider Base URLs, and profiles safely. --- ### Linux / MacOS #### Step 1: Install Codex ```bash npm install -g @openai/codex@latest ``` #### Step 2: Create Config Folder Create a `.codex` folder under your home directory. ```bash mkdir -p ~/.codex ``` #### Step 3: Create config.toml Create `config.toml` inside `.codex` and paste: ```toml model_provider = "icodeeasy" model = "gpt-5.6-sol" cli_auth_credentials_store = "file" suppress_unstable_features_warning = true personality = "pragmatic" [model_providers.icodeeasy] name = "icodeeasy" base_url = "https://api.icodeeasy.cc" wire_api = "responses" requires_openai_auth = true ``` If `api.icodeeasy.cc` is slow from your network, change `base_url` to `https://jp.icodeeasy.cc` or `https://sg.icodeeasy.cc`. #### Step 4: Sign in and create auth.json Copy the API key from [API Keys](https://icodeeasy.cc/dashboard/keys), then run the commands below. Paste the key and press Enter. The input is hidden and the key is not persisted in your shell startup files: ```bash read -s OPENAI_API_KEY printf '\n' printf '%s' "$OPENAI_API_KEY" | codex login --with-api-key unset OPENAI_API_KEY codex login status ``` Codex writes the credential to `~/.codex/auth.json`. Do not create or edit that file manually: `config.toml` controls the model and Provider, while `auth.json` stores only login credentials. Restrict both files to your user: ```bash chmod 600 ~/.codex/config.toml ~/.codex/auth.json ``` #### Step 5: Start Codex ```bash cd your-project-folder codex ``` --- ### Windows #### Step 1: Install Codex ```powershell npm install -g @openai/codex@latest ``` #### Step 2: Create Config Folder View your user directory: ```powershell echo $env:USERPROFILE ``` Create the `.codex` folder: ```powershell New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.codex" ``` #### Step 3: Create config.toml Create `config.toml` inside `.codex` and paste: ```toml model_provider = "icodeeasy" model = "gpt-5.6-sol" cli_auth_credentials_store = "file" suppress_unstable_features_warning = true personality = "pragmatic" [model_providers.icodeeasy] name = "icodeeasy" base_url = "https://api.icodeeasy.cc" wire_api = "responses" requires_openai_auth = true [features] elevated_windows_sandbox = true ``` If `api.icodeeasy.cc` is slow from your network, change `base_url` to `https://jp.icodeeasy.cc` or `https://sg.icodeeasy.cc`. #### Step 4: Sign in and create auth.json Copy the API key from [API Keys](https://icodeeasy.cc/dashboard/keys), then run: ```powershell $secureKey = Read-Host "API Key" -AsSecureString $plainKey = [System.Net.NetworkCredential]::new("", $secureKey).Password $plainKey | codex login --with-api-key $plainKey = $null codex login status ``` Codex writes the credential to `$env:USERPROFILE\.codex\auth.json`. Do not create or edit the file manually, and do not set a permanent user-level `OPENAI_API_KEY` variable. #### Step 5: Start Codex Open a new PowerShell window, enter your project directory, and start: ```powershell cd your-project-folder codex ``` --- ### VSCode **Complete the Codex CLI setup first and confirm `codex login status` succeeds. The VSCode extension reuses the same `config.toml` and Codex login cache.** #### Step 1: Install Codex Extension Search for and install `Codex` in the VSCode extension marketplace. #### Step 2: Open Config File The Codex VSCode extension reuses `.codex/config.toml` under your user directory. Create the `.codex` folder and `config.toml` by following the Linux / MacOS or Windows steps above. #### Step 3: Configure API Key You normally do not need to enter the key again. If the extension still asks you to sign in, run `codex login status` in VSCode's integrated terminal and then run `Developer: Reload Window`. ## https://icodeeasy.cc/en/docs/gemini-cli/ Title: Gemini CLI Setup Description: Install Gemini CLI, configure authentication and the custom service domain, then use strict non-streaming JSON, SSE responses, and the video analysis demo correctly. Last modified: 2026-09-03 ## Gemini CLI Setup Gemini CLI is Google's AI coding assistant and is useful for large-context code tasks. Complete the Environment Setup chapter first and make sure Node.js and npm are installed. --- ### Linux / macOS #### Step 1: Install Gemini CLI ```bash npm i -g @google/gemini-cli ``` #### Step 2: Configure Environment Variables Add to `~/.bashrc` or `~/.zshrc`: ```bash # API base URL: domain only, do not append /v1beta export GOOGLE_GEMINI_BASE_URL="https://api.icodeeasy.cc" # Use your I Code Easy API Key export GEMINI_API_KEY="your API Key" # Recommended fast model. You can also use stronger models such as gemini-3.1-pro-preview export GEMINI_MODEL="gemini-3.7-flash" # Explicitly use Gemini API v1beta export GOOGLE_GENAI_API_VERSION="v1beta" ``` Save the file and run `source ~/.bashrc` or `source ~/.zshrc`. > Note: Do not set `GOOGLE_GEMINI_BASE_URL` to `https://api.icodeeasy.cc/v1beta`, or Gemini CLI will build paths like `/v1beta/v1beta/models/...`. > If `api.icodeeasy.cc` is slow from your network, change `GOOGLE_GEMINI_BASE_URL` to `https://jp.icodeeasy.cc` or `https://sg.icodeeasy.cc`, still without `/v1beta`. #### Step 3: Start Gemini ```bash cd your-project-folder gemini ``` --- ### Windows #### Step 1: Install Gemini CLI ```powershell npm i -g @google/gemini-cli ``` #### Step 2: Configure Environment Variables in PowerShell ```powershell # API base URL: domain only, do not append /v1beta [Environment]::SetEnvironmentVariable("GOOGLE_GEMINI_BASE_URL", "https://api.icodeeasy.cc", "User") # Use your I Code Easy API Key [Environment]::SetEnvironmentVariable("GEMINI_API_KEY", "your API Key", "User") # Recommended fast model. You can also use stronger models such as gemini-3.1-pro-preview [Environment]::SetEnvironmentVariable("GEMINI_MODEL", "gemini-3.7-flash", "User") # Explicitly use Gemini API v1beta [Environment]::SetEnvironmentVariable("GOOGLE_GENAI_API_VERSION", "v1beta", "User") ``` Open a new PowerShell window after setting environment variables. If `api.icodeeasy.cc` is slow from your network, change `GOOGLE_GEMINI_BASE_URL` to `https://jp.icodeeasy.cc` or `https://sg.icodeeasy.cc`, still without `/v1beta`. #### Step 3: Start Gemini Open a new PowerShell window, enter your project directory, and start: ```powershell cd your-project-folder gemini ``` --- ### Model Selection Common models: | Use Case | Model | |---|---| | New fast model | `gemini-3.8-flash` | | Previous-generation fast model | `gemini-3.7-flash` | | Fast model | `gemini-3.6-flash` | | Fast response | `gemini-3-flash-preview` | | Budget-friendly fast | `gemini-2.5-flash` | | Stronger reasoning | `gemini-3.1-pro-preview` | | Stable 2.5 Pro | `gemini-2.5-pro` | Gemini CLI's built-in `flash` option may resolve to the older `gemini-3-flash-preview`. If a client or plugin sends `gemini-3-flash`, this service maps it to `gemini-3-flash-preview` automatically. The text model `gemini-2.5-flash` is also available: as of 2026-08-03 it is served under its own name (no longer transparently upgraded to `gemini-3.6-flash`) and billed at the 2.5 Flash price. --- ### Raw API Test Example To test the native Gemini API directly without the CLI: ```bash curl "https://api.icodeeasy.cc/v1beta/models/gemini-3.7-flash:streamGenerateContent?alt=sse" \ -H "x-goog-api-key: your API Key" \ -H "Content-Type: application/json" \ -d '{ "contents": [ { "role": "user", "parts": [{"text": "Hello, briefly introduce yourself"}] } ] }' ``` Non-streaming endpoint path: ```text /v1beta/models/{model}:generateContent ``` Streaming endpoint path: ```text /v1beta/models/{model}:streamGenerateContent?alt=sse ``` --- ### Video Analysis Demo Gemini models support video understanding: send the video as `inlineData` (base64) together with the request, and the model watches it and returns an analysis in the format you ask for. Common video-capable models: `gemini-3.7-flash`, `gemini-3.6-flash`. The following demo is complete and runnable: read a local MP4 → build the request → call the non-streaming endpoint → extract and validate the JSON result. ```bash # 0) Set your I Code Easy API Key first export ICODEEASY_API_KEY="your API Key" # 1) base64-encode the local video (macOS: base64 -i demo.mp4 | tr -d '\n' > demo.b64) base64 -w0 demo.mp4 > demo.b64 # 2) Build the request with jq to avoid hand-writing a huge JSON body jq -n --rawfile data demo.b64 '{ contents: [ { role: "user", parts: [ {text: "Watch this video and return a summary, per-scene descriptions, and keywords as JSON that strictly follows the schema."}, {inlineData: {mimeType: "video/mp4", data: $data}} ] } ], generationConfig: { temperature: 0.1, responseMimeType: "application/json", responseJsonSchema: { type: "object", properties: { summary: {type: "string"}, scenes: {type: "array", items: {type: "string"}}, keywords: {type: "array", items: {type: "string"}} }, required: ["summary", "scenes", "keywords"], additionalProperties: false } } }' > video-request.json # 3) Non-streaming call curl --silent --show-error \ "https://api.icodeeasy.cc/v1beta/models/gemini-3.7-flash:generateContent" \ -H "x-goog-api-key: ${ICODEEASY_API_KEY}" \ -H "Content-Type: application/json" \ --data-binary @video-request.json \ --output video-response.json # 4) Check the finish state and extract the business JSON jq -e '.candidates[0].finishReason == "STOP"' video-response.json > /dev/null jq -r '[.candidates[0].content.parts[]? | select(.thought != true) | (.text // "")] | join("")' \ video-response.json > video-result.json jq -e . video-result.json ``` You can confirm the video was recognized (`promptTokensDetails` shows a `VIDEO` modality token count): ```bash jq '.usageMetadata' video-response.json ``` Notes: - Video is billed as input tokens at the same rate as text; the `VIDEO` modality token count in `usageMetadata` is the billing basis. - base64 is about 1/3 larger than the original file; keep each clip to about 10–15 MB and split longer videos into segments. - Passing an external URL via `fileData.fileUri` is not supported: the model service does not fetch external links. Always download the video locally and send it as `inlineData` as shown in the demo above. - Latency grows with clip length, so raise the client timeout (5 minutes or more recommended). Occasional 503 / "service temporarily unavailable" responses can happen at peak times; retry after a few tens of seconds. - This endpoint is for video understanding/analysis; video generation is not included. --- ### FAQ | Symptom | Cause | Fix | |---|---|---| | Request path contains `/v1beta/v1beta/models/...` | `GOOGLE_GEMINI_BASE_URL` includes `/v1beta` | Use `https://api.icodeeasy.cc` | | `api.icodeeasy.cc` is slow | Current network path to the primary domain is poor | Use `https://jp.icodeeasy.cc` or `https://sg.icodeeasy.cc`, without `/v1beta` | | `model_not_found: gemini-3-flash` | The available model ID uses the preview name | Use `gemini-3-flash-preview`; this service also maps it automatically | | 401 / missing authorization | I Code Easy API Key is not set | Set `GEMINI_API_KEY="your API Key"` | | Gemini fails through `/v1/responses` | Gemini CLI uses Gemini native API, not OpenAI Responses API | Use `/v1beta/models/{model}:generateContent` or let Gemini CLI send requests automatically | ## https://icodeeasy.cc/en/docs/model-capabilities/ Title: Model Capability Catalog Description: Compare public text, image, and video models by normalized request ID, compatible protocols, supported clients, tool use, media capabilities, limits, and review date. Last modified: 2026-09-23 ## Model Capability Catalog Verified on: 2026-08-28. This is a reviewed capability snapshot, not real-time service health. Prices change; see [/dashboard/pricing/](https://icodeeasy.cc/dashboard/pricing/) or [/api/public/model-pricing](https://icodeeasy.cc/api/public/model-pricing). ### Capability legend - `supported`: Supported - `conditional`: Conditional - `not_supported`: Not supported - `not_published`: Not published ### Text | Model / Request ID | Protocols | Clients | Capabilities / Limits | | --- | --- | --- | --- | | Claude Opus 5.5 · `claude-opus-5-5` | anthropic_messages, anthropic_count_tokens | claude_code, cursor, cherry_studio, trae | streaming: Supported · tool_calling: Supported · image_input: Conditional — Depends on the compatible endpoint and request format · video_input: Not supported · Limits: — | | Claude Opus 5 · `claude-opus-5` | anthropic_messages, anthropic_count_tokens | claude_code, cursor, cherry_studio, trae | streaming: Supported · tool_calling: Supported · image_input: Conditional — Depends on the compatible endpoint and request format · video_input: Not supported · Limits: — | | Claude Opus 4.8 · `claude-opus-4-8` | anthropic_messages, anthropic_count_tokens | claude_code, cursor, cherry_studio, trae | streaming: Supported · tool_calling: Supported · image_input: Conditional — Depends on the compatible endpoint and request format · video_input: Not supported · Limits: — | | GPT-6 Astra · `gpt-6-astra` | responses, responses_compact, chat_completions | codex, vscode_codex, cursor, cherry_studio, trae | streaming: Supported · tool_calling: Supported · image_input: Conditional — Depends on the compatible endpoint and request format · video_input: Not supported · Limits: — | | GPT-6 Sol · `gpt-6-sol` | responses, responses_compact, chat_completions | codex, vscode_codex, cursor, cherry_studio, trae | streaming: Supported · tool_calling: Supported · image_input: Conditional — Depends on the compatible endpoint and request format · video_input: Not supported · Limits: — | | GPT-6 Luna · `gpt-6-luna` | responses, responses_compact, chat_completions | codex, vscode_codex, cursor, cherry_studio, trae | streaming: Supported · tool_calling: Supported · image_input: Not published · video_input: Not supported · Limits: — | | GPT-5.6 Sol · `gpt-5.6-sol` | responses, responses_compact, chat_completions | codex, vscode_codex, cursor, cherry_studio, trae | streaming: Supported · tool_calling: Supported · image_input: Conditional — Depends on the compatible endpoint and request format · video_input: Not supported · Limits: — | | GPT-5.6 Terra · `gpt-5.6-terra` | responses, responses_compact, chat_completions | codex, vscode_codex, cursor, cherry_studio, trae | streaming: Supported · tool_calling: Supported · image_input: Conditional — Depends on the compatible endpoint and request format · video_input: Not supported · Limits: — | | GPT-5.6 Luna · `gpt-5.6-luna` | responses, responses_compact, chat_completions | codex, vscode_codex, cursor, cherry_studio, trae | streaming: Supported · tool_calling: Supported · image_input: Not published · video_input: Not supported · Limits: — | | GPT-5.5 · `gpt-5.5` | responses, responses_compact, chat_completions | codex, vscode_codex, cursor, cherry_studio, trae | streaming: Supported · tool_calling: Supported · image_input: Conditional — Depends on the compatible endpoint and request format · video_input: Not supported · Limits: — | | Grok 4.7 · `grok-4.7` | responses, responses_compact, chat_completions, anthropic_messages | codex, claude_code, vscode_codex, cursor, cherry_studio, trae | streaming: Supported · tool_calling: Supported · image_input: Conditional — Depends on the compatible endpoint and request format · video_input: Not supported · Limits: — | | Grok 4.6 · `grok-4.6` | responses, responses_compact, chat_completions | codex, vscode_codex, cursor, cherry_studio, trae | streaming: Supported · tool_calling: Supported · image_input: Conditional — Depends on the compatible endpoint and request format · video_input: Not supported · Limits: — | | Gemini 3.6 Flash · `gemini-3.6-flash` | gemini_generate_content, gemini_stream_generate_content | gemini_cli, cherry_studio, trae | streaming: Supported · tool_calling: Conditional — Depends on the compatible protocol and request format · image_input: Conditional — Depends on the compatible endpoint and request format · video_input: Conditional — Depends on the compatible endpoint and request format · Limits: — | | GLM 5.3 Flash · `glm-5.3-flash` | chat_completions, anthropic_messages, anthropic_count_tokens | claude_code, cursor, cherry_studio, trae, openai_sdk | streaming: Supported · tool_calling: Supported · image_input: Supported · video_input: Not published · Limits: — | | GLM 5.3 · `glm-5.3` | chat_completions, anthropic_messages, anthropic_count_tokens, responses, responses_compact | codex, claude_code, cursor, cherry_studio, trae | streaming: Supported · tool_calling: Conditional — Depends on the compatible protocol and request format · image_input: Not published · video_input: Not supported · Limits: — | | MiniMax M3 · `MiniMax-M3` | chat_completions, anthropic_messages, anthropic_count_tokens | claude_code, cursor, cherry_studio, trae | streaming: Supported · tool_calling: Conditional — Depends on the compatible protocol and request format · image_input: Not published · video_input: Not supported · Limits: — | | Doubao Seed 2.1 Turbo · `doubao-seed-2.1-turbo` | chat_completions, anthropic_messages, anthropic_count_tokens, responses | codex, claude_code, cursor, cherry_studio, trae | streaming: Supported · tool_calling: Conditional — Depends on the compatible protocol and request format · image_input: Not published · video_input: Not supported · Limits: — | | Kimi K3 · `kimi-k3` | chat_completions, anthropic_messages, anthropic_count_tokens, responses, responses_compact | codex, claude_code, cursor, cherry_studio, trae | streaming: Supported · tool_calling: Supported · image_input: Not published · video_input: Not published · Limits: — | | DeepSeek V4.1 Flash · `deepseek-flash` | chat_completions, anthropic_messages, anthropic_count_tokens, responses | codex, claude_code, cursor, cherry_studio, trae | streaming: Supported · tool_calling: Conditional — Depends on the compatible protocol and request format · image_input: Supported · video_input: Not supported · Limits: — | | DeepSeek V4 Flash · `deepseek-v4-flash` | chat_completions, anthropic_messages, anthropic_count_tokens, responses | codex, claude_code, cursor, cherry_studio, trae | streaming: Supported · tool_calling: Conditional — Depends on the compatible protocol and request format · image_input: Not published · video_input: Not supported · Limits: — | | DeepSeek V4 Flash Vision Exp · `deepseek-v4-flash-vision-exp` | chat_completions | cursor, cherry_studio, trae, openai_sdk | streaming: Supported · tool_calling: Conditional — Depends on the compatible protocol and request format · image_input: Supported · video_input: Not supported · Limits: — | ### Image | Model / Request ID | Protocols | Clients | Capabilities / Limits | | --- | --- | --- | --- | | GPT Image 2 · `gpt-image-2` | images_generations, images_edits | openai_sdk, cherry_studio, trae | text_to_image: Supported · image_to_image: Supported · image_editing: Supported · reference_images: Conditional — Requires valid reference images in a supported request format · Limits: Reference images: up to 4 | | GPT Image 2.5 Flare · `gpt-image-2.5-flare` | images_generations, images_edits | openai_sdk, cherry_studio, trae | text_to_image: Supported · image_to_image: Supported · image_editing: Supported · reference_images: Conditional — Requires valid reference images in a supported request format · Limits: Reference images: up to 4 · Resolutions: 1k, 2k, 4k | | GPT Image 2.5 Sunburst · `gpt-image-2.5-sunburst` | images_generations, images_edits | openai_sdk, cherry_studio, trae | text_to_image: Supported · image_to_image: Supported · image_editing: Supported · reference_images: Conditional — Requires valid reference images in a supported request format · Limits: Reference images: up to 4 · Resolutions: 1k, 2k, 4k | | Gemini 3.1 Flash Image Preview · `gemini-3.1-flash-image-preview` | images_generations, images_edits, gemini_generate_content | gemini_cli, openai_sdk, cherry_studio, trae | text_to_image: Supported · image_to_image: Supported · image_editing: Supported · native_generation: Supported · reference_images: Conditional — Requires valid reference images in a supported request format · Limits: Reference images: up to 4 · Resolutions: 1k, 2k, 4k | | Gemini 2.5 Flash Image · `gemini-2.5-flash-image` | images_generations, images_edits, gemini_generate_content | gemini_cli, openai_sdk, cherry_studio, trae | text_to_image: Supported · image_to_image: Supported · image_editing: Supported · native_generation: Supported · reference_images: Conditional — Requires valid reference images in a supported request format · Limits: Reference images: up to 4 · Resolutions: 1k | | Gemini 3 Pro Image Preview · `gemini-3-pro-image-preview` | images_generations, images_edits, gemini_generate_content | gemini_cli, openai_sdk, cherry_studio, trae | text_to_image: Supported · image_to_image: Supported · image_editing: Supported · native_generation: Supported · reference_images: Conditional — Requires valid reference images in a supported request format · Limits: Reference images: up to 4 · Resolutions: 1k, 2k, 4k | | Grok Imagine 1.0 · `grok-imagine-1.0` | images_generations | openai_sdk, cherry_studio, trae | text_to_image: Supported · image_to_image: Not published · image_editing: Not supported · reference_images: Not published · Limits: — | | Doubao Seedream 5.0 Lite · `doubao-seedream-5-0-lite` | images_generations | openai_sdk, cherry_studio, trae | text_to_image: Supported · image_to_image: Conditional — Requires valid reference images in a supported request format · image_editing: Not published · reference_images: Conditional — Requires valid reference images in a supported request format · Limits: — | | FLUX 2 Pro · `flux-2-pro` | images_generations | openai_sdk, cherry_studio, trae | text_to_image: Supported · image_to_image: Conditional — Requires valid reference images in a supported request format · image_editing: Not published · reference_images: Conditional — Requires valid reference images in a supported request format · Limits: — | | Midjourney · `midjourney` | images_generations | openai_sdk, cherry_studio, trae | text_to_image: Supported · image_to_image: Not supported · image_editing: Not supported · reference_images: Not supported · Limits: Input: Prompt only | ### Video | Model / Request ID | Protocols | Clients | Capabilities / Limits | | --- | --- | --- | --- | | Doubao Seedance 2.5 · `doubao-seedance-2.5` | videos_generations_async, video_task_read, video_task_content, video_task_delete | video_api | text_to_video: Supported · image_to_video: Supported · first_frame: Supported · last_frame: Supported · reference_images: Supported · audio: Supported · Limits: Resolutions: 480p, 720p · Aspect ratios: 16:9, 4:3, 1:1, 3:4, 9:16, 21:9, adaptive · Durations: 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30 · Reference images: up to 2 · Frame ratio: Adaptive | | MiniMax H3 · `MiniMax-H3` | videos_generations_async, video_task_read, video_task_content, video_task_delete | video_api | text_to_video: Supported · image_to_video: Supported · first_frame: Supported · last_frame: Supported · reference_images: Supported · audio: Not supported · Limits: Resolutions: 768P, 2K · Aspect ratios: 21:9, 16:9, 4:3, 1:1, 3:4, 9:16 · Durations: 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 · Reference images: up to 2 | | Kling V3 · `kling-v3` | videos_generations_async, video_task_read, video_task_content, video_task_delete | video_api | text_to_video: Supported · image_to_video: Supported · first_frame: Supported · last_frame: Supported · reference_images: Supported · audio: Supported · Limits: Resolutions: 720p, 1080p, 4K · Aspect ratios: 16:9, 9:16, 1:1 · Durations: 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 · Reference images: up to 2 | | Grok Imagine 1.5 Video · `grok-imagine-1.5-video` | videos_generations_async, video_task_read, video_task_content, video_task_delete | video_api | text_to_video: Supported · image_to_video: Supported · first_frame: Not supported · last_frame: Not supported · reference_images: Supported · audio: Not supported · Limits: Resolutions: 480p, 720p · Aspect ratios: 16:9, 9:16, 1:1, 3:2, 2:3 · Durations: 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30 · Reference images: up to 7 | ### Compatibility aliases and retired redirects - `opus5` → `claude-opus-5` (Alias) - `opus4.8` → `claude-opus-4-8` (Alias) - `gpt-5.6` → `gpt-5.6-terra` (Alias) - `GPT-5.6 Terra` → `gpt-5.6-terra` (Alias) - `grok-4.5` → `grok-4.6` (Alias) - `glm-5.1` → `glm-5.3` (Alias) - `glm-5.2` → `glm-5.3` (Alias) - `doubao-seed-2.0-pro` → `doubao-seed-2.1-turbo` (Alias) - `k3` → `kimi-k3` (Alias) - `gemini-3.1-flash-image` → `gemini-3.1-flash-image-preview` (Alias) - `gemini-2.5-flash-image-preview` → `gemini-2.5-flash-image` (Alias) - `gemini-3-pro-image` → `gemini-3-pro-image-preview` (Alias) - `doubao-seedream-5.0-lite` → `doubao-seedream-5-0-lite` (Alias) - `flux.2-pro` → `flux-2-pro` (Alias) - `mj` → `midjourney` (Alias) - `grok-imagine-1.5-video-ext` → `grok-imagine-1.5-video` (Alias) ### Detailed guides: - [image-generation](https://icodeeasy.cc/en/docs/image-generation/) — Image generation - [video-generation](https://icodeeasy.cc/en/docs/video-generation/) — Video generation ## https://icodeeasy.cc/en/docs/faq/ Title: FAQ Description: Troubleshoot API keys, 401 and 429 responses, Windows environment variables, client connectivity, quotas, and support reporting. Last modified: 2026-08-17 ## FAQ ### Q: Can one API key configure multiple clients? The same I Code Easy API key can be used with Claude Code, Codex, and Gemini CLI, but each client still needs its own protocol-specific configuration. Follow the [multi-client setup guide](https://icodeeasy.cc/en/docs/one-key-multiple-clients/) for each client. ### Q: Where can I check current prices, balance, and usage? RMB prices and rate information can change, so check the public pricing surface, dashboard pricing, or public pricing API. The dashboard also shows balance, request logs, token usage, and billing breakdowns where available; see the [pricing, balance, and usage guide](https://icodeeasy.cc/en/docs/pricing-balance-and-usage/). ### Q: How are API request data and privacy handled? Request content and metadata support routing, usage calculation, security, and support. Request and response bodies are generally not persistently stored except for the operational, security, and other necessary cases listed in the privacy policy; read the [request data and privacy guide](https://icodeeasy.cc/en/docs/api-data-and-privacy/) and full [privacy policy](https://icodeeasy.cc/privacy/). ### Q: Does model support mean every client protocol is supported? No. A model, client, and request protocol combination can have different capabilities or limits, so confirm the specific combination first. See the [model capabilities catalog](https://icodeeasy.cc/en/docs/model-capabilities/). ### Q: What should I do if my API Key leaks? Open the **API Keys** page and click "Rotate Key" immediately. The old key becomes invalid at once. ### Q: Why do requests return 401? Check: 1. Whether the API Key is correct 2. Whether the API Key has expired or been disabled 3. Whether environment variables or config files are set correctly 4. Whether you reopened the terminal after changing environment variables ### Q: Why do requests return 429? This means the request rate is too high. Retry later. Add retry logic in your code when appropriate. ### Q: Why do Windows environment variables not take effect? After setting environment variables, you need to **open a new PowerShell window**. ### Q: What if api.icodeeasy.cc is slow? Switch the Base URL to an I Code Easy backup endpoint: `https://jp.icodeeasy.cc` or `https://sg.icodeeasy.cc`. - Claude Code (including Kimi through Claude Code) / GLM / MiniMax: change `ANTHROPIC_BASE_URL` - Kimi Code CLI: change the provider `base_url` in `~/.kimi-code/config.toml` and keep `/v1` - Codex: change `base_url` or `OPENAI_BASE_URL` - Gemini CLI: change `GOOGLE_GEMINI_BASE_URL`; do not append `/v1beta` ### Q: How do I report a problem? Submit a ticket on the **Tickets** page. We will handle it as soon as possible.