Gemini CLI
Prerequisites
- Gemini CLI installed
- A Chuizi.AI account with an API key (starts with
ck-)
Configuration
Set environment variables to configure Gemini CLI to use Chuizi.AI:
terminal
bash
export GEMINI_API_KEY=ck-your-key-here
Also configure the base URL to point to Chuizi.AI's Gemini endpoint:
terminal
bash
export GEMINI_API_BASE_URL=https://api.chuizi.ai/gemini
To make this permanent, add to your shell configuration file:
terminal
bash
echo 'export GEMINI_API_KEY=ck-your-key-here' >> ~/.zshrc echo 'export GEMINI_API_BASE_URL=https://api.chuizi.ai/gemini' >> ~/.zshrc source ~/.zshrc
Usage
Once configured, use Gemini CLI as normal:
terminal
bash
# Start a conversation gemini # Single query gemini "explain this error message" # Analyze a file gemini "summarize this file" < README.md
Verify the Configuration
- Run the following in your terminal:
terminalbash
gemini "say hello"
- If you receive a normal response, the configuration is working
- Check the Chuizi.AI dashboard request logs to confirm
Common Issues
Connection Failed
Verify the GEMINI_API_BASE_URL environment variable is correctly set to https://api.chuizi.ai/gemini. Run echo $GEMINI_API_BASE_URL to check.
Authentication Error
Confirm your GEMINI_API_KEY starts with ck- and is enabled in the Chuizi.AI dashboard.
Model Not Available
Chuizi.AI supports Gemini model series. To view available models, visit the models page.
Next Steps
- Gemini API Protocol — native Gemini protocol details
- Choose a Model — compare Gemini models with other providers
- Pricing — Gemini model pricing