Migration Guide
Switch from any provider by changing your base URL and API key — your existing code, SDKs, and tools continue to work unchanged.
From OpenAI Direct
Change base_url and api_key. No other code changes needed.
# Before export OPENAI_API_KEY=sk-... export OPENAI_BASE_URL=https://api.openai.com/v1 # After export OPENAI_API_KEY=ck-your-key-here export OPENAI_BASE_URL=https://api.chuizi.ai/v1
From Anthropic Direct
Use the /anthropic endpoint for native protocol support. No format conversion, full feature parity.
# Before export ANTHROPIC_API_KEY=sk-ant-... # After export ANTHROPIC_API_KEY=ck-your-key-here export ANTHROPIC_BASE_URL=https://api.chuizi.ai/anthropic
from anthropic import Anthropic # Before client = Anthropic() # After — add base_url and api_key client = Anthropic( base_url="https://api.chuizi.ai/anthropic", api_key="ck-your-key-here", ) # Everything else stays the same message = client.messages.create( model="claude-sonnet-4-6", max_tokens=1024, messages=[{"role": "user", "content": "Hello!"}], )
This is the recommended setup for Claude Code, Cline, and other tools that use the Anthropic SDK.
From OpenRouter
Chuizi.AI uses the same OpenAI-compatible protocol. Change the base URL and API key:
# Before export OPENAI_BASE_URL=https://openrouter.ai/api/v1 export OPENAI_API_KEY=sk-or-... # After export OPENAI_BASE_URL=https://api.chuizi.ai/v1 export OPENAI_API_KEY=ck-your-key-here
Model names are largely compatible. Chuizi.AI uses the provider/model format (e.g., anthropic/claude-sonnet-4-6), which matches OpenRouter conventions.
From Azure OpenAI
Azure OpenAI uses a different URL structure and API version parameter. Switch to the standard OpenAI SDK format:
from openai import OpenAI # Before (Azure) from openai import AzureOpenAI client = AzureOpenAI( azure_endpoint="https://your-resource.openai.azure.com", api_version="2024-12-01-preview", api_key="your-azure-key", ) # After (Chuizi.AI) client = OpenAI( base_url="https://api.chuizi.ai/v1", api_key="ck-your-key-here", ) # Update model names: deployment name → provider/model response = client.chat.completions.create( model="openai/gpt-4.1", # was: your Azure deployment name messages=[{"role": "user", "content": "Hello!"}], )
From Vertex AI (Google)
Use the Gemini native protocol endpoint:
export GEMINI_API_BASE=https://api.chuizi.ai/gemini export GEMINI_API_KEY=ck-your-key-here
Or use the OpenAI-compatible endpoint with Google models:
from openai import OpenAI client = OpenAI( base_url="https://api.chuizi.ai/v1", api_key="ck-your-key-here", ) response = client.chat.completions.create( model="google/gemini-2.5-pro", messages=[{"role": "user", "content": "Hello!"}], )
Environment Variable Reference
| Provider | Before | After (Chuizi.AI) |
|---|---|---|
| OpenAI | OPENAI_API_KEY=sk-... | OPENAI_API_KEY=ck-... |
| OpenAI | OPENAI_BASE_URL=https://api.openai.com/v1 | OPENAI_BASE_URL=https://api.chuizi.ai/v1 |
| Anthropic | ANTHROPIC_API_KEY=sk-ant-... | ANTHROPIC_API_KEY=ck-... |
| Anthropic | — | ANTHROPIC_BASE_URL=https://api.chuizi.ai/anthropic |
| OpenRouter | OPENAI_BASE_URL=https://openrouter.ai/api/v1 | OPENAI_BASE_URL=https://api.chuizi.ai/v1 |
| Azure | AZURE_OPENAI_ENDPOINT=... | OPENAI_BASE_URL=https://api.chuizi.ai/v1 |
What Changes, What Doesn't
| Aspect | Changes | Stays the Same |
|---|---|---|
| Base URL | New Chuizi.AI endpoint | |
| API key | ck- prefixed key | |
| Model names | Use provider/model format | |
| Request/response format | ||
| SDK methods and parameters | ||
| Streaming behavior | ||
| Error response structure | ||
| Function calling / tool use |
Next Steps
- First Request — verify your migration works
- Choosing a Protocol — decide between OpenAI, Anthropic, or Gemini protocol
- Error Handling — Chuizi.AI-specific error codes