OpenCode
Prerequisites
- OpenCode installed
- A Chuizi.AI account with an API key (starts with
ck-)
Option 1: Anthropic Protocol (Recommended for Claude)
Configure via environment variables for Claude model users:
terminal
bash
export ANTHROPIC_BASE_URL=https://api.chuizi.ai/anthropic export ANTHROPIC_API_KEY=ck-your-key-here
To make this permanent, add to your shell configuration:
terminal
bash
echo 'export ANTHROPIC_BASE_URL=https://api.chuizi.ai/anthropic' >> ~/.zshrc echo 'export ANTHROPIC_API_KEY=ck-your-key-here' >> ~/.zshrc source ~/.zshrc
Next Steps
- Choose a Model — find the best model for your coding tasks
- Choosing a Protocol — OpenAI vs Anthropic protocol trade-offs
- Cost Optimization — reduce costs with model tiering and caching