skillfed

runwayml

The official Python library for the runwayml API

runwayml v5.14.0 222.3K downloads/30d#9,267 on PyPI26
Permissive license Apache-2.0 Active released

What it is and what it does

RunwayML is an official Python SDK that wraps the RunwayML REST API, enabling developers to call generative AI services (image-to-video, text-to-image, and others) from Python code. It is generated by Stainless and provides both synchronous and asynchronous clients powered by httpx, with full type hints for all request parameters and response fields.

The library handles common API patterns automatically: pagination across list results, error classification (connection errors, rate limits, authentication failures, etc.), and automatic retry logic for transient failures. Responses are Pydantic models with helper methods for JSON serialization and dictionary conversion. It supports Python 3.9 through 3.14 and runs on macOS, Windows, and Linux.

Use it for:

  • Generate videos from static images with text prompts using the image-to-video endpoint.
  • Create images from text descriptions via the text-to-image API with specified aspect ratios.
  • Build async workflows that call multiple RunwayML endpoints concurrently without blocking.
  • Integrate RunwayML's generative capabilities into a larger Python application with full IDE autocomplete.
  • Paginate through lists of routers or other resources without manually handling cursor logic.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides a Python client library for the RunwayML REST API, offering synchronous and asynchronous access to RunwayML's generative AI services with full type hints and automatic pagination.

Yes. The library is actively maintained, has no known vulnerabilities, low install friction, and permissive licensing. Install it if you need to call RunwayML's API from Python and want type safety, automatic pagination, and both sync/async support out of the box. The only prerequisite is a valid RunwayML API key.

Install

runwayml on PyPI

pip

pip install runwayml

uv

uv add runwayml

poetry

poetry add runwayml

Installing runwayml

Before you install

Low friction installation with a pure Python wheel. Actively maintained with a release from 2026-08-13. Depends on common, well-maintained libraries (httpx, pydantic, anyio) with no compiled dependencies.

License in practice

Licensed under Apache-2.0 (permissive), allowing use in commercial and private projects with minimal restrictions—attribution required but no copyleft obligations.

Quickstart

pip install runwayml

import os
from runwayml import RunwayML

client = RunwayML(api_key=os.environ.get("RUNWAYML_API_SECRET"))
image_to_video = client.image_to_video.create(
    model="gen4_turbo",
    prompt_image="https://example.com/assets/bunny.jpg",
    ratio="1280:720",
    prompt_text="The bunny is eating a carrot",
)
print(image_to_video.id)

Requires a valid RunwayML API key (RUNWAYML_API_SECRET environment variable or passed explicitly); requires Python 3.9 or later.

Verify before relying

  • Whether the library's auto-pagination handles all edge cases and rate-limit scenarios reliably in production.
  • Performance characteristics of the async client with aiohttp backend under high concurrency.
  • Whether retry logic (2 times by default) is appropriate for typical RunwayML API latency patterns.

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 6 — anyio, distro, httpx, pydantic, sniffio, typing-extensions
Maintenance actively maintained — 1 days since the last release
Last repo commit
First released
Downloads 222,286/month — #9,267 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: runwayml-5.14.0-py3-none-any.whl

Intended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: OS IndependentOperating System :: POSIXOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

Tags

runwayml api clientimage to video generation pythontext to image api clientasync http client wrappergenerative ai sdk pythonrunway ml sdktyped rest api client
api-clientgenerative-aiasync-support

More Python Modules packages