Providers
Base URL recommendations
Section titled “Base URL recommendations”For OpenAI-compatible relay services, the safest Base URL is usually the provider endpoint with /v1 included.
Examples:
https://example.com/v1https://api.example.com/v1Clash for AI has compatibility handling for model list requests, but using the documented /v1 Base URL is still the clearest setup for end users.
Model list behavior
Section titled “Model list behavior”Different relay services expose model lists differently.
Common issues:
- The provider may not expose a model list endpoint at all.
- The provider may only respond at
/v1/models, not/models. - The returned JSON may differ from standard OpenAI-compatible formats.
Because of this, model list fetching should be treated as a compatibility feature, not as a guaranteed capability of every relay provider.
Authentication notes
Section titled “Authentication notes”Clash for AI currently focuses on OpenAI-compatible and Anthropic-compatible upstream integrations.
That means:
- OpenAI-style
Authorization: Bearer ...flows are supported. - Anthropic-style
x-api-keyflows are supported. - Gemini native protocol is not currently supported as a first-class upstream protocol.