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.

SituationProtocolBase URL
OpenAI SDK, LangChain, most toolsOpenAI compatiblehttps://api.chuizi.ai/v1
Claude Code, Cursor, Cline, OpenCodeAnthropic compatiblehttps://api.chuizi.ai/anthropic
Google AI / Gemini SDKGemini compatiblehttps://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.

Choosing a Protocol — Chuizi AI Docs | Chuizi AI