Compatibility
One HOYOAI key and host serve multiple vendor protocols.
Hosts
| Client | Typical Base URL |
|---|---|
| OpenAI SDK / most libraries | https://api.hoyoai.cn/v1 |
Clients that forbid /v1 | https://api.hoyoai.cn |
| Anthropic / Claude Code | usually https://api.hoyoai.cn |
| Gemini-native clients | https://api.hoyoai.cn (path per client) |
Protocols
| Protocol | Path | Typical clients |
|---|---|---|
| Chat Completions | POST /v1/chat/completions | OpenAI SDK, Cursor |
| Completions | POST /v1/completions | Legacy |
| Responses | POST /v1/responses | Agents / Responses |
| Images | POST /v1/images/generations | Image gen |
| Models | GET /v1/models | Listing |
| Messages | POST /v1/messages | Claude Code |
| Gemini native | e.g. /v1beta/models/{model}:generateContent | Gemini CLI |
Prefer Chat Completions to validate keys first. Do not send other aggregators’ proprietary headers or routing fields — they are not part of HOYOAI. Model slugs may differ from official vendor catalogs; use the HOYOAI marketplace.

