WinRouter 的 Key 应该填在哪里?
在支持自定义 API Provider 的客户端中,将 Key 填到 API Key 字段;curl 中则放在 Authorization 或 x-api-key 请求头里。示例中的 sk-xxx 必须替换。
OpenAI 兼容和 Claude Code 配置有什么区别?
GPT、gpt-image-2.5-flare 和 Claude messages CURL 使用 https://api.winrouter.ai/v1;Claude Code 的 ANTHROPIC_BASE_URL 使用 https://api.winrouter.ai,不带 /v1。
Claude 桌面端可以使用吗?
可以。Claude Desktop 启用 Developer Mode 后,在 Configure Third-Party Inference... 中选择 Gateway,填写 WinRouter Gateway base URL、Static API Key 和 x-api-key auth scheme,Test Model Discovery 后 Apply Changes 并重启即可。
Codex 设置后为什么没有生效?
Codex 桌面端通常需要重启后读取 config.toml。Claude Code 需要从已加载环境变量的终端启动。
通过接口访问时如何提高缓存命中、降低成本?
核心是保持可复用前缀稳定:同一任务使用固定 session_id / conversation_id,可通过 X-Session-Id 等 Header 透传;系统提示词、工具定义和项目背景放在请求前部,动态内容放在末尾。参考 OpenAI Prompt caching 和 Anthropic Prompt caching。
如何确认模型 ID 是否正确?
Filter the live pricing table on the homepage by provider and copy the model ID. Availability and pricing depend on the selected channel and current information.
Live model pricing