Skip to content

Create API Key ​

An API key is the credential used to call Yuan API.

1. Open API keys ​

Sign in and open API key management. Click “Create API Key”.

API key management

2. Enter the details ​

Enter a recognizable name and choose the group that matches your client and model. Follow the group options currently shown in the console, then click “Save” in the bottom-right corner.

Choose an API key group

3. Copy the key ​

After creation, copy the key from the list or result dialog and store it in a password manager or environment variable.

Copy the API key

4. Use the correct endpoint ​

ClientBase URLVariable
Claude Codehttps://api.apixhm.comANTHROPIC_AUTH_TOKEN
Codexhttps://api.apixhm.com/v1OPENAI_API_KEY
OpenAI-compatible clientshttps://api.apixhm.com/v1OPENAI_API_KEY

API address

Copy the model ID from the Yuan API models and pricing page.

Copy a model ID

WARNING

Never publish a complete API key. Claude Code does not use /v1; Codex and OpenAI-compatible clients do.