Basics
API Reference
Enable users to interact with your API
POST
The API Playground provides a sandbox environment for real-time request testing and intuitive response data visualization.
For code security, we recommend:
- Managing sensitive information (such as API Keys) through environment variables. For Python calls, use
os.getenv("AIHUBMIX_API_KEY")
. - Avoiding printing sensitive information in logs/outputs.
- Preventing key leakage by adding .env to .gitignore to keep secrets out of the code repository.
Authorizations
Body
application/json
对话消息列表,包含角色和内容信息
采样温度,控制输出的随机性,范围 0-2,值越大随机性越高
生成文本的最大长度,根据模型能力可设置不同值
核采样参数,控制输出文本的多样性
频率惩罚参数,避免重复生成相似内容
存在惩罚参数,鼓励生成新的内容
是否启用流式输出,实时返回生成内容
搜索模型的网络搜索选项,仅支持特定搜索模型