Moonshot (Kimi)
Kimi models can be added to Tresor via API key authentication.
- Web UI
- config.yaml
Web UI is more intuitive, but requires more manual operations.
In the "Downstreams" tab:
- Click + Add Provider if Moonshot is not already listed.
- Enter
Moonshot Kimior any name you like. - Under "API Formats", select OpenAI, OpenAI Responses, and Anthropic.
- Under "Authentication", select API key and enter a key from Moonshot API Keys.
- Under "API Host", enter
https://api.moonshot.cn. - Click Advanced. Under "Per-format URLs", set the Anthropic entry to
https://api.moonshot.cn/anthropic. - Under "Models", click Fetch Models and add the models you need. If discovery is unavailable, enter exact Kimi model IDs from the console manually.
Editing YAML is less intuitive, but requires fewer manual operations.
Replace YOUR-MOONSHOT-API-KEY with your API key and YOUR-KIMI-MODEL-ID with an exact model ID from your console.
~/.config/tresor/config.yaml
# Other settings omitted. Add this entry to your existing downstreams list.
downstreams:
- id: moonshot
name: Moonshot Kimi
base_url: https://api.moonshot.cn
api_formats:
- openai
- openai_responses
- anthropic
output_model_ids:
- YOUR-KIMI-MODEL-ID
is_enabled: true
auth:
type: api_key
api_key: YOUR-MOONSHOT-API-KEY
format_urls:
anthropic: https://api.moonshot.cn/anthropic
Restart Tresor to apply the YAML changes.
The URLs above use the Moonshot China platform described in the supplied compatibility report. Use credentials issued for that platform. Protocol compatibility does not guarantee identical behavior for every sampling parameter or deprecated function-calling field.
Done! Clients accessing Tresor can now use your configured Kimi models.