XuanShu API

How do I connect Gemini CLI to XuanShu API?

Use Gemini v1beta paths, the public endpoint, and x-goog-api-key authentication.

Last verified:

How do I connect Gemini CLI to XuanShu API?

Use Gemini v1beta paths, the public endpoint, and x-goog-api-key authentication.

Steps

  1. Get a key from the console.
  2. Set GEMINI_API_KEY and GOOGLE_GEMINI_BASE_URL=https://www.xuanshuapi.com.
  3. Use Models to verify the model and generateContent or streamGenerateContent action.

Limits and exceptions

Gemini CLI versions and actions may change; do not add the OpenAI /v1 prefix to native Gemini paths.