docs.rs failed to build runway-sdk-0.1.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
runway-sdk
Async Rust SDK for the Runway API with typed generation requests, uploads, task polling, and workflow invocations.
How It Works
prompt / asset bytes
|
v
+-----------------------------+
| typed request builders |
| TextToVideoGen45Request |
| CreateEphemeralUploadRequest|
+-----------------------------+
|
v
+-----------------------------+
| RunwayClient |
| reqwest + retries + headers |
+-----------------------------+
|
v
+-----------------------------+ +-----------------------------+
| /v1/tasks | <--> | PendingTask |
| /v1/workflows | | wait_for_output() |
| /v1/uploads | | stream_status() |
+-----------------------------+ +-----------------------------+
|
v
output URLs / typed workflow results / response metadata
Quick Start
- Create a project and add the crate.
- Set your Runway API secret.
- Run a safe organization smoke test.
Credit balance: <number>
The Good Stuff
1. Submit text-to-video and wait for the final asset
use ;
async
TextToVideoGen45Requestkeeps request fields model-specific instead of flattening everything into one permissive struct.VideoRatio::Landscapemaps to1280:720.wait_for_output()exits onSUCCEEDED,FAILED, orCANCELLED.
2. Upload media once and reuse the returned runway:// URI
use ;
async
create_ephemeral()follows the placeholder-creation plus multipart upload flow used by the official SDK.upload.uriis therunway://...handle you pass to downstream generation endpoints.- Upload creation can be blocked by Runway billing rules on unfunded accounts.
3. Launch workflows with typed node output values
use ;
async
node_output()builds thenodeOutputsmap without hand-rolled JSON.run_pending()returns aPendingWorkflowInvocationthat supports the same polling API as generation tasks.workflow_invocations().pending(id)is the direct entry point when you already have an invocation ID.
Configuration / API
| Knob | Default | Description |
|---|---|---|
RUNWAYML_API_SECRET |
none | Bearer secret read by RunwayClient::new(). |
Config::base_url |
https://api.dev.runwayml.com |
API host override. |
Config::api_version |
2024-11-06 |
Sent as X-Runway-Version. |
Config::timeout |
300s |
Default HTTP timeout for each request. |
Config::max_retries |
3 |
Retries 408, 409, 429, 5xx, and retryable transport failures. |
Config::poll_interval |
5s |
Delay between task and workflow polls. |
Config::max_poll_duration |
600s |
Max total wait time for wait_for_output(). |
RequestOptions |
none | Per-request headers, query params, timeout, retries, idempotency key, and base URL override. |
unstable-endpoints |
off | Enables lip_sync, image_upscale, and task list/cancel helpers. |
Deployment / Integration
Run a live smoke test in GitHub Actions with a real Runway secret:
name: runway-live-smoke
on:
workflow_dispatch:
jobs:
live:
runs-on: ubuntu-latest
env:
RUNWAYML_API_SECRET: ${{ secrets.RUNWAYML_API_SECRET }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo test --features live-tests --test live_api -- --nocapture --test-threads=1
License
MIT or Apache-2.0.