BerriAI/litellm · error · ValueError
RunwayML API key is required. Set RUNWAYML_API_SECRET enviro
Error message
RunwayML API key is required. Set RUNWAYML_API_SECRET environment variable or pass api_key parameter.
What it means
Credential guard in the RunwayML videos config's validate_environment: after checking litellm_params and litellm.api_key, the RUNWAYML_API_SECRET lookup still found no key, so the Bearer header cannot be built for video API calls.
Source
Thrown at litellm/llms/runwayml/videos/transformation.py:158
headers: dict,
model: str,
api_key: str | None = None,
litellm_params: GenericLiteLLMParams | None = None,
) -> dict:
"""
Validate environment and set up authentication headers.
RunwayML uses Bearer token authentication via RUNWAYML_API_SECRET.
"""
# Use api_key from litellm_params if available, otherwise fall back to other sources
if litellm_params and litellm_params.api_key:
api_key = api_key or litellm_params.api_key
api_key = (
api_key or litellm.api_key or get_secret_str("RUNWAYML_API_SECRET") or get_secret_str("RUNWAYML_API_KEY")
)
if api_key is None:
raise ValueError(
"RunwayML API key is required. Set RUNWAYML_API_SECRET environment variable or pass api_key parameter."
)
headers.update(
{
"Authorization": f"Bearer {api_key}",
"X-Runway-Version": RUNWAYML_DEFAULT_API_VERSION,
"Content-Type": "application/json",
}
)
return headers
def get_complete_url(
self,
model: str,
api_base: str | None,
litellm_params: dict,
) -> str:View on GitHub (pinned to 77b7c6c40c)
Solutions
- Set the RUNWAYML_API_SECRET environment variable.
- Or pass api_key parameter to the video call.
Example fix
os.environ["RUNWAYML_API_SECRET"] = "<key>"
Defensive patterns
Strategy: validation
When it happens
Trigger: Triggered when calling the RunwayML video API without RUNWAYML_API_SECRET set or api_key passed.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/2e6bd49fa559c8bc.
Report an issue: GitHub.