{"record":{"id":"ba984e8b7161ca93","repo":"BerriAI/litellm","slug":"minimax-tts-error-error-detail","errorCode":null,"errorMessage":"MiniMax TTS error: {error_detail}","messagePattern":"MiniMax TTS error: (.+?)","errorType":"http","errorClass":"MinimaxException","httpStatus":null,"severity":"error","filePath":"litellm/llms/minimax/text_to_speech/transformation.py","lineNumber":314,"sourceCode":"\n        from litellm.types.llms.openai import HttpxBinaryResponseContent\n\n        try:\n            # Parse JSON response\n            response_json: Final = raw_response.json()\n\n            # MiniMax API response format check\n            # The API can return different structures:\n            # 1. {\"data\": {\"audio\": \"...\"}, \"status\": 0, ...} for HTTP endpoint\n            # 2. {\"base_resp\": {\"status_code\": 0, ...}, \"audio_file\": \"...\"} for older versions\n\n            # Check for errors - MiniMax uses \"status\" field in HTTP endpoint response\n            # status: 0 = success, 2 = invalid api key, etc.\n            status: Final = response_json.get(\"status\")\n            if status is not None and status != 0:\n                ced: Final = response_json.get(\"ced\", \"Unknown error\")\n                error_detail: Final = ced if ced else f\"API returned status {status}\"\n                raise MinimaxException(\n                    status_code=raw_response.status_code,\n                    message=f\"MiniMax TTS error: {error_detail}\",\n                    headers=dict(raw_response.headers),\n                )\n\n            # Extract audio data\n            # MiniMax returns audio in \"data\" field\n            data: Final = response_json.get(\"data\", {})\n\n            # Check if response contains a URL (output_format='url')\n            audio_url: Final = data.get(\"audio_url\", None)\n            if audio_url:\n                # If URL format is used, we need to fetch the audio from the URL\n                # For now, return a response indicating URL mode (TODO: fetch audio from URL)\n                raise MinimaxException(\n                    status_code=500,\n                    message=f\"URL output format is not yet supported. Use 'hex' format or fetch from URL: {audio_url}\",\n                    headers=dict(raw_response.headers),","sourceCodeStart":296,"sourceCodeEnd":332,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/llms/minimax/text_to_speech/transformation.py#L296-L332","documentation":"Error \"MiniMax TTS error: {error_detail}\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/llms/minimax/text_to_speech/transformation.py:314 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the MiniMax TTS error detail."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}