Skip to content
Need an API key for this client? One token for Claude, GPT-6.2, Gemini 4 & DeepSeek V4 — top up via USDT or Alipay

Connect Zed Editor to byesu API ​

Key facts: Zed's ~/.config/zed/settings.json supports both native Anthropic ("api_url": "https://byesu.com", no /v1 — preserving 0.1x Claude prompt cache reads & thinking blocks) and OpenAI-compatible ("api_url": "https://byesu.com/v1") simultaneously using a single auto group sk-... key.

Zed is a GPU-accelerated, Rust-native code editor with a built-in Agent Panel, Inline Assistant, and MCP tool integration. Unlike editors that funnel every custom key through an OpenAI translation wrapper, Zed lets you wire native /v1/messages for Claude 5.5 right alongside OpenAI-compatible /v1 for GPT-6.2, Gemini 4 Argon, and DeepSeek V4 Pro in one clean JSON file.

Dual-protocol advantage on one key

  • language_models.anthropic.api_url: https://byesu.com (do not add /v1 — preserves native cache_control 0.1x reads & thinking blocks)
  • language_models.openai.api_url: https://byesu.com/v1 (with /v1 — unlocks gpt-6.2-sol, gemini-4-argon, deepseek-v4-pro)
  • Credential storage: OS Keychain via Zed's Agent Panel UI, or ANTHROPIC_API_KEY / ZED_ANTHROPIC_API_KEY + OPENAI_API_KEY env vars (one sk-... token from byesu Console works for both!)

Step 1: Copy-Ready ~/.config/zed/settings.json ​

Open Zed's configuration file (Cmd+, on macOS or Ctrl+, on Linux → ~/.config/zed/settings.json; on Windows %APPDATA%\Zed\settings.json) and merge the agent and language_models blocks below:

json
{
  "agent": {
    "default_model": {
      "provider": "anthropic",
      "model": "claude-sonnet-5-5"
    }
  },
  "language_models": {
    "anthropic": {
      "api_url": "https://byesu.com",
      "available_models": [
        {
          "name": "claude-opus-5-5",
          "display_name": "Claude Opus 5.5 (byesu)",
          "max_tokens": 200000,
          "max_output_tokens": 32000,
          "cache_configuration": {
            "max_cache_anchors": 4,
            "min_total_token": 1024,
            "should_speculate": true
          }
        },
        {
          "name": "claude-sonnet-5-5",
          "display_name": "Claude Sonnet 5.5 (byesu)",
          "max_tokens": 200000,
          "max_output_tokens": 16384,
          "cache_configuration": {
            "max_cache_anchors": 4,
            "min_total_token": 1024,
            "should_speculate": true
          }
        },
        {
          "name": "claude-fable-5-2",
          "display_name": "Claude Fable 5.2 Reasoning (byesu)",
          "max_tokens": 200000,
          "max_output_tokens": 32000,
          "cache_configuration": {
            "max_cache_anchors": 4,
            "min_total_token": 1024,
            "should_speculate": true
          }
        }
      ]
    },
    "openai": {
      "api_url": "https://byesu.com/v1",
      "available_models": [
        {
          "name": "gpt-6.2-sol",
          "display_name": "GPT-6.2 Sol (byesu)",
          "max_tokens": 400000,
          "max_output_tokens": 32768
        },
        {
          "name": "gpt-6.1-sol",
          "display_name": "GPT-6.1 Sol (byesu)",
          "max_tokens": 400000,
          "max_output_tokens": 32768
        },
        {
          "name": "deepseek-v4-pro",
          "display_name": "DeepSeek V4 Pro (byesu)",
          "max_tokens": 128000,
          "max_output_tokens": 16384
        },
        {
          "name": "gemini-4-argon",
          "display_name": "Gemini 4 Argon 1M (byesu)",
          "max_tokens": 1000000,
          "max_output_tokens": 16384
        }
      ]
    }
  }
}

Need a tailored block with fewer models? Generate one interactively in the AI Client & SDK Config Generator.

Step 2: Store Your sk-... Key in OS Keychain or Shell Env ​

Zed keeps secrets out of settings.json so you can safely track dotfiles in Git. Pick either method using an sk-... token created in the default auto group (Choosing a Group):

  1. Open the Agent Panel (Cmd+? on macOS or Ctrl+? on Linux/Windows) → click Configure (or run agent: open configuration from the Command Palette).
  2. Paste your sk-... token into Anthropic → API Key and press Enter.
  3. Paste the exact same sk-... token into OpenAI → API Key and press Enter. Zed saves both credentials in your system keychain.

Option B: Environment Variables (Great for CLI / Headless / Linux Launchers) ​

bash
# Add to ~/.zshrc or ~/.bashrc before launching `zed .`
export BYESU_API_KEY="sk-your-byesu-token"
export ANTHROPIC_API_KEY="$BYESU_API_KEY"
export ZED_ANTHROPIC_API_KEY="$BYESU_API_KEY"
export OPENAI_API_KEY="$BYESU_API_KEY"

Step 3: Tuning max_tokens, max_output_tokens, and cache_configuration ​

  • max_tokens vs max_output_tokens in Zed: In Zed's available_models schema, max_tokens declares the total context window used by Zed's token gauge, while max_output_tokens caps per-turn completion length. Setting max_output_tokens to 16384–32000 prevents truncated multi-file diffs during large Agent Panel edits.
  • Preserving 0.1x Claude prompt cache reads: When cache_configuration is set (max_cache_anchors: 4, min_total_token: 1024), Zed places Anthropic cache_control anchors on your system tools and conversation prefix. Because https://byesu.com forwards /v1/messages untouched, cached prefix tokens bill down to 0.1x — just watch out for 6–10 minute review pauses where Claude's default 5-minute TTL expires (see Claude 5m vs GPT 30m Prompt Cache TTL and Prompt Caching Guide).
  • Flexible funding: Top up your balance via USDT or Alipay with pay-as-you-go per-token billing and live console rates. Compare other developer environments in Cursor vs Claude Code vs Cline, Windsurf IDE, and Trae IDE.

Troubleshooting ​

  • 404 on Claude models in Zed: Check language_models.anthropic.api_url — it must be "https://byesu.com" without /v1. Adding /v1 produces /v1/v1/messages (Claude 404 fix).
  • 404 on GPT / DeepSeek / Gemini models: Check language_models.openai.api_url — it must include /v1 ("https://byesu.com/v1").
  • 401 authentication_error / invalid_api_key: Re-paste your sk-... key inside Agent Panel → Configure to overwrite any stale Keychain entry (Claude 401 fix, OpenAI 401 fix).
  • no available channel: Confirm your token belongs to auto (Glm or Kimi tokens are required only for glm-5.3 or kimi-k3; see no available channel).

FAQ ​

Why should I configure both language_models.anthropic and language_models.openai in Zed? ​

language_models.anthropic (https://byesu.com) gives Claude 5.5 native /v1/messages support — unlocking 0.1x cache_control reads and thinking blocks — while language_models.openai (https://byesu.com/v1) adds gpt-6.2-sol, deepseek-v4-pro, and gemini-4-argon to the same model dropdown on one key.

What is the exact URL difference between Zed's anthropic and openai blocks? ​

Use "https://byesu.com" (no /v1) under anthropic, and "https://byesu.com/v1" (with /v1) under openai.

Where does Zed store my API key so I do not commit secrets in settings.json? ​

Paste your sk-... token in Agent Panel → Configure (stored in your OS Keychain) or export ANTHROPIC_API_KEY / ZED_ANTHROPIC_API_KEY and OPENAI_API_KEY in your shell profile.

How do I enable Anthropic prompt caching inside Zed's settings.json? ​

Include "cache_configuration": { "max_cache_anchors": 4, "min_total_token": 1024, "should_speculate": true } inside each Claude model object under language_models.anthropic.available_models.

Got a problem? Contact support or join our group.