, Error code: 500 - {'error': {'message': 'invalid content type: video/mp4, requ...
🚨 错误信息
InternalServerError, Error code: 500 - {'error': {'message': 'invalid content type: video/mp4, required image/* (request id: 20250927151709583470291tTsFliTb)', 'type': 'new_api_error', 'param': '', 'code': 'count_token_messages_failed'}}
🤖 AI解决方案
InternalServerError, Error code: 500 - {'error': {'message': 'invalid content type: video/mp4, required image/* (request id: 20250927151709583470291tTsFliTb)', 'type': 'new_api_error', 'param': '', 'code': 'count_token_messages_failed'}}
错误翻译:
内部服务器错误,错误代码:500 - {'error': {'message': '无效的内容类型:video/mp4,需要 image/* (请求 ID: 20250927151709583470291tTsFliTb)', 'type': 'new_api_error', 'param': '', 'code': 'count_token_messages_failed'}}
原因分析:
API 接口期望接收图片类型的文件(image/*),但您却上传了视频文件(video/mp4)。
解决方案:
请确保您上传的文件是图片格式(如 .jpg, .png, .gif 等),而不是视频格式。如果您的 API 调用逻辑需要处理视频,请检查 API 文档,确认是否有支持视频处理的接口,并按照该接口的要求进行文件上传。
预防措施:
- 在上传文件前,进行文件类型校验,确保文件格式符合 API 的要求。
- 为您的 API 请求添加更详细的日志记录,包含上传的文件类型和文件名,以便快速定位问题。