Create an API Key
After registering and signing in, create a dedicated API key.
Creation Steps
- Sign in to the Xiaomai API platform
- Open the console
- Click Create Key
- Configure key parameters
- Save and copy the key
Key Types
Choose the token group that matches the tool you want to use.
Claude Code Token
Used for the Claude Code CLI tool and Claude-series models.
CodeX Token
Used for CodeX. Select the codex测试 token group.
Gemini CLI Token
Used for Gemini CLI and Gemini-series models.
Important
Different tools require different token groups. Create the right key for your target tool.
Key Configuration
You can configure these parameters when creating a key:
Name
Set an easy-to-recognize name so you can manage multiple keys.
Token Group
Select the corresponding tool token group:
- Claude Code
codex测试- Gemini CLI
Quota Limit
You can set:
- Unlimited quota (recommended)
- Custom quota limit
Expiration
Set an expiration time, or choose no expiration.
Security Advice
Security
- Do not share your key with others
- Do not commit your key to a code repository
- Do not show your key publicly
- Store keys in environment variables or configuration files
- Rotate keys regularly
Save the Key
After creation succeeds, save your key immediately:
bash
# Example key. Replace it with your real key.
sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxTip
The key is shown only once. Save it carefully. If you lose it, create a new one.
Next Steps
- Update token settings - Adjust token parameters
- Configure environment variables - Use the key in a tool
- Top up balance - Make sure your account has enough balance