First Request
This page gives you three runnable integration paths. All of them use the same ck- API key, balance, and console logs.
OpenAI-Compatible Protocol
Use this for OpenAI SDKs, LangChain, LlamaIndex, n8n, Dify, workflow platforms, and most existing applications.
terminal
bash
curl https://api.chuizi.ai/v1/chat/completions \ -H "Authorization: Bearer ck-your-api-key" \ -H "Content-Type: application/json" \ -d '{ "model": "anthropic/claude-sonnet-4-6", "messages": [ {"role": "user", "content": "What is the capital of France?"} ] }'
Anthropic Native Protocol
Use this for Claude Code, Cline, OpenCode, and Anthropic SDKs. The request body stays in Anthropic Messages API format; Chuizi AI handles authentication, routing, billing, and logs.
terminal
bash
curl https://api.chuizi.ai/anthropic/v1/messages \ -H "x-api-key: ck-your-api-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": "What is the capital of France?"} ] }'
With the Anthropic native protocol, model names usually do not need the anthropic/ prefix.
Gemini Native Protocol
Use this for Gemini clients that support a custom Gemini Base URL.
terminal
bash
curl "https://api.chuizi.ai/gemini/v1beta/models/gemini-2.5-flash:generateContent" \ -H "x-goog-api-key: ck-your-api-key" \ -H "Content-Type: application/json" \ -d '{ "contents": [ {"role": "user", "parts": [{"text": "Explain Chuizi AI in one sentence"}]} ] }'
Verify the Request
After the request finishes, check app.chuizi.ai:
- Logs: model, status code, tokens, cost, latency
- Billing: actual deduction and balance changes
- Generation API: request-level details by
gen-ID
terminal
bash
curl "https://api.chuizi.ai/v1/generation?id=gen-xxx" \ -H "Authorization: Bearer ck-your-api-key"
If the request appears in logs, the integration is working.