{"record":{"id":"24695a84b0bfe1bf","repo":"BerriAI/litellm","slug":"runwayml-api-secret-or-runwayml-api-key-is-not-set-24695a","errorCode":null,"errorMessage":"RUNWAYML_API_SECRET or RUNWAYML_API_KEY is not set","messagePattern":"RUNWAYML_API_SECRET or RUNWAYML_API_KEY is not set","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/llms/runwayml/text_to_speech/transformation.py","lineNumber":207,"sourceCode":"        # Return None for voice string since RunwayML uses dict format\n        return None, mapped_params\n\n    def validate_environment(\n        self,\n        headers: dict,\n        model: str,\n        api_key: str | None = None,\n        api_base: str | None = None,\n    ) -> dict:\n        \"\"\"\n        Validate RunwayML environment and set up authentication headers\n        \"\"\"\n        validated_headers: Final = headers.copy()\n\n        final_api_key: Final = api_key or get_secret_str(\"RUNWAYML_API_SECRET\") or get_secret_str(\"RUNWAYML_API_KEY\")\n\n        if not final_api_key:\n            raise ValueError(\"RUNWAYML_API_SECRET or RUNWAYML_API_KEY is not set\")\n\n        validated_headers[\"Authorization\"] = f\"Bearer {final_api_key}\"\n        validated_headers[\"X-Runway-Version\"] = RUNWAYML_DEFAULT_API_VERSION\n        validated_headers[\"Content-Type\"] = \"application/json\"\n\n        return validated_headers\n\n    def get_complete_url(\n        self,\n        model: str,\n        api_base: str | None,\n        litellm_params: dict,\n    ) -> str:\n        \"\"\"\n        Get the complete URL for RunwayML TTS request\n        \"\"\"\n        complete_url = api_base or get_secret_str(\"RUNWAYML_API_BASE\") or self.DEFAULT_BASE_URL\n","sourceCodeStart":189,"sourceCodeEnd":225,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/runwayml/text_to_speech/transformation.py#L189-L225","documentation":"Credential guard in the RunwayML TTS config's validate_environment: the key chain (argument, RUNWAYML_API_SECRET, RUNWAYML_API_KEY) resolved nothing, so auth headers cannot be built and the TTS request is rejected before sending.","triggerScenarios":"Triggered when calling RunwayML text-to-speech without RUNWAYML_API_SECRET or RUNWAYML_API_KEY set.","commonSituations":"See trigger scenarios.","solutions":["Set RUNWAYML_API_SECRET (or RUNWAYML_API_KEY) environment variable.","Or pass api_key to the speech call."],"exampleFix":"litellm.speech(model=\"runwayml/...\", api_key=\"<key>\", input=...)","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}