XuanShu API

How do I connect Claude Code to XuanShu API?

Yes. Configure the Anthropic-compatible endpoint and API key to use the Messages API.

Last verified:

How do I connect Claude Code to XuanShu API?

Yes. Configure the Anthropic-compatible endpoint and API key to use the Messages API.

Steps

  1. Create or select an API key in the console.
  2. Set ANTHROPIC_BASE_URL=https://www.xuanshuapi.com and ANTHROPIC_API_KEY.
  3. Check the current Claude models, then verify with a small request.

Limits and exceptions

Claude Code or upstream behavior may change environment variables or features; model availability depends on the current key and console.