Docs · Providers

SiliconFlow in Claude Code and Codex

SiliconFlow (硅基流动) serves open models such as DeepSeek, GLM, Kimi and Qwen on one API key, over OpenAI's Chat Completions. Claude Code wants Anthropic Messages and Codex wants Responses, and SiliconFlow serves neither; magpie's local gateway on 127.0.0.1:3425 converts between them, so these tools use SiliconFlow's models directly.

Add SiliconFlow

  1. Add the providerOn Providers, click + Add provider, pick SiliconFlow, set the key to China or Global, paste the key and save.
  2. Pick it for a toolOn Agents, pick a model such as deepseek-ai/DeepSeek-V4-Pro on a tool's row.
Terminal
magpie claude siliconflow/deepseek-ai/DeepSeek-V4-Pro
magpie codex siliconflow/zai-org/GLM-5.3
magpie opencode siliconflow/moonshotai/Kimi-K3

China and Global

SiteChat CompletionsConsole
Chinahttps://api.siliconflow.cn/v1cloud.siliconflow.cn
Globalhttps://api.siliconflow.com/v1cloud.siliconflow.com

The Global site is another account, with keys and a balance (in $) of its own; a China key doesn't work there. Each key in the provider names its site, so keys from both can share one provider.

Models

SiliconFlow's model names carry their maker, and go into magpie and your tools as written: deepseek-ai/DeepSeek-V4-Pro, deepseek-ai/DeepSeek-V4-Flash, zai-org/GLM-5.3, moonshotai/Kimi-K3, moonshotai/Kimi-K2.7-Code, Qwen/Qwen3-Coder-480B-A35B-Instruct, meituan-longcat/LongCat-2.0. magpie takes their names, context and prices from models.dev's siliconflow catalog. On the command line, write siliconflow/ then the name.

In each agent

Balance

SiliconFlow retired its balance query, /v1/user/info, on 2026-08-14 (it answers 410) with nothing in its place yet, and its old granted balance is a voucher now. So magpie's usage card says where the balance is shown instead of an amount, and its button opens that site's console. A key refused for itself (401) is said as it came.

FAQ

How do I use SiliconFlow in Claude Code?

Add SiliconFlow in magpie with your key, then pick a model such as deepseek-ai/DeepSeek-V4-Pro on Claude Code's row, or run magpie claude siliconflow/deepseek-ai/DeepSeek-V4-Pro. SiliconFlow has no Anthropic endpoint, so magpie converts Claude Code's requests to Chat Completions.

Does SiliconFlow work in Codex?

Yes. SiliconFlow has Chat Completions only, so magpie converts Codex's Responses requests, custom tools like apply_patch included. Run magpie codex siliconflow/zai-org/GLM-5.3.

Does a China key work on the Global site?

No. cloud.siliconflow.com is another account, with its own keys and balance. Set each key's site to China or Global in magpie.

Why doesn't magpie show my SiliconFlow balance?

SiliconFlow retired its balance API on 2026-08-14 and has no new one yet. magpie's card takes you to the console, where the balance and vouchers are shown.

The same for other providers: ModelScope, Volcengine Ark, GLM Coding Plan, Kimi, DeepSeek, Qwen. Hit an error? See troubleshooting, or ask on Discord.