Skip to main content

Tencent (HY)

[official website]

Tencent HY models can be added to Tresor via API key authentication. Older Hunyuan access is migrating to TokenHub. The setup below uses the explicitly documented TokenHub OpenAI Chat Completions endpoint; confirm your model's invocation details in TokenHub before configuring it.

Web UI is more intuitive, but requires more manual operations.

In the "Downstreams" tab:

  • Click + Add Provider if Tencent is not already listed.
  • Enter Tencent HY or any name you like.
  • Under "API Formats", select OpenAI.
  • Under "Authentication", select API key and enter a key from TokenHub API Key Management. Migrated models require replacement TokenHub credentials, not an old Hunyuan key.
  • Under "API Host", enter https://tokenhub.tencentmaas.com.
  • Under "Models", click Fetch Models. If discovery is unavailable, manually add the exact model ID displayed under TokenHub Online Inference or on the model-detail page.

Responses and Anthropic compatibility​

The supplied compatibility report identifies hy4-preview as supporting OpenAI Chat Completions, Responses, and Anthropic Messages. However, it does not establish stable universal TokenHub URLs for the latter two formats. Do not infer these URLs from the Chat endpoint.

If your model's current invocation page explicitly provides Responses or Anthropic endpoints:

  1. Enable only the additional formats documented for that model.
  2. Under Advanced, set each format's Per-format URL to the endpoint's origin/base and its request path to the documented path.
  3. In YAML, add the corresponding openai_responses or anthropic entry to api_formats, and configure format_urls and format_paths so their concatenation equals the full documented URL.
  4. Confirm the required credential and test a request before relying on the new format.

For an older model that still explicitly uses the legacy Hunyuan API, its Chat host is https://api.hunyuan.cloud.tencent.com with the /v1/chat/completions path. Use that only when the current model instructions still require it; migrated models should use TokenHub.

Done! Clients accessing Tresor can now use your configured HY models.

Next step​