Choosing a Protocol
Choosing a Protocol
Chuizi.AI currently exposes three public protocol entrypoints. Authentication, balance, rate limits, and billing are shared. Choose the protocol that matches your SDK or tool.
| Situation | Protocol | Base URL |
|---|---|---|
| OpenAI SDK, LangChain, most tools | OpenAI compatible | https://api.chuizi.ai/v1 |
| Claude Code, Cursor, Cline, OpenCode | Anthropic compatible | https://api.chuizi.ai/anthropic |
| Google AI / Gemini SDK | Gemini compatible | https://api.chuizi.ai/gemini |
OpenAI Example
terminal
bash
curl -X POST https://api.chuizi.ai/v1/chat/completions \ -H "Authorization: Bearer ck-your-key" \ -H "Content-Type: application/json" \ -d '{"model":"openai/gpt-4.1","messages":[{"role":"user","content":"Hello"}]}'
Anthropic Example
terminal
bash
curl -X POST https://api.chuizi.ai/anthropic/v1/messages \ -H "x-api-key: ck-your-key" \ -H "anthropic-version: 2023-06-01" \ -H "Content-Type: application/json" \ -d '{"model":"claude-sonnet-4-6","max_tokens":1024,"messages":[{"role":"user","content":"Hello"}]}'
Gemini Example
terminal
bash
curl -X POST "https://api.chuizi.ai/gemini/v1beta/models/gemini-2.5-flash:generateContent" \ -H "x-goog-api-key: ck-your-key" \ -H "Content-Type: application/json" \ -d '{"contents":[{"role":"user","parts":[{"text":"Hello"}]}]}'
Protocol compatibility does not expose sensitive routing details publicly. The gateway may handle authentication, permissions, billing, routing, and format adaptation behind the scenes while the client keeps using the documented protocol.