# 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: 同一把 API Key 分别填入 Claude Code、Codex 和 Gemini CLI。三个客户端的环境变量和配置文件不同,不能互相复制。 Last modified: 2026-10-30 ## 一个 API Key 如何配置 Claude Code、Codex 与 Gemini CLI? 同一把 Key 可以同时用于这三个客户端。每个客户端的协议、环境变量和配置文件仍然不同,不能把一份配置原样复制过去。 ### 准备 1. 在[密钥设置](https://icodeeasy.cc/dashboard/keys)复制一把 Key。 2. 在[接入点选择](https://icodeeasy.cc/dashboard/endpoints)为 Claude、OpenAI、Gemini 分别保存接入点。 3. 还没有 Node.js 时,先完成[环境准备](https://icodeeasy.cc/docs/env-setup/)。 ### 分别填写 | 客户端 | 凭据放哪里 | 地址字段 | 注意 | | --- | --- | --- | --- | | [Claude Code](https://icodeeasy.cc/docs/claude-code/) | `ANTHROPIC_AUTH_TOKEN` | `ANTHROPIC_BASE_URL` | 不要设置 `CLAUDE_CODE_ATTRIBUTION_HEADER=0` | | [Codex](https://icodeeasy.cc/docs/codex/) | `codex login --with-api-key` 写入的 `auth.json` | `config.toml` 的 `base_url` | 不要把 Key 写进 `config.toml` | | [Gemini CLI](https://icodeeasy.cc/docs/gemini-cli/) | `GEMINI_API_KEY` | `GOOGLE_GEMINI_BASE_URL` | 只填域名,不要加 `/v1beta` | 三个地址都从 `https://api.icodeeasy.cc` 开始。某个客户端慢,只改那一个客户端的地址为 `https://jp.icodeeasy.cc` 或 `https://sg.icodeeasy.cc`。 模型是否支持该客户端,先查[模型能力目录](https://icodeeasy.cc/docs/model-capabilities/)。改完后各发一句对话,并在[请求日志](https://icodeeasy.cc/dashboard/logs)里看到三条独立记录。 ## https://icodeeasy.cc/docs/connection-and-recovery/ Title: 连接慢或请求失败时如何排查与恢复? Description: 按 401、403、429、超时和 Gemini 路径错误分别检查。确认是网络慢之后,再改用 jp 或 sg 备用域名。 Last modified: 2026-10-30 ## 连接慢或请求失败时如何排查与恢复? 先看状态码和报错原文,再改地址。换备用域名解决不了 Key、模型和接入点的问题。 ### 按现象处理 | 现象 | 先检查 | | --- | --- | | 401 | Key 是否完整、是否已轮换或禁用;环境变量是否在新终端里生效 | | 403 / 模型不可用 | [接入点选择](https://icodeeasy.cc/dashboard/endpoints)是否已为这个模型族保存;模型 ID 是否在[能力目录](https://icodeeasy.cc/docs/model-capabilities/)里 | | 429 | 请求太密。稍后重试,客户端加上退避,不要立刻连环重发 | | 超时、连接重置、一直转圈 | 地址是否写成 `https://api.icodeeasy.cc`。仍慢再换成下面的备用域名 | | Gemini 路径报 404 | `GOOGLE_GEMINI_BASE_URL` 只填域名,不要加 `/v1beta` | 备用域名,路径和 Key 保持原样: ``` https://jp.icodeeasy.cc https://sg.icodeeasy.cc ``` 要改的字段:Claude Code、GLM、MiniMax 是 `ANTHROPIC_BASE_URL`;Codex 是 `base_url`;Kimi Code CLI 是 `base_url` 且保留 `/v1`;Gemini CLI 是 `GOOGLE_GEMINI_BASE_URL`。 ### 改完如何确认 用原客户端再发一句短对话。成功后打开[请求日志](https://icodeeasy.cc/dashboard/logs),确认模型、状态和费用是这次请求。仍然失败时,把状态码和报错原文提交到[工单](https://icodeeasy.cc/dashboard/tickets),不要附带完整 API Key。 各客户端的完整配置见 [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/faq/)。 ## https://icodeeasy.cc/docs/pricing-balance-and-usage/ Title: 在哪里查看人民币价格、余额与用量明细? Description: 通过公开价格页和控制台查看实时人民币价格、余额、请求日志、Token 用量、账单明细及当前支付方式的最新说明。 Last modified: 2026-10-30 ## 在哪里查看人民币价格、余额与用量明细? 标价按人民币展示,汇率和单价会变。以页面和接口当时返回的数字为准,不要用旧截图对账。 ### 价格 - 公开[价格页](https://icodeeasy.cc/#pricing):未登录也能看当前人民币单价。 - [控制台价格](https://icodeeasy.cc/dashboard/pricing/):登录后看你账号可见的模型价格。 - 程序读取:`GET /api/public/model-pricing`。 长上下文、图片和视频各自有计费规则,价格页会分开列出。GPT 文本在单轮输入超过 500K token 时进入长上下文价格,用量明细里标为「长上下文」。 ### 余额和账单 [控制台概览](https://icodeeasy.cc/dashboard)显示当前余额。需要脚本查询时用[余额查询 API](https://icodeeasy.cc/docs/balance-query/)。 - [请求日志](https://icodeeasy.cc/dashboard/logs):每一次请求的模型、时间和状态。 - [用量明细](https://icodeeasy.cc/dashboard/usage):Token、缓存和费用拆分。 - [订单](https://icodeeasy.cc/dashboard/orders):充值记录。 支付宝可以充值。银行卡是否开放、金额是多少,以结账时服务端返回的支付配置为准。 请求内容和元数据如何保存,见[请求数据与隐私](https://icodeeasy.cc/docs/api-data-and-privacy/)。 ## https://icodeeasy.cc/docs/api-data-and-privacy/ Title: API 请求内容和元数据如何处理? Description: 了解 API 请求内容和元数据如何用于路由、用量、安全与支持,并跳转阅读完整隐私政策、服务条款和可接受使用规则。 Last modified: 2026-10-30 ## API 请求内容和元数据如何处理? 本页只说明日常边界。发生争议、合规或安全事件时,以[隐私政策](https://icodeeasy.cc/privacy/)为准。 ### 正文和元数据 请求和响应正文用于当次路由、计费和故障处理。除隐私政策列出的运营、计费、安全、反滥用、排障、争议、法律、备份,以及你主动打开的功能外,正文通常不长期保存。 这些信息会保留:模型名、Token 用量、费用、状态码、耗时、错误摘要、安全日志和风险信号。它们出现在[请求日志](https://icodeeasy.cc/dashboard/logs)和[用量明细](https://icodeeasy.cc/dashboard/usage)里。 ### 谁还会看到请求 模型提供方会依其自身条款、隐私政策及数据处理规则处理请求。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 安装、API 配置与 Windows 排错 Description: 安装 Claude Code,配置自定义 API 地址与密钥,验证 Windows、macOS、Linux 环境变量,排查 401、403、429 和连接问题,并了解 Claude Desktop、Kimi 与 GLM 的配置入口。 Last modified: 2026-10-31 ## Claude Code 安装、API 配置与 Windows 排错 使用 I Code Easy API Key 接入 Claude Code:先安装 CLI,再配置 `ANTHROPIC_AUTH_TOKEN` 和 `ANTHROPIC_BASE_URL`,重新打开终端后在项目目录运行 `claude`。Claude Desktop 则在图形界面单独设置 Gateway,步骤见本文后半部分。 | 你使用的客户端 | 安装与配置入口 | 如何确认 | | --- | --- | --- | | Claude Code CLI | 终端安装;环境变量配置 API | 在同一个终端启动 `claude` | | Claude Desktop | 桌面应用;Developer 菜单配置 Gateway | 保存网关与模型后重启应用 | | Windows 上的 Claude Code | PowerShell / CMD 或 WSL | 环境变量必须属于实际运行 CLI 的环境 | ### 开始前:账号、密钥和模型 1. [注册账号](https://icodeeasy.cc/register/),登录后从 [API Keys](https://icodeeasy.cc/dashboard/keys) 复制本站密钥;不要填入登录密码。 2. 在 [端点选择](https://icodeeasy.cc/dashboard/endpoints) 为准备使用的模型系列选择并保存端点,具体流程见 [快速开始](https://icodeeasy.cc/docs/getting-started/)。 3. 查看 [价格、余额与用量](https://icodeeasy.cc/docs/pricing-balance-and-usage/) 和 [模型能力](https://icodeeasy.cc/docs/model-capabilities/),确认模型 ID、适用条件与协议支持;安装客户端不代表获得 API 余额或模型权限。 密钥只保存在自己的客户端配置中。不要提交到 Git 或粘贴到公开截图;如泄露,请在 API Keys 页面轮换密钥。 ### 第一步:安装 Claude Code 原生安装与 npm 安装选一种即可;npm 所需的 Node.js 和终端准备见 [环境准备](https://icodeeasy.cc/docs/env-setup/)。 **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 下面的环境变量仅用于 Claude Code CLI;Desktop 不读取这里的 `ANTHROPIC_BASE_URL` 或 CLI 的 `settings.json`,请使用后文的独立设置。 #### Linux / MacOS 配置 下面的命令用于当前 shell;若要长期生效,添加到与你使用的 shell 对应的 `~/.bashrc` 或 `~/.zshrc`。把密钥占位符替换为自己的 API Key: ```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 -not [string]::IsNullOrWhiteSpace([Environment]::GetEnvironmentVariable("ANTHROPIC_AUTH_TOKEN", "User")) [Environment]::GetEnvironmentVariable("ANTHROPIC_BASE_URL", "User") [Environment]::GetEnvironmentVariable("CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC", "User") ``` `SetEnvironmentVariable` 写入的是用户级持久环境变量,不会立即更新当前 PowerShell 会话。新开一个 PowerShell 窗口后再用 `claude` 启动。 ### 检查 CLI 配置是否进入当前进程 macOS / Linux / WSL:下面只显示密钥是否存在,不会打印密钥: ```bash [ -n "$ANTHROPIC_AUTH_TOKEN" ] && echo "Token configured" || echo "Token missing" printf '%s\n' "$ANTHROPIC_BASE_URL" ``` Windows 请在新开的 PowerShell 中检查进程实际读到的值: ```powershell -not [string]::IsNullOrWhiteSpace($env:ANTHROPIC_AUTH_TOKEN) $env:ANTHROPIC_BASE_URL ``` 第一项应为 `True`,地址应与你选择的域名一致。只在用户级配置中存在密钥,而当前进程为 `False`,说明启动环境尚未刷新。VS Code 集成终端也可能继承编辑器启动时的旧变量,需要完全退出再打开编辑器。 WSL 使用 Linux 环境;在 Windows PowerShell 设置变量后,仍需在 WSL 的 shell 中按 Linux 步骤配置。Base URL 填域名,不要把 `/v1/messages` 请求路径拼到这里。 --- ### 第三步:启动 Claude Code 先在终端确认安装版本: ```bash claude --version ``` ```bash cd your-project-folder claude ``` 启动后输入 `/status`,核对当前模型、账号、凭证来源与网关 URL。它用于确认配置,不能代替一次真实请求验证。 先发送一个简短问题,确认收到回复,再到 [请求日志](https://icodeeasy.cc/dashboard/logs) 核对模型、状态和用量。安装完成、能打开 CLI 或能看见密钥存在,都不能单独证明 API 请求成功。 ### Claude Code 常见问题与恢复顺序 | 现象 | 优先检查 | 下一步 | | --- | --- | --- | | `claude` 找不到或无法启动 | 安装是否完成,终端是否刷新 PATH | 重开终端;核对是否在另一套环境(WSL / Windows)安装 | | 401 / authentication failed | 当前进程是否有本站有效 API Key,是否残留旧认证设置 | 从 API Keys 核对或轮换密钥;重开终端再试,不要输出密钥 | | 403 / permission denied | 错误正文、端点选择、账号或模型使用条件 | 按具体错误检查权限;保留脱敏报错,勿仅凭状态码判断原因 | | 429 / rate limit | 错误正文、并发请求和账户状态 | 暂停重复重试,减少并发;检查余额与限制后再试 | | 超时、连接失败 | 实际 Base URL、网络代理、DNS 与连接状态 | 一次只更换一个因素;可切换下方 JP / SG 备用域名 | | 变量已设置但仍用旧地址 / 旧密钥 | 当前终端、IDE 和启动方式是否继承旧变量 | 退出客户端并刷新启动环境;检查是否有重复配置覆盖 | | 登录提示与预期不符 | 是否在按 CLI 方式接入、是否混用了 Desktop 设置 | 回到本文对应客户端步骤,核对当前环境与认证来源 | 备用地址为 `https://jp.icodeeasy.cc`、`https://sg.icodeeasy.cc`,保留同一把本站密钥。它们用于连接恢复,不是更换账号或模型的步骤。更多网络排查见 [连接与恢复](https://icodeeasy.cc/docs/connection-and-recovery/)。 反馈问题时提供客户端版本、操作系统、北京时间、脱敏错误正文和请求标识即可;不要发送 API Key 或完整环境变量转储。 ### 在 Claude Code 中使用 Kimi 或 GLM 客户端、API 地址与模型名称是不同配置。仅设置 Base URL 并不会自动选择 Kimi 或 GLM。按 [Kimi 配置](https://icodeeasy.cc/docs/kimi/) 或 [GLM 配置](https://icodeeasy.cc/docs/glm/) 设置模型,并在启动后核对选择;当前模型能力与使用条件以对应教程和能力目录为准。 --- ### Claude Desktop 图形版配置 Claude 桌面端图形版可以通过开发者模式直接配置第三方 API 网关。 Desktop 使用独立的 third-party inference 配置,不继承上文 CLI 环境变量。界面入口以安装版本为准;模型是否可用还需满足本站目录与端点条件,填写模型名不等于完成兼容性验证。 #### 开启开发者模式 在菜单栏依次点击 `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-5` 或 `claude-sonnet-5-5`,保存后重启 Claude Desktop。 同一套网关也可用于 Kimi、GLM;模型配置分别见 [Kimi 配置](https://icodeeasy.cc/docs/kimi/) 和 [GLM 配置](https://icodeeasy.cc/docs/glm/)。固定使用 Claude Fable 5 时,见 [Claude Fable 5 使用指南](https://icodeeasy.cc/docs/claude-fable-5/)。 ### 官方参考 - [安装与更新](https://code.claude.com/docs/en/setup) - [环境变量](https://code.claude.com/docs/en/env-vars) - [模型配置](https://code.claude.com/docs/en/model-config) - [第三方网关与 Desktop](https://code.claude.com/docs/en/llm-gateway-connect#desktop-app) ## https://icodeeasy.cc/docs/codex/ Title: Codex 安装与配置 Description: 安装 Codex CLI,使用 auth.json 保存 API Key,设置 I Code Easy provider 与 Base URL,并运行第一次 Codex 会话。 Last modified: 2026-11-05 ## 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-6.1-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 ``` `gpt-6.1-sol` 是本站当前的 Codex 主力模型;需要更强能力时可以把 `model` 改为旗舰 `gpt-6-astra`,其余字段不变。旧配置里的 `gpt-5.6-sol` 会自动升级为 `gpt-6.1-sol`,无需修改即可继续使用。 如果 `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-6.1-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 ``` `gpt-6.1-sol` 是本站当前的 Codex 主力模型;需要更强能力时可以把 `model` 改为旗舰 `gpt-6-astra`,其余字段不变。旧配置里的 `gpt-5.6-sol` 会自动升级为 `gpt-6.1-sol`,无需修改即可继续使用。 如果 `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-10-13 ## 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.8-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.8-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.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 价格计费。自 2026-10-13 起,`gemini-3.7-flash`、`gemini-3.6-flash` 与 `gemini-3.5-flash` 已被 Google 弃用:用这三个名字发出的请求本站仍然接受,但会透明地由 `gemini-3.8-flash` 承接,响应中的模型名显示为 `gemini-3.8-flash`,并按 3.8 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.8-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.8-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.8-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.8-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/typesafe-systemone/ Title: TypeSafe Jev / System One API 指南 Description: 通过我方 System One 端点调用固定版本 TypeSafe Jev 1.14,完成文本与结构化判断、PNG/JPEG 图片输入、Box 定位和 262K 长上下文请求,并了解输入-only 计费及实验能力边界。 Last modified: 2026-10-30 ## TypeSafe Jev / System One API TypeSafe Jev 用于对文本、结构化数据或图片做概率化判断。你可以在一次请求中提出多个 `noul`、`choice`、`score` 问题;Jev 1.14 还支持 Box 定位。它不是通用聊天补全接口,也不提供 Chat 工具调用。 ### 端点、认证与固定模型 ``` POST https://api.icodeeasy.cc/v1/systemone Authorization: Bearer Content-Type: application/json ``` 仅公开 TypeSafe Jev 1.14,固定模型 ID 为 `jev-1.14.0`;不公开会随发布漂移的别名: | 模型 ID | 图片输入 | Box | 262K 长上下文 | | --- | --- | --- | --- | | `jev-1.14.0` | 支持 | 支持 | 支持 | `jev-latest`、`jev-preview` 和其它模型名不属于本接口的公开目录。响应为非流式 JSON;不要发送 `stream`,也不要把 System One 当作 `/v1/chat/completions`、`/v1/messages` 或 `/v1/responses` 使用。 ### 文本与结构化 state `state` 可以是字符串、对象或数组。每个问题由你命名,响应会在 `answers` 中沿用相同名称和题型。以下请求同时演示是非判断、固定选项和有序评分: ```bash curl --request POST 'https://api.icodeeasy.cc/v1/systemone' \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "model": "jev-1.14.0", "state": "I was charged twice for my subscription. Please refund the extra charge today.", "questions": { "is_billing": { "type": "noul", "instructions": "Is this message about billing?" }, "department": { "type": "choice", "instructions": "Which team should handle this request?", "criteria": { "billing": "Duplicate charges, invoices, refunds, and payment failures", "technical": "Product functionality and technical troubleshooting", "other": "Requests outside billing and technical support" } }, "urgency": { "type": "score", "instructions": "How urgent is the request?", "criteria": [ "No deadline and no immediate impact", "Needs attention soon but service remains usable", "Immediate financial or service impact requires urgent handling" ] } } }' ``` `noul` 返回 0 到 1 的是/否概率;`choice` 返回选项及概率分布;`score` 返回在等级之间的位置、概率分布和置信信息。概率或置信度不等于事实保证,业务动作应按自己的样本设定阈值。响应还包含实际 `model` 和 `usage.input_tokens` / `usage.output_tokens`;请校验模型、答案键与题型后再使用结果。 ### SDK 兼容说明 使用官方 TypeSafe SDK 进行文本调用时,必须显式设置 `compression: false`,不要依赖默认压缩协商。当前图片请求只支持本文所示的 JSON + Base64 形式,不支持 SDK 默认的 multipart 图片上传。使用图片时请按本文构造 HTTP 请求,不要直接使用 SDK 的图片对象或默认文件上传流程。 ### PNG / JPEG 图片输入 图片请求必须显式携带 `TypeSafe-Danger-Zone-Images: true`。下面用 Base64 JSON 发送一张 PNG;`photo-001` 是本次请求内的引用,必须在 `state`、问题说明或判断条件中被引用。JPEG 可将 `format` 设为 `jpg` 或 `jpeg`。 ```bash curl --request POST 'https://api.icodeeasy.cc/v1/systemone' \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --header 'TypeSafe-Danger-Zone-Images: true' \ --data '{ "model": "jev-1.14.0", "state": {"photo": "photo-001"}, "assets": { "photo-001": { "type": "image", "format": "png", "data_base64": "" } }, "questions": { "mug_visible": { "type": "noul", "instructions": "Is there a coffee mug in `photo`?" } } }' ``` Base64 不带 `data:` 前缀或换行。图片须为静态 PNG/JPEG,单文件解码后不超过 16 MiB,宽和高均在 280–1568 像素之间;整个请求体上限为 32 MiB。图片不会自动缩放到合规尺寸,任一资源不合规时整个请求失败。图片 Token 计入 `usage.input_tokens`。 ### Box 定位(仅 Jev 1.14) Box 仍属实验能力。请求必须带 `TypeSafe-Danger-Zone-Images: true`,并使用公开固定版本 `jev-1.14.0`。Box 没有 `criteria`,建议同时用一个 `noul` 判断目标是否存在: ```json { "model": "jev-1.14.0", "state": {"photo": "photo-001"}, "assets": { "photo-001": { "type": "image", "format": "jpeg", "data_base64": "" } }, "questions": { "mug_visible": { "type": "noul", "instructions": "Is there a coffee mug in `photo`?" }, "mug": { "type": "box", "instructions": "the coffee mug in `photo`" } } } ``` 将上述 JSON 作为请求体发送到同一端点,并携带认证、JSON 与 Images 三种请求头。Box 答案的 `top`、`bottom`、`left`、`right` 是相对于图片宽高的 0–1 坐标;乘以像素宽高即可换算。目标不存在时仍可能返回一个框,因此应结合存在性判断和置信信息,不要把 Box 当作精确检测结果。 ### 262K 长上下文 Jev 1.14 支持加长上下文。默认限制为每请求 64K、每问题 32K;需要 262K 档时,为该请求显式添加: ``` TypeSafe-Danger-Zone-Long-Context: true ``` ```bash curl --request POST 'https://api.icodeeasy.cc/v1/systemone' \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --header 'TypeSafe-Danger-Zone-Long-Context: true' \ --data '{ "model": "jev-1.14.0", "state": "", "questions": { "has_early_termination": { "type": "noul", "instructions": "Does the state include a clause allowing either party to terminate early?" } } }' ``` 启用后每请求和每问题的上下文均为 262K。长上下文不加收单价,但通常更慢,超长输入和非英文内容的判断质量需要用你的真实数据评估;不要把短文本成功当作 262K 边界或首尾信息均可恢复的保证。 ### 计费与实验边界 - 官方基础价为输入 **$0.042 / MTok**;当前站内有效价为 **¥0.30 / MTok**,输出为 **0**。计算公式为 `usage.input_tokens × ¥0.30 / 1,000,000`。 - 输出 Token 会在 `usage` 中返回,但目前免费;没有独立缓存读写价格,也没有长上下文加价。图片输入同样按输入 Token 计费。 - System One 是非流式结构化判断 API,不支持 Chat 工具调用,也不进入 Chat playground。 - 图片与 Box 为实验能力,请求格式、答案和限制可能随版本调整;Box 仅属于 1.14。上线前请用自有图片、语言、阈值和失败样本验证。 - 长上下文不等于无限输入;仍受上下文、请求体、图片尺寸和速率限制。请保留固定版本、响应模型、答案结构与 `usage` 校验。 价格以[价格页面](https://icodeeasy.cc/dashboard/pricing/)为准,能力状态见[模型能力目录](https://icodeeasy.cc/docs/model-capabilities/)。 ## https://icodeeasy.cc/docs/model-capabilities/ Title: 模型能力目录 Description: 按文本、图片和视频分类查看公开模型的规范化请求 ID、兼容协议、支持客户端、工具调用、输入输出能力与限制,并根据最近核对日期判断信息新鲜度。 Last modified: 2026-11-09 ## 模型能力目录 已核验日期: 2026-11-09. 这是经过审阅的能力快照,不代表实时服务健康状态。 价格会变化,请查看 [/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 Sonnet 5.5 · `claude-sonnet-5-5` | anthropic_messages, anthropic_count_tokens | claude_code, cursor, cherry_studio, trae | streaming: 支持 · tool_calling: 支持 · image_input: 有条件支持 · video_input: 不支持. 取决于兼容的接入点与请求格式 | | Claude Sonnet 5 · `claude-sonnet-5` | 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.1 Sol · `gpt-6.1-sol` | responses, responses_compact, chat_completions | codex, vscode_codex, cursor, cherry_studio, trae | streaming: 支持 · tool_calling: 支持 · image_input: 未公开承诺 · video_input: 不支持 | | GPT-6.1 Terra · `gpt-6.1-terra` | responses | codex, vscode_codex | 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 4 Argon · `gemini-4-argon` | gemini_generate_content, gemini_stream_generate_content | gemini_cli, cherry_studio, trae | streaming: 支持 · tool_calling: 有条件支持 · image_input: 有条件支持 · video_input: 有条件支持. 取决于兼容的协议与请求格式; 取决于兼容的接入点与请求格式 | | Gemini 3.8 Flash · `gemini-3.8-flash` | gemini_generate_content, gemini_stream_generate_content | gemini_cli, cherry_studio, trae | streaming: 支持 · tool_calling: 有条件支持 · image_input: 有条件支持 · video_input: 有条件支持. 取决于兼容的协议与请求格式; 取决于兼容的接入点与请求格式 | | GLM 5.3 FlashX · `glm-5.3-flashx` | chat_completions, anthropic_messages, responses | codex, claude_code, cursor, cherry_studio, trae, openai_sdk | 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.1 Pro · `k3.1-pro` | chat_completions, anthropic_messages, anthropic_count_tokens, responses, responses_compact | codex, claude_code, cursor, cherry_studio, trae | streaming: 支持 · tool_calling: 支持 · image_input: 支持 · video_input: 支持 | | Kimi K3.1 Pro Highspeed · `k3.1-pro-highspeed` | chat_completions, anthropic_messages, anthropic_count_tokens, responses, responses_compact | codex, claude_code, cursor, cherry_studio, trae | streaming: 支持 · tool_calling: 支持 · image_input: 支持 · video_input: 支持 | | Kimi K3 · `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: 未公开承诺 | | Kimi K3 256K · `k3-256k` | 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: 不支持. 取决于兼容的协议与请求格式 | | TypeSafe Jev 1.14 · `jev-1.14.0` | systemone | typesafe_sdk | streaming: 不支持 · tool_calling: 不支持 · image_input: 支持 · video_input: 不支持 · 限制: 输入:262K context with long-context header; PNG/JPEG; Box supported | ### 图像模型 | 模型 / 请求 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 张 · 分辨率: 1k, 2k, 4k | | 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: 未公开承诺 | | Seedream 5 Flash · `seedream-5-0-flash` | images_generations | openai_sdk, cherry_studio, trae | text_to_image: 支持 · image_to_image: 有条件支持 · image_editing: 未公开承诺 · reference_images: 有条件支持. 需要以支持的请求格式提供有效参考图 · 限制: 参考图:最多 8 张 · 分辨率: 1K, 1.5K, 2K · 画面比例: 1:1, 4:3, 3:4, 16:9, 9:16, 3:2, 2:3, 2:1, 1:2, 21:9 | | Seedream 5 Pro · `seedream-5-0-pro` | images_generations | openai_sdk, cherry_studio, trae | text_to_image: 支持 · image_to_image: 有条件支持 · image_editing: 未公开承诺 · reference_images: 有条件支持. 需要以支持的请求格式提供有效参考图 · 限制: 参考图:最多 8 张 · 分辨率: 1K, 1.5K, 2K · 画面比例: 1:1, 4:3, 3:4, 16:9, 9:16, 3:2, 2:3, 2:1, 1:2, 21:9 | | Seedream 4.5 · `seedream-4-5` | images_generations | openai_sdk, cherry_studio, trae | text_to_image: 支持 · image_to_image: 有条件支持 · image_editing: 未公开承诺 · reference_images: 有条件支持. 需要以支持的请求格式提供有效参考图 · 限制: 参考图:最多 8 张 · 分辨率: 2K, 4K · 画面比例: 1:1, 4:3, 3:4, 16:9, 9:16, 3:2, 2:3, 2:1, 1:2, 21:9, 9:21 | | Seedream 4.0 · `seedream-4-0` | images_generations | openai_sdk, cherry_studio, trae | text_to_image: 支持 · image_to_image: 有条件支持 · image_editing: 未公开承诺 · reference_images: 有条件支持. 需要以支持的请求格式提供有效参考图 · 限制: 参考图:最多 8 张 · 分辨率: 1K, 2K, 4K · 画面比例: 1:1, 4:3, 3:4, 16:9, 9:16, 3:2, 2:3, 2:1, 1:2, 21:9, 9:21 | | 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: 有条件支持. 需要以支持的请求格式提供有效参考图 | | FLUX 3 Image · `flux-3-image` | images_generations | openai_sdk, cherry_studio, trae | text_to_image: 支持 · image_to_image: 有条件支持 · image_editing: 未公开承诺 · reference_images: 有条件支持. 需要以支持的请求格式提供有效参考图 · 限制: 参考图:最多 8 张 · 分辨率: 768sq, 1k, 1.5k, 2k, 4k · 画面比例: 1:1, 9:16, 16:9, 2:3, 3:2, 4:5, 5:4 | | FLUX 3 Image Klein · `flux-3-image-klein` | images_generations | openai_sdk, cherry_studio, trae | text_to_image: 支持 · image_to_image: 有条件支持 · image_editing: 未公开承诺 · reference_images: 有条件支持. 需要以支持的请求格式提供有效参考图 · 限制: 参考图:最多 8 张 · 分辨率: 768sq, 1k, 1.5k, 2k, 4k · 画面比例: 1:1, 9:16, 16:9, 2:3, 3:2, 4:5, 5:4 | | 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 张 | | Kling 4 · `kling-v4` | 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 · 时长: 3, 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 · 画面比例: 16:9, 9:16, 1:1, 21:9 · 参考图:最多 8 张 | | 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 张 | | flux-3-video · `flux-3-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: 支持 · video_input: 支持 · audio: 支持 · 限制: 分辨率: hd, fhd · 画面比例: auto, 21:9, 2:1, 16:9, 4:3, 1:1, 3:4, 9:16 · 参考图:最多 10 张 · 时长: 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 · 输入:Site images ≤10 MB; videos ≥3s. One video ≤30s. Owned completed HD draft enhancement; ordered first/intermediate/last keyframes, duplicates preserved. | | viduq4-preview · `viduq4-preview` | 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: 支持 · video_input: 不支持 · audio: 支持 · 限制: 分辨率: 540p, 720p, 1080p, 2K, 4K · 画面比例: 1:1, 9:16, 16:9, 3:4, 4:3 · 参考图:最多 15 张 · 时长: 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 · 输入:Site images ≤10 MB; videos ≥3s. No video input. No audio reference upload. No supplier task IDs. | | viduq3 · `viduq3` | 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: 支持 · video_input: 不支持 · audio: 未公开承诺 · 限制: 分辨率: 540p, 720p, 1080p · 画面比例: 1:1, 9:16, 16:9, 3:4, 4:3 · 参考图:最多 7 张 · 时长: 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 · 输入:Site images ≤10 MB; videos ≥3s. No video input. No audio reference upload. No supplier task IDs. | | viduq3-mix · `viduq3-mix` | 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: 支持 · video_input: 不支持 · audio: 未公开承诺 · 限制: 分辨率: 720p, 1080p · 画面比例: 1:1, 9:16, 16:9, 3:4, 4:3 · 参考图:最多 7 张 · 时长: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 · 输入:Site images ≤10 MB; videos ≥3s. No video input. No audio reference upload. No supplier task IDs. | | viduq3-pro · `viduq3-pro` | 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: 不支持 · video_input: 不支持 · audio: 支持 · 限制: 分辨率: 540p, 720p, 1080p · 画面比例: 1:1, 9:16, 16:9, 3:4, 4:3 · 参考图:最多 2 张 · 时长: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 · 输入:Site images ≤10 MB; videos ≥3s. No video input. No audio reference upload. No supplier task IDs. | | viduq3-turbo · `viduq3-turbo` | 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: 不支持 · video_input: 不支持 · audio: 支持 · 限制: 分辨率: 540p, 720p, 1080p · 画面比例: 1:1, 9:16, 16:9, 3:4, 4:3 · 参考图:最多 2 张 · 时长: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 · 输入:Site images ≤10 MB; videos ≥3s. No video input. No audio reference upload. No supplier task IDs. | | gemini-omni-1.1-flash · `gemini-omni-1.1-flash` | 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: 支持 · video_input: 支持 · audio: 未公开承诺 · 限制: 分辨率: 360p, 720p, 1080p, 4k · 画面比例: 16:9, 9:16 · 参考图:最多 10 张 · 输入:Prompt controls output length (3–10s); no duration/audio request fields. Reference output estimate excludes media/context; actual usage settlement. · 输入:Site images ≤10 MB; videos ≥3s. One video ≤10s. No audio reference upload. No supplier task IDs. | | gemini-omni-flash-preview · `gemini-omni-flash-preview` | 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: 支持 · video_input: 支持 · audio: 未公开承诺 · 限制: 分辨率: 720p · 画面比例: 16:9, 9:16 · 参考图:最多 16 张 · 输入:Prompt controls output length (3–10s); no duration/audio request fields. Reference output estimate excludes media/context; actual usage settlement. · 输入:Site images ≤10 MB; videos ≥3s. One video ≤24s. No audio reference upload. No supplier task IDs. | | gemini-omni-1.1-flash-ext · `gemini-omni-1.1-flash-ext` | 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: 支持 · video_input: 不支持 · audio: 未公开承诺 · 限制: 分辨率: 360p, 720p, 1080p, 4k · 画面比例: 16:9, 9:16 · 参考图:最多 3 张 · 时长: 4, 6, 8, 10 · 输入:Site images ≤10 MB; videos ≥3s. No video input. No audio reference upload. No supplier task IDs. | ### 兼容别名与退役重定向 旧请求 ID 会转到右边的现用 ID。别名继续可用;退役重定向是已下线的旧名。 - `claude-opus-4-5`, `claude-opus-4-5-20251101`, `claude-opus-4-6`, `claude-opus-4-7`, `claude-opus-4-8` → `claude-opus-5-5` (退役重定向) - `opus4.8` → `claude-opus-5-5` (别名) - `opus5` → `claude-opus-5` (别名) - `claude-sonnet-4-5`, `claude-sonnet-4-5-20250514`, `claude-sonnet-4-5-20250929`, `claude-sonnet-4-6` → `claude-sonnet-5-5` (退役重定向) - `gpt-6-sol`, `gpt-6-luna`, `gpt-5.6-terra`, `gpt-5.6-luna`, `gpt-5.6-sol`, `gpt-5.6-sol-272k` → `gpt-6.1-sol` (退役重定向) - `gpt-6`, `gpt-5.6`, `gpt-5`, `gpt-5.1`, `gpt-5-mini`, `gpt-5.4`, `gpt-5.4-mini` → `gpt-6.1-sol` (别名) - `grok-4.5` → `grok-4.6` (别名) - `gemini-3.7-flash`, `gemini-3.6-flash`, `gemini-3.5-flash`, `gemini-3-flash`, `gemini-3-flash-preview`, `gemini-3.1-flash-lite`, `gemini-3.1-flash-lite-preview` → `gemini-3.8-flash` (退役重定向) - `glm-5.1`, `glm-5.2` → `glm-5.3` (别名) - `doubao-seed-2.0-pro` → `doubao-seed-2.1-turbo` (别名) - `kimi-k3.1-pro` → `k3.1-pro` (别名) - `kimi`, `kimi-k2.5`, `kimi-k2.6`, `kimi-k2.7`, `kimi-k2.8`, `kimi-2.8`, `kimi-k2.7-code`, `kimi-for-coding` → `k3.1-pro` (退役重定向) - `kimi-k3.1-pro-highspeed` → `k3.1-pro-highspeed` (别名) - `kimi-for-coding-highspeed`, `kimi-k2.7-code-highspeed` → `k3.1-pro-highspeed` (退役重定向) - `kimi-k3`, `k3[1m]` → `k3` (别名) - `kimi-k3-256k` → `k3-256k` (别名) - `deepseek-v4.1-flash` → `deepseek-flash` (别名) - `deepseek-v4-flash`, `deepseek-v4-flash-vision-exp` → `deepseek-flash` (退役重定向) - `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-10-30 ## 常见问题 ### Q: 一把 API Key 可以配置多个客户端吗? 可以。三个客户端共用一把 Key,但环境变量和配置文件各自不同。填写位置见[多客户端配置](https://icodeeasy.cc/docs/one-key-multiple-clients/)。 ### Q: 在哪里查看当前价格、余额和用量? 价格、余额、请求日志和用量明细的入口都在[价格、余额与用量](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 连接慢怎么办? 先按[连接排查](https://icodeeasy.cc/docs/connection-and-recovery/)确认不是 401、403 或 429。确认是网络慢之后,再把 Base URL 换成 `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 API key in Claude Code, Codex, and Gemini CLI. Each client keeps its own environment variables and config file. Do not copy one setup into another. Last modified: 2026-10-30 ## How can one API key configure Claude Code, Codex, and Gemini CLI? The same key works in all three clients. The protocol, environment variables, and config file stay different. Do not copy one client's config into another. ### Prepare 1. Copy one key from [API Keys](https://icodeeasy.cc/dashboard/keys). 2. Save an endpoint for Claude, OpenAI, and Gemini on [Endpoint selection](https://icodeeasy.cc/dashboard/endpoints). 3. Install Node.js first if you need it: [environment setup](https://icodeeasy.cc/en/docs/env-setup/). ### Fill each client | Client | Where the key goes | Address field | Watch out | | --- | --- | --- | --- | | [Claude Code](https://icodeeasy.cc/en/docs/claude-code/) | `ANTHROPIC_AUTH_TOKEN` | `ANTHROPIC_BASE_URL` | Do not set `CLAUDE_CODE_ATTRIBUTION_HEADER=0` | | [Codex](https://icodeeasy.cc/en/docs/codex/) | `auth.json`, written by `codex login --with-api-key` | `base_url` in `config.toml` | Do not put the key in `config.toml` | | [Gemini CLI](https://icodeeasy.cc/en/docs/gemini-cli/) | `GEMINI_API_KEY` | `GOOGLE_GEMINI_BASE_URL` | Domain only. Do not add `/v1beta` | Start every address at `https://api.icodeeasy.cc`. If one client is slow, change only that client's address to `https://jp.icodeeasy.cc` or `https://sg.icodeeasy.cc`. Check [model capabilities](https://icodeeasy.cc/en/docs/model-capabilities/) before you assume a model works in that client. After setup, send one short message from each client and confirm three separate rows in [request logs](https://icodeeasy.cc/dashboard/logs). ## https://icodeeasy.cc/en/docs/connection-and-recovery/ Title: How do I troubleshoot slow connections or failed requests? Description: Match 401, 403, 429, timeouts, and Gemini path errors before changing hosts. Switch to the jp or sg backup domain only after the network is the problem. Last modified: 2026-10-30 ## How do I troubleshoot slow connections or failed requests? Read the status code and the error text before you change the address. A backup domain does not fix a bad key, a wrong model, or a missing endpoint. ### Match the symptom | What you see | Check first | | --- | --- | | 401 | The key is complete and has not been rotated or disabled. A new terminal has picked up the environment variable | | 403 or model unavailable | [Endpoint selection](https://icodeeasy.cc/dashboard/endpoints) has a saved endpoint for this model family. The model ID is in the [capability catalog](https://icodeeasy.cc/en/docs/model-capabilities/) | | 429 | Requests are too close together. Wait, add backoff, and do not resend in a tight loop | | Timeout, connection reset, or a spinner that never ends | The address is `https://api.icodeeasy.cc`. If it is still slow, switch to a backup domain below | | Gemini path returns 404 | `GOOGLE_GEMINI_BASE_URL` is the domain only. Do not add `/v1beta` | Backup domains. Keep the original path and key: ``` https://jp.icodeeasy.cc https://sg.icodeeasy.cc ``` Fields to change: `ANTHROPIC_BASE_URL` for Claude Code, GLM, and MiniMax; `base_url` for Codex; `base_url` for Kimi Code CLI, keeping `/v1`; `GOOGLE_GEMINI_BASE_URL` for Gemini CLI. ### Confirm the change Send one short message from the same client. Open [request logs](https://icodeeasy.cc/dashboard/logs) and confirm the model, status, and charge belong to that request. If it still fails, send the status code and error text to [Tickets](https://icodeeasy.cc/dashboard/tickets). Do not include the full API key. Full client setup is in [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/), and the [FAQ](https://icodeeasy.cc/en/docs/faq/). ## 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-10-30 ## Where can I check RMB prices, balance, and usage details? Listed prices are in RMB. The exchange rate and unit prices change. Use the number the page or API returns at that moment. Do not reconcile against an old screenshot. ### Prices - Public [pricing page](https://icodeeasy.cc/#pricing): current RMB unit prices, no sign-in required. - [Dashboard pricing](https://icodeeasy.cc/dashboard/pricing/): models visible to your signed-in account. - Programmatic read: `GET /api/public/model-pricing`. Long context, images, and video each have their own billing rule, listed separately on the pricing page. GPT text moves to the long-context price when one turn's input exceeds 500K tokens. Usage details label that row "Long context". ### Balance and bills The [dashboard overview](https://icodeeasy.cc/dashboard) shows the current balance. Scripts should call the [balance query API](https://icodeeasy.cc/en/docs/balance-query/). - [Request logs](https://icodeeasy.cc/dashboard/logs): model, time, and status of each request. - [Usage details](https://icodeeasy.cc/dashboard/usage): token, cache, and charge breakdown. - [Orders](https://icodeeasy.cc/dashboard/orders): recharge records. Alipay can recharge the balance. Whether a card payment is open, and the amount charged, depends on the payment configuration the server returns at checkout. How request content and metadata are stored is covered in [API data and privacy](https://icodeeasy.cc/en/docs/api-data-and-privacy/). ## 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-10-30 ## How are API request content and metadata handled? This page states the everyday boundary. For a dispute, compliance question, or security incident, the [privacy policy](https://icodeeasy.cc/privacy/) controls. ### Bodies and metadata Request and response bodies are used for that request's routing, billing, and failure handling. Bodies are not kept long term except for the operational, billing, security, anti-abuse, troubleshooting, dispute, legal, and backup cases listed in the privacy policy, and for features you turn on yourself. These records are kept: model name, token usage, charge, status code, latency, error summary, security logs, and risk signals. They show up in [request logs](https://icodeeasy.cc/dashboard/logs) and [usage details](https://icodeeasy.cc/dashboard/usage). ### Who else sees a request Model providers process requests under their own terms, privacy policies, and data-handling rules. I Code Easy does not sell API request content or personal information. Use of the service is covered by the [terms](https://icodeeasy.cc/terms/) and [acceptable use](https://icodeeasy.cc/acceptable-use/). Where to read prices, balance, and bills is in [pricing, balance, and usage](https://icodeeasy.cc/en/docs/pricing-balance-and-usage/). ## https://icodeeasy.cc/en/docs/claude-code/ Title: Install Claude Code, Configure a Custom API, and Troubleshoot Windows Description: Install Claude Code, configure a custom API key and URL, verify Windows or Unix settings, and troubleshoot authentication, rate limits, and connections. Last modified: 2026-10-31 ## Install Claude Code, Configure a Custom API, and Troubleshoot Windows To use an I Code Easy API key with Claude Code, install the CLI, set `ANTHROPIC_AUTH_TOKEN` and `ANTHROPIC_BASE_URL`, then reopen your terminal and run `claude` in a project folder. Claude Desktop has its own Gateway settings in the app; those steps appear below. | Client | Installation and API settings | Verification | | --- | --- | --- | | Claude Code CLI | Terminal installer; environment variables | Start `claude` from the configured terminal | | Claude Desktop | Desktop app; Gateway in the Developer menu | Save the gateway and model, then restart the app | | Claude Code on Windows | PowerShell / CMD or WSL | Configure the environment that actually runs the CLI | ### Before you start: account, key, and model 1. [Register](https://icodeeasy.cc/register/), sign in, and copy your site key from [API Keys](https://icodeeasy.cc/dashboard/keys). Do not use your account password. 2. Choose and save an endpoint for the model family under [Endpoint selection](https://icodeeasy.cc/dashboard/endpoints). See [Getting Started](https://icodeeasy.cc/en/docs/getting-started/) for the account flow. 3. Review [prices, balance, and usage](https://icodeeasy.cc/en/docs/pricing-balance-and-usage/) and [model capabilities](https://icodeeasy.cc/en/docs/model-capabilities/) for model IDs, conditions, and protocol support. Installing a client does not supply API credit or model access. Keep the key in your own client configuration. Do not commit it or include it in public screenshots. Rotate an exposed key on the API Keys page. ### Step 1: Install Claude Code Choose either the native installer or npm. For Node.js and terminal preparation required by npm, see [Environment Setup](https://icodeeasy.cc/en/docs/env-setup/). **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 The environment variables below apply only to Claude Code CLI. Desktop does not read this `ANTHROPIC_BASE_URL` or the CLI `settings.json`; use its separate settings below. #### Linux / MacOS Run these commands in your current shell. To keep them for later sessions, add them to the appropriate `~/.bashrc` or `~/.zshrc` for that shell. Replace the key placeholder with your API key: ```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 -not [string]::IsNullOrWhiteSpace([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`. ### Check what the CLI process will read On macOS / Linux / WSL, check for a key without printing it: ```bash [ -n "$ANTHROPIC_AUTH_TOKEN" ] && echo "Token configured" || echo "Token missing" printf '%s\n' "$ANTHROPIC_BASE_URL" ``` On Windows, check the process environment in a newly opened PowerShell window: ```powershell -not [string]::IsNullOrWhiteSpace($env:ANTHROPIC_AUTH_TOKEN) $env:ANTHROPIC_BASE_URL ``` The first result should be `True`, and the address should match your chosen domain. If the saved user variable exists but this check returns `False`, the launching process has not refreshed its environment. An IDE terminal can inherit old values from the editor; fully close and reopen the editor as needed. WSL uses a Linux environment. Variables saved in Windows PowerShell still need to be configured inside your WSL shell using the Linux steps. Use the domain as Base URL; do not append the `/v1/messages` request path. --- ### Step 3: Start Claude Code First check the installed version in your terminal: ```bash claude --version ``` ```bash cd your-project-folder claude ``` After launch, enter `/status` to inspect the current model, account, credential source, and gateway URL. This checks configuration; it does not replace verification with an actual request. Send one short question, confirm a reply, and check the model, status, and usage in [request logs](https://icodeeasy.cc/dashboard/logs). A completed installation, a working CLI prompt, or a present key alone does not prove that an API request succeeded. ### Claude Code troubleshooting | Symptom | Check first | Next step | | --- | --- | --- | | `claude` is missing or will not start | Installation completion and refreshed PATH | Reopen the terminal; check whether you installed in Windows or WSL | | 401 / authentication failed | A valid site key in the current process; old authentication settings | Check or rotate the key in API Keys and reopen the terminal without printing it | | 403 / permission denied | Error text, endpoint selection, account and model conditions | Follow the specific error; retain a redacted copy rather than inferring the cause from the code alone | | 429 / rate limit | Error text, concurrent requests, account status | Pause repeated retries, reduce concurrency, and check balance and limits | | Timeout or connection failure | Actual Base URL, proxy, DNS, and connectivity | Change one factor at a time; try the JP / SG backup domains below | | New variables still use an old key or address | Terminal, IDE, and launcher environment | Exit the client, refresh the launching environment, and check for duplicate configuration | | Unexpected login prompt | CLI setup versus Desktop setup; mixed authentication | Follow the matching client section and verify the current environment and authentication source | Backup addresses are `https://jp.icodeeasy.cc` and `https://sg.icodeeasy.cc`; keep the same site key. Switching hosts is a connection recovery step, not an account or model change. See [Connection and Recovery](https://icodeeasy.cc/en/docs/connection-and-recovery/) for more checks. For support, include the client version, OS, Beijing time, redacted error text, and request identifier. Do not send your API key or a full environment dump. ### Use Kimi or GLM in Claude Code The client, API address, and model name are separate choices. Setting Base URL alone does not select Kimi or GLM. Follow the [Kimi guide](https://icodeeasy.cc/en/docs/kimi/) or [GLM guide](https://icodeeasy.cc/en/docs/glm/) to configure the model and verify the selection after launch. Consult those guides and the capability catalog for current conditions. --- ### Claude Desktop Configuration Claude Desktop can connect to a third-party gateway through Developer Mode. Desktop uses separate third-party inference settings and does not inherit the CLI variables above. Menu availability depends on the installed version. Model use also depends on the site catalog and endpoint conditions; entering a model name alone does not verify compatibility. #### 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-5` or `claude-sonnet-5-5`, save, and restart Claude Desktop. Claude models can use the Claude endpoints. For Kimi and GLM model setup, see the [Kimi guide](https://icodeeasy.cc/en/docs/kimi/) and [GLM guide](https://icodeeasy.cc/en/docs/glm/). To pin Claude Fable 5, see the [Claude Fable 5 Guide](https://icodeeasy.cc/en/docs/claude-fable-5/). ### Official references - [Installation and updates](https://code.claude.com/docs/en/setup) - [Environment variables](https://code.claude.com/docs/en/env-vars) - [Model configuration](https://code.claude.com/docs/en/model-config) - [Third-party gateways and Desktop](https://code.claude.com/docs/en/llm-gateway-connect#desktop-app) ## 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-10-28 ## 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-6.1-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 ``` `gpt-6.1-sol` is the current mainstay Codex model on this site. For maximum capability, set `model` to the flagship `gpt-6-astra` and keep every other field unchanged. Existing `gpt-5.6-sol` configurations still work but are no longer recommended. 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-6.1-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 ``` `gpt-6.1-sol` is the current mainstay Codex model on this site. For maximum capability, set `model` to the flagship `gpt-6-astra` and keep every other field unchanged. Existing `gpt-5.6-sol` configurations still work but are no longer recommended. 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-10-13 ## 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.8-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.8-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` | | Deprecated (served by `gemini-3.8-flash`) | `gemini-3.7-flash`, `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. As of 2026-10-13, `gemini-3.7-flash`, `gemini-3.6-flash`, and `gemini-3.5-flash` are deprecated by Google: requests sent under these three names are still accepted here, but they are transparently served by `gemini-3.8-flash`, the model name in responses is `gemini-3.8-flash`, and billing follows the 3.8 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.8-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.8-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.8-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/typesafe-systemone/ Title: TypeSafe Jev / System One API Guide Description: Call the fixed TypeSafe Jev 1.14 model for text, images, Box, and 262K context through System One, with input-only billing and experimental limits. Last modified: 2026-10-25 ## TypeSafe Jev / System One API TypeSafe Jev makes probabilistic decisions about text, structured data, and images. A request can combine `noul`, `choice`, and `score` questions; Jev 1.14 also supports Box localization. It is not a general chat-completion API and does not provide Chat tool calling. ### Endpoint, authentication, and fixed model ``` POST https://api.icodeeasy.cc/v1/systemone Authorization: Bearer Content-Type: application/json ``` Only TypeSafe Jev 1.14 is public, with the fixed model ID `jev-1.14.0`. Aliases that can move between releases are not offered: | Model ID | Image input | Box | 262K long context | | --- | --- | --- | --- | | `jev-1.14.0` | Supported | Supported | Supported | `jev-latest`, `jev-preview`, and other model names are outside this public catalog. Responses are non-streaming JSON. Do not send `stream`, and do not use System One as `/v1/chat/completions`, `/v1/messages`, or `/v1/responses`. ### Text and structured state `state` can be a string, object, or array. You name each question, and the response reuses those names and their question types under `answers`. This request combines a yes/no decision, a fixed choice, and an ordered score: ```bash curl --request POST 'https://api.icodeeasy.cc/v1/systemone' \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "model": "jev-1.14.0", "state": "I was charged twice for my subscription. Please refund the extra charge today.", "questions": { "is_billing": { "type": "noul", "instructions": "Is this message about billing?" }, "department": { "type": "choice", "instructions": "Which team should handle this request?", "criteria": { "billing": "Duplicate charges, invoices, refunds, and payment failures", "technical": "Product functionality and technical troubleshooting", "other": "Requests outside billing and technical support" } }, "urgency": { "type": "score", "instructions": "How urgent is the request?", "criteria": [ "No deadline and no immediate impact", "Needs attention soon but service remains usable", "Immediate financial or service impact requires urgent handling" ] } } }' ``` A `noul` answer is a yes/no probability from 0 to 1. `choice` returns an option and its probability distribution. `score` returns a position between levels, probabilities, and confidence information. Neither probability nor confidence guarantees correctness; set thresholds against your own samples. The response also contains the actual `model` and `usage.input_tokens` / `usage.output_tokens`. Validate the model, answer keys, and types before acting on the result. ### SDK compatibility When using the official TypeSafe SDK for text calls, explicitly set `compression: false`; do not rely on the default compression negotiation. Image requests currently support only the JSON + Base64 form shown in this guide. The SDK's default multipart image upload is not supported. For images, construct the HTTP request shown here instead of using SDK image objects or its default file-upload flow. ### PNG / JPEG image input Every image request must explicitly include `TypeSafe-Danger-Zone-Images: true`. This example sends a PNG as Base64 JSON. `photo-001` is a request-local reference and must appear in `state`, question instructions, or criteria. For JPEG, set `format` to `jpg` or `jpeg`. ```bash curl --request POST 'https://api.icodeeasy.cc/v1/systemone' \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --header 'TypeSafe-Danger-Zone-Images: true' \ --data '{ "model": "jev-1.14.0", "state": {"photo": "photo-001"}, "assets": { "photo-001": { "type": "image", "format": "png", "data_base64": "" } }, "questions": { "mug_visible": { "type": "noul", "instructions": "Is there a coffee mug in `photo`?" } } }' ``` Do not include a `data:` prefix or line breaks in Base64. Images must be still PNG/JPEG files, at most 16 MiB each after decoding, with both width and height between 280 and 1568 pixels. The complete request body is limited to 32 MiB. Images are not resized into compliance, and any invalid asset fails the whole request. Image tokens are included in `usage.input_tokens`. ### Box localization (Jev 1.14 only) Box is experimental. Requests must include `TypeSafe-Danger-Zone-Images: true` and use the public fixed version `jev-1.14.0`. Box takes no `criteria`. Add a companion `noul` question to check whether the target exists: ```json { "model": "jev-1.14.0", "state": {"photo": "photo-001"}, "assets": { "photo-001": { "type": "image", "format": "jpeg", "data_base64": "" } }, "questions": { "mug_visible": { "type": "noul", "instructions": "Is there a coffee mug in `photo`?" }, "mug": { "type": "box", "instructions": "the coffee mug in `photo`" } } } ``` Send this JSON body to the same endpoint with the authentication, JSON, and Images headers. Box answers contain `top`, `bottom`, `left`, and `right` as 0–1 fractions of image height and width; multiply them by pixel dimensions to obtain pixel coordinates. A box can still be returned when the target is absent, so combine it with the presence answer and confidence rather than treating it as an exact detector. ### 262K long context Jev 1.14 supports the long-context tier. Defaults are 64K per request and 32K per question. To select the 262K tier, explicitly add this header to that request: ``` TypeSafe-Danger-Zone-Long-Context: true ``` ```bash curl --request POST 'https://api.icodeeasy.cc/v1/systemone' \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --header 'TypeSafe-Danger-Zone-Long-Context: true' \ --data '{ "model": "jev-1.14.0", "state": "", "questions": { "has_early_termination": { "type": "noul", "instructions": "Does the state include a clause allowing either party to terminate early?" } } }' ``` With the header, both per-request and per-question limits use the 262K tier. Long context has no price multiplier, but it is usually slower. Evaluate decision quality on your own long and non-English inputs; a successful short request does not prove the exact 262K boundary or preservation of both ends of a long document. ### Billing and experimental boundaries - The official base price is **$0.042 / MTok input**. The current effective site price is **¥0.30 / MTok input**, and output is **0**. Charge formula: `usage.input_tokens × ¥0.30 / 1,000,000`. - Output tokens appear in `usage` but are currently free. There is no separate cache read/write price and no long-context surcharge. Image tokens are billed as input tokens. - System One is a non-streaming structured-decision API. It has no Chat tool calling and is not part of the Chat playground. - Images and Box are experimental. Request shapes, answers, and limits can change between releases; Box belongs only to 1.14. Test your own images, languages, thresholds, and failure cases before production use. - Long context is not unlimited input. Context, request-body, image, and rate limits still apply. Keep fixed-version, response-model, answer-shape, and `usage` validation in your integration. See the [pricing page](https://icodeeasy.cc/en/dashboard/pricing/) for current prices and the [model capability catalog](https://icodeeasy.cc/en/docs/model-capabilities/) for capability status. ## 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-11-09 ## Model Capability Catalog Verified on: 2026-11-09. 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 · video_input: Not supported. Depends on the compatible endpoint and request format | | 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 · video_input: Not supported. Depends on the compatible endpoint and request format | | Claude Sonnet 5.5 · `claude-sonnet-5-5` | anthropic_messages, anthropic_count_tokens | claude_code, cursor, cherry_studio, trae | streaming: Supported · tool_calling: Supported · image_input: Conditional · video_input: Not supported. Depends on the compatible endpoint and request format | | Claude Sonnet 5 · `claude-sonnet-5` | anthropic_messages, anthropic_count_tokens | claude_code, cursor, cherry_studio, trae | streaming: Supported · tool_calling: Supported · image_input: Conditional · video_input: Not supported. Depends on the compatible endpoint and request format | | 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 · video_input: Not supported. Depends on the compatible endpoint and request format | | GPT-6.1 Sol · `gpt-6.1-sol` | 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 | | GPT-6.1 Terra · `gpt-6.1-terra` | responses | codex, vscode_codex | streaming: Supported · tool_calling: Supported · image_input: Not published · video_input: Not supported | | 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 · video_input: Not supported. Depends on the compatible endpoint and request format | | 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 · video_input: Not supported. Depends on the compatible endpoint and request format | | Gemini 4 Argon · `gemini-4-argon` | gemini_generate_content, gemini_stream_generate_content | gemini_cli, cherry_studio, trae | streaming: Supported · tool_calling: Conditional · image_input: Conditional · video_input: Conditional. Depends on the compatible protocol and request format; Depends on the compatible endpoint and request format | | Gemini 3.8 Flash · `gemini-3.8-flash` | gemini_generate_content, gemini_stream_generate_content | gemini_cli, cherry_studio, trae | streaming: Supported · tool_calling: Conditional · image_input: Conditional · video_input: Conditional. Depends on the compatible protocol and request format; Depends on the compatible endpoint and request format | | GLM 5.3 FlashX · `glm-5.3-flashx` | chat_completions, anthropic_messages, responses | codex, claude_code, cursor, cherry_studio, trae, openai_sdk | streaming: Supported · tool_calling: Supported · image_input: Not published · video_input: Not published | | 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 | | 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 · image_input: Not published · video_input: Not supported. Depends on the compatible protocol and request format | | MiniMax M3 · `MiniMax-M3` | chat_completions, anthropic_messages, anthropic_count_tokens | claude_code, cursor, cherry_studio, trae | streaming: Supported · tool_calling: Conditional · image_input: Not published · video_input: Not supported. Depends on the compatible protocol and request format | | 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 · image_input: Not published · video_input: Not supported. Depends on the compatible protocol and request format | | Kimi K3.1 Pro · `k3.1-pro` | chat_completions, anthropic_messages, anthropic_count_tokens, responses, responses_compact | codex, claude_code, cursor, cherry_studio, trae | streaming: Supported · tool_calling: Supported · image_input: Supported · video_input: Supported | | Kimi K3.1 Pro Highspeed · `k3.1-pro-highspeed` | chat_completions, anthropic_messages, anthropic_count_tokens, responses, responses_compact | codex, claude_code, cursor, cherry_studio, trae | streaming: Supported · tool_calling: Supported · image_input: Supported · video_input: Supported | | Kimi K3 · `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 | | Kimi K3 256K · `k3-256k` | 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 | | 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 · image_input: Supported · video_input: Not supported. Depends on the compatible protocol and request format | | TypeSafe Jev 1.14 · `jev-1.14.0` | systemone | typesafe_sdk | streaming: Not supported · tool_calling: Not supported · image_input: Supported · video_input: Not supported · Limits: Input: 262K context with long-context header; PNG/JPEG; Box supported | ### 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 · Resolutions: 1k, 2k, 4k | | 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 | | Seedream 5 Flash · `seedream-5-0-flash` | images_generations | openai_sdk, cherry_studio, trae | text_to_image: Supported · image_to_image: Conditional · image_editing: Not published · reference_images: Conditional. Requires valid reference images in a supported request format · Limits: Reference images: up to 8 · Resolutions: 1K, 1.5K, 2K · Aspect ratios: 1:1, 4:3, 3:4, 16:9, 9:16, 3:2, 2:3, 2:1, 1:2, 21:9 | | Seedream 5 Pro · `seedream-5-0-pro` | images_generations | openai_sdk, cherry_studio, trae | text_to_image: Supported · image_to_image: Conditional · image_editing: Not published · reference_images: Conditional. Requires valid reference images in a supported request format · Limits: Reference images: up to 8 · Resolutions: 1K, 1.5K, 2K · Aspect ratios: 1:1, 4:3, 3:4, 16:9, 9:16, 3:2, 2:3, 2:1, 1:2, 21:9 | | Seedream 4.5 · `seedream-4-5` | images_generations | openai_sdk, cherry_studio, trae | text_to_image: Supported · image_to_image: Conditional · image_editing: Not published · reference_images: Conditional. Requires valid reference images in a supported request format · Limits: Reference images: up to 8 · Resolutions: 2K, 4K · Aspect ratios: 1:1, 4:3, 3:4, 16:9, 9:16, 3:2, 2:3, 2:1, 1:2, 21:9, 9:21 | | Seedream 4.0 · `seedream-4-0` | images_generations | openai_sdk, cherry_studio, trae | text_to_image: Supported · image_to_image: Conditional · image_editing: Not published · reference_images: Conditional. Requires valid reference images in a supported request format · Limits: Reference images: up to 8 · Resolutions: 1K, 2K, 4K · Aspect ratios: 1:1, 4:3, 3:4, 16:9, 9:16, 3:2, 2:3, 2:1, 1:2, 21:9, 9:21 | | 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 · image_editing: Not published · reference_images: Conditional. Requires valid reference images in a supported request format | | FLUX 2 Pro · `flux-2-pro` | images_generations | openai_sdk, cherry_studio, trae | text_to_image: Supported · image_to_image: Conditional · image_editing: Not published · reference_images: Conditional. Requires valid reference images in a supported request format | | FLUX 3 Image · `flux-3-image` | images_generations | openai_sdk, cherry_studio, trae | text_to_image: Supported · image_to_image: Conditional · image_editing: Not published · reference_images: Conditional. Requires valid reference images in a supported request format · Limits: Reference images: up to 8 · Resolutions: 768sq, 1k, 1.5k, 2k, 4k · Aspect ratios: 1:1, 9:16, 16:9, 2:3, 3:2, 4:5, 5:4 | | FLUX 3 Image Klein · `flux-3-image-klein` | images_generations | openai_sdk, cherry_studio, trae | text_to_image: Supported · image_to_image: Conditional · image_editing: Not published · reference_images: Conditional. Requires valid reference images in a supported request format · Limits: Reference images: up to 8 · Resolutions: 768sq, 1k, 1.5k, 2k, 4k · Aspect ratios: 1:1, 9:16, 16:9, 2:3, 3:2, 4:5, 5:4 | | 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 | | Kling 4 · `kling-v4` | 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 · Durations: 3, 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 · Aspect ratios: 16:9, 9:16, 1:1, 21:9 · Reference images: up to 8 | | 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 | | flux-3-video · `flux-3-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: Supported · last_frame: Supported · reference_images: Supported · video_input: Supported · audio: Supported · Limits: Resolutions: hd, fhd · Aspect ratios: auto, 21:9, 2:1, 16:9, 4:3, 1:1, 3:4, 9:16 · Reference images: up to 10 · Durations: 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 · Input: Site images ≤10 MB; videos ≥3s. One video ≤30s. Owned completed HD draft enhancement; ordered first/intermediate/last keyframes, duplicates preserved. | | viduq4-preview · `viduq4-preview` | videos_generations_async, video_task_read, video_task_content, video_task_delete | video_api | text_to_video: Not supported · image_to_video: Supported · first_frame: Supported · last_frame: Not supported · reference_images: Supported · video_input: Not supported · audio: Supported · Limits: Resolutions: 540p, 720p, 1080p, 2K, 4K · Aspect ratios: 1:1, 9:16, 16:9, 3:4, 4:3 · Reference images: up to 15 · Durations: 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 · Input: Site images ≤10 MB; videos ≥3s. No video input. No audio reference upload. No supplier task IDs. | | viduq3 · `viduq3` | videos_generations_async, video_task_read, video_task_content, video_task_delete | video_api | text_to_video: Not supported · image_to_video: Supported · first_frame: Not supported · last_frame: Not supported · reference_images: Supported · video_input: Not supported · audio: Not published · Limits: Resolutions: 540p, 720p, 1080p · Aspect ratios: 1:1, 9:16, 16:9, 3:4, 4:3 · Reference images: up to 7 · Durations: 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 · Input: Site images ≤10 MB; videos ≥3s. No video input. No audio reference upload. No supplier task IDs. | | viduq3-mix · `viduq3-mix` | videos_generations_async, video_task_read, video_task_content, video_task_delete | video_api | text_to_video: Not supported · image_to_video: Supported · first_frame: Not supported · last_frame: Not supported · reference_images: Supported · video_input: Not supported · audio: Not published · Limits: Resolutions: 720p, 1080p · Aspect ratios: 1:1, 9:16, 16:9, 3:4, 4:3 · Reference images: up to 7 · Durations: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 · Input: Site images ≤10 MB; videos ≥3s. No video input. No audio reference upload. No supplier task IDs. | | viduq3-pro · `viduq3-pro` | 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: Not supported · video_input: Not supported · audio: Supported · Limits: Resolutions: 540p, 720p, 1080p · Aspect ratios: 1:1, 9:16, 16:9, 3:4, 4:3 · Reference images: up to 2 · Durations: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 · Input: Site images ≤10 MB; videos ≥3s. No video input. No audio reference upload. No supplier task IDs. | | viduq3-turbo · `viduq3-turbo` | 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: Not supported · video_input: Not supported · audio: Supported · Limits: Resolutions: 540p, 720p, 1080p · Aspect ratios: 1:1, 9:16, 16:9, 3:4, 4:3 · Reference images: up to 2 · Durations: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 · Input: Site images ≤10 MB; videos ≥3s. No video input. No audio reference upload. No supplier task IDs. | | gemini-omni-1.1-flash · `gemini-omni-1.1-flash` | 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 · video_input: Supported · audio: Not published · Limits: Resolutions: 360p, 720p, 1080p, 4k · Aspect ratios: 16:9, 9:16 · Reference images: up to 10 · Input: Prompt controls output length (3–10s); no duration/audio request fields. Reference output estimate excludes media/context; actual usage settlement. · Input: Site images ≤10 MB; videos ≥3s. One video ≤10s. No audio reference upload. No supplier task IDs. | | gemini-omni-flash-preview · `gemini-omni-flash-preview` | 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 · video_input: Supported · audio: Not published · Limits: Resolutions: 720p · Aspect ratios: 16:9, 9:16 · Reference images: up to 16 · Input: Prompt controls output length (3–10s); no duration/audio request fields. Reference output estimate excludes media/context; actual usage settlement. · Input: Site images ≤10 MB; videos ≥3s. One video ≤24s. No audio reference upload. No supplier task IDs. | | gemini-omni-1.1-flash-ext · `gemini-omni-1.1-flash-ext` | 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: Not supported · reference_images: Supported · video_input: Not supported · audio: Not published · Limits: Resolutions: 360p, 720p, 1080p, 4k · Aspect ratios: 16:9, 9:16 · Reference images: up to 3 · Durations: 4, 6, 8, 10 · Input: Site images ≤10 MB; videos ≥3s. No video input. No audio reference upload. No supplier task IDs. | ### Compatibility aliases and retired redirects An old request ID on the left is served as the current ID on the right. Aliases stay usable. A retired redirect is a name that is no longer sold. - `claude-opus-4-5`, `claude-opus-4-5-20251101`, `claude-opus-4-6`, `claude-opus-4-7`, `claude-opus-4-8` → `claude-opus-5-5` (Retired redirect) - `opus4.8` → `claude-opus-5-5` (Alias) - `opus5` → `claude-opus-5` (Alias) - `claude-sonnet-4-5`, `claude-sonnet-4-5-20250514`, `claude-sonnet-4-5-20250929`, `claude-sonnet-4-6` → `claude-sonnet-5-5` (Retired redirect) - `gpt-6-sol`, `gpt-6-luna`, `gpt-5.6-terra`, `gpt-5.6-luna`, `gpt-5.6-sol`, `gpt-5.6-sol-272k` → `gpt-6.1-sol` (Retired redirect) - `gpt-6`, `gpt-5.6`, `gpt-5`, `gpt-5.1`, `gpt-5-mini`, `gpt-5.4`, `gpt-5.4-mini` → `gpt-6.1-sol` (Alias) - `grok-4.5` → `grok-4.6` (Alias) - `gemini-3.7-flash`, `gemini-3.6-flash`, `gemini-3.5-flash`, `gemini-3-flash`, `gemini-3-flash-preview`, `gemini-3.1-flash-lite`, `gemini-3.1-flash-lite-preview` → `gemini-3.8-flash` (Retired redirect) - `glm-5.1`, `glm-5.2` → `glm-5.3` (Alias) - `doubao-seed-2.0-pro` → `doubao-seed-2.1-turbo` (Alias) - `kimi-k3.1-pro` → `k3.1-pro` (Alias) - `kimi`, `kimi-k2.5`, `kimi-k2.6`, `kimi-k2.7`, `kimi-k2.8`, `kimi-2.8`, `kimi-k2.7-code`, `kimi-for-coding` → `k3.1-pro` (Retired redirect) - `kimi-k3.1-pro-highspeed` → `k3.1-pro-highspeed` (Alias) - `kimi-for-coding-highspeed`, `kimi-k2.7-code-highspeed` → `k3.1-pro-highspeed` (Retired redirect) - `kimi-k3`, `k3[1m]` → `k3` (Alias) - `kimi-k3-256k` → `k3-256k` (Alias) - `deepseek-v4.1-flash` → `deepseek-flash` (Alias) - `deepseek-v4-flash`, `deepseek-v4-flash-vision-exp` → `deepseek-flash` (Retired redirect) - `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-10-30 ## FAQ ### Q: Can one API key configure multiple clients? Yes. The three clients share one key, but each has its own environment variables and config file. See [one key, multiple clients](https://icodeeasy.cc/en/docs/one-key-multiple-clients/). ### Q: Where can I check current prices, balance, and usage? Prices, balance, request logs, and usage details are listed in [pricing, balance, and usage](https://icodeeasy.cc/en/docs/pricing-balance-and-usage/). Use the unit price shown on the page at that time. ### Q: How are API request data and privacy handled? Bodies are used for that request's routing and billing and are not kept long term. Usage, status, and security logs are kept. See [API data and privacy](https://icodeeasy.cc/en/docs/api-data-and-privacy/) and the [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? Use [connection and recovery](https://icodeeasy.cc/en/docs/connection-and-recovery/) first to rule out 401, 403, and 429. After you confirm the network is slow, change the Base URL to `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.