":{"code":"rix_api_license_invalid","message":"License is not enabled (request i...

2026年02月03日 21:46 状态: processing

🚨 错误信息

BASE_URL="https://www.dmxapi.com.cn/v1"  ✔  base   system   21:45:41  curl "$BASE_URL/chat/completions" \ -H "Authorization: Bearer xxx" \ -H "Content-Type: application/json" \ -d '{ "model": "DMXAPI-DeepSeek-R1-search", "messages": [ {"role": "system", "content": "始终返回直接搜索结果整合内容,不要深入分析。"}, {"role": "user", "content": "OpenAI最新的产品"} ], "temperature": 0.2 }' {"error":{"code":"rix_api_license_invalid","message":"License is not enabled (request id: 20260203214554399511480NIB9x6oz)","type":"rix_api_error"}}%

🤖 AI解决方案

代码糕手 - 专业报错分析助理

1. 错误翻译



原文:License is not enabled
译文:许可证未启用

2. 原因分析


  • 根本原因:API调用时使用的授权令牌(Bearer token)无效或未激活

  • 具体位置Authorization: Bearer xxx 中的令牌无效

  • 错误类型:API许可证验证失败(rix_api_license_invalid)
  • 3. 解决方案


    bash

    1. 获取有效的API密钥


    访问DMXAPI平台获取正确的API密钥

    2. 使用正确的授权令牌


    BASE_URL="https://www.dmxapi.com.cn/v1"
    curl "$BASE_URL/chat/completions" \
    -H "Authorization: Bearer YOUR_VALID_API_KEY" \ # 替换为有效API密钥
    -H "Content-Type: application/json" \
    -d '{
    "model": "DMXAPI-DeepSeek-R1-search",
    "messages": [
    {"role": "system", "content": "始终返回直接搜索结果整合内容,不要深入分析。"},
    {"role": "user", "content": "OpenAI最新的产品"}
    ],
    "temperature": 0.2
    }'

    4.️ 预防措施


  • API密钥管理

  • - 使用环境变量存储API密钥,避免硬编码
    - 定期检查API密钥的有效期和权限

  • 验证工具

  • - 使用curl或Postman先测试API连接
    - 检查API文档中的认证要求
    - 确保账户有足够的配额和正确的许可证类型

    ---

    需要进一步帮助吗?请提供具体的错误信息进行深入分析。