Skip to content

Create an API Key ​

After registering and signing in, create a dedicated API key.

Creation Steps ​

  1. Sign in to the Xiaomai API platform
  2. Open the console
  3. Click Create Key
  4. Configure key parameters
  5. 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-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Tip

The key is shown only once. Save it carefully. If you lose it, create a new one.

Next Steps ​

Friendly, practical, and reliable AI coding support