Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
lint:
timeout-minutes: 10
name: lint
runs-on: ${{ github.repository == 'stainless-sdks/runwayml-typescript' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
Expand All @@ -37,7 +37,7 @@ jobs:
build:
timeout-minutes: 5
name: build
runs-on: ${{ github.repository == 'stainless-sdks/runwayml-typescript' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
permissions:
contents: read
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
test:
timeout-minutes: 10
name: test
runs-on: ${{ github.repository == 'stainless-sdks/runwayml-typescript' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "4.10.0"
".": "4.11.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 51
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runwayml/runwayml-391d899ffd246491c8d2a02adec62eb5fc1b00044e6704a7886d8e8e09d72484.yml
openapi_spec_hash: 475451c27bcc5721a02ee92c1898000e
config_hash: 7caf94f26186e1ee432efcaa0b590bab
configured_endpoints: 57
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runwayml/runwayml-33021d52306cc82f369d7ad1d391bc94fd5a377d4a92be35ece073b73f64a454.yml
openapi_spec_hash: d70a1ddd98e8aff8e1d298ff9c21b343
config_hash: 6bdea3c3109ee75952f779d566c229ea
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## 4.11.0 (2026-07-21)

Full Changelog: [v4.10.0...v4.11.0](https://github.com/runwayml/sdk-node/compare/v4.10.0...v4.11.0)

### Features

* **api:** add Model Router CRUD and routed video generation ([48477a0](https://github.com/runwayml/sdk-node/commit/48477a0707fe103d36df277fd387bb446b2b2961))
* **stlc:** configurable CI runner and private-production-repo support in workflow templates ([7d32a50](https://github.com/runwayml/sdk-node/commit/7d32a50f43bd87fd47b0a4cf019f79ee0892f94a))


### Bug Fixes

* **client:** make generate.video responses awaitable ([73d3025](https://github.com/runwayml/sdk-node/commit/73d30259966bf4ab280f273d3a232c878bb7c15f))

## 4.10.0 (2026-07-13)

Full Changelog: [v4.9.1...v4.10.0](https://github.com/runwayml/sdk-node/compare/v4.9.1...v4.10.0)
Expand Down
9 changes: 5 additions & 4 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ client.example.list(undefined, { headers: { ... } });

This affects the following methods:

- `client.routers.update()`
- `client.organization.retrieveUsage()`
- `client.avatars.update()`
- `client.documents.update()`
Expand Down Expand Up @@ -161,8 +162,8 @@ The `for await` syntax **is not affected**. This still works as-is:

```ts
// Automatically fetches more pages as needed.
for await (const avatarListResponse of client.avatars.list({ limit: 1 })) {
console.log(avatarListResponse);
for await (const routerListResponse of client.routers.list({ limit: 1 })) {
console.log(routerListResponse);
}
```

Expand All @@ -184,10 +185,10 @@ Page classes for individual methods are now type aliases:

```ts
// Before
export class AvatarListResponsesCursorPage extends CursorPage<AvatarListResponse> {}
export class RouterListResponsesCursorPage extends CursorPage<RouterListResponse> {}

// After
export type AvatarListResponsesCursorPage = CursorPage<AvatarListResponse>;
export type RouterListResponsesCursorPage = CursorPage<RouterListResponse>;
```

If you were importing these classes at runtime, you'll need to switch to importing the base class or only import them at the type-level.
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,22 +156,22 @@ List methods in the RunwayML API are paginated.
You can use the `for await … of` syntax to iterate through items across all pages:

```ts
async function fetchAllAvatarListResponses(params) {
const allAvatarListResponses = [];
async function fetchAllRouterListResponses(params) {
const allRouterListResponses = [];
// Automatically fetches more pages as needed.
for await (const avatarListResponse of client.avatars.list({ limit: 1 })) {
allAvatarListResponses.push(avatarListResponse);
for await (const routerListResponse of client.routers.list({ limit: 1 })) {
allRouterListResponses.push(routerListResponse);
}
return allAvatarListResponses;
return allRouterListResponses;
}
```

Alternatively, you can request a single page at a time:

```ts
let page = await client.avatars.list({ limit: 1 });
for (const avatarListResponse of page.data) {
console.log(avatarListResponse);
let page = await client.routers.list({ limit: 1 });
for (const routerListResponse of page.data) {
console.log(routerListResponse);
}

// Convenience methods are provided for manually paginating:
Expand Down
29 changes: 29 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,35 @@ Methods:

- <code title="post /v1/video_upscale">client.videoUpscale.<a href="./src/resources/video-upscale.ts">create</a>({ ...params }) -> VideoUpscaleCreateResponse</code>

# Generate

## Video

Types:

- <code><a href="./src/resources/generate/video.ts">VideoCreateResponse</a></code>

Methods:

- <code title="post /v1/generate/video">client.generate.video.<a href="./src/resources/generate/video.ts">create</a>({ ...params }) -> VideoCreateResponse</code>

# Routers

Types:

- <code><a href="./src/resources/routers.ts">RouterCreateResponse</a></code>
- <code><a href="./src/resources/routers.ts">RouterRetrieveResponse</a></code>
- <code><a href="./src/resources/routers.ts">RouterUpdateResponse</a></code>
- <code><a href="./src/resources/routers.ts">RouterListResponse</a></code>

Methods:

- <code title="post /v1/routers">client.routers.<a href="./src/resources/routers.ts">create</a>({ ...params }) -> RouterCreateResponse</code>
- <code title="get /v1/routers/{id}">client.routers.<a href="./src/resources/routers.ts">retrieve</a>(id) -> RouterRetrieveResponse</code>
- <code title="patch /v1/routers/{id}">client.routers.<a href="./src/resources/routers.ts">update</a>(id, { ...params }) -> RouterUpdateResponse</code>
- <code title="get /v1/routers">client.routers.<a href="./src/resources/routers.ts">list</a>({ ...params }) -> RouterListResponsesCursorPage</code>
- <code title="delete /v1/routers/{id}">client.routers.<a href="./src/resources/routers.ts">delete</a>(id) -> void</code>

# Organization

Types:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@runwayml/sdk",
"version": "4.10.0",
"version": "4.11.0",
"description": "The official TypeScript library for the RunwayML API",
"author": "RunwayML <dev-feedback@runwayml.com>",
"types": "dist/index.d.ts",
Expand Down
30 changes: 30 additions & 0 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,17 @@ import {
RecipeProductUgcResponse,
Recipes,
} from './resources/recipes';
import {
RouterCreateParams,
RouterCreateResponse,
RouterListParams,
RouterListResponse,
RouterListResponsesCursorPage,
RouterRetrieveResponse,
RouterUpdateParams,
RouterUpdateResponse,
Routers,
} from './resources/routers';
import { SoundEffect, SoundEffectCreateParams, SoundEffectCreateResponse } from './resources/sound-effect';
import {
SpeechToSpeech,
Expand Down Expand Up @@ -150,6 +161,7 @@ import {
WorkflowRunResponse,
Workflows,
} from './resources/workflows';
import { Generate } from './resources/generate/generate';
import { type Fetch } from './internal/builtin-types';
import { isRunningInBrowser } from './internal/detect-platform';
import { HeadersLike, NullableHeaders, buildHeaders } from './internal/headers';
Expand Down Expand Up @@ -962,6 +974,8 @@ export class RunwayML {
* These endpoints all kick off tasks to create generations.
*/
videoUpscale: API.VideoUpscale = new API.VideoUpscale(this);
generate: API.Generate = new API.Generate(this);
routers: API.Routers = new API.Routers(this);
organization: API.Organization = new API.Organization(this);
avatars: API.Avatars = new API.Avatars(this);
avatarConversations: API.AvatarConversations = new API.AvatarConversations(this);
Expand All @@ -988,6 +1002,8 @@ RunwayML.VoiceDubbing = VoiceDubbing;
RunwayML.SpeechToSpeech = SpeechToSpeech;
RunwayML.ImageUpscale = ImageUpscale;
RunwayML.VideoUpscale = VideoUpscale;
RunwayML.Generate = Generate;
RunwayML.Routers = Routers;
RunwayML.Organization = Organization;
RunwayML.Avatars = Avatars;
RunwayML.AvatarConversations = AvatarConversations;
Expand Down Expand Up @@ -1080,6 +1096,20 @@ export declare namespace RunwayML {
type VideoUpscaleCreateParams as VideoUpscaleCreateParams,
};

export { Generate as Generate };

export {
Routers as Routers,
type RouterCreateResponse as RouterCreateResponse,
type RouterRetrieveResponse as RouterRetrieveResponse,
type RouterUpdateResponse as RouterUpdateResponse,
type RouterListResponse as RouterListResponse,
type RouterListResponsesCursorPage as RouterListResponsesCursorPage,
type RouterCreateParams as RouterCreateParams,
type RouterUpdateParams as RouterUpdateParams,
type RouterListParams as RouterListParams,
};

export {
Organization as Organization,
type OrganizationRetrieveResponse as OrganizationRetrieveResponse,
Expand Down
3 changes: 3 additions & 0 deletions src/resources/generate.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

export * from './generate/index';
19 changes: 19 additions & 0 deletions src/resources/generate/generate.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import { APIResource } from '../../core/resource';
import * as VideoAPI from './video';
import { Video, VideoCreateParams, VideoCreateResponse } from './video';

export class Generate extends APIResource {
video: VideoAPI.Video = new VideoAPI.Video(this._client);
}

Generate.Video = Video;

export declare namespace Generate {
export {
Video as Video,
type VideoCreateResponse as VideoCreateResponse,
type VideoCreateParams as VideoCreateParams,
};
}
4 changes: 4 additions & 0 deletions src/resources/generate/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

export { Generate } from './generate';
export { Video, type VideoCreateResponse, type VideoCreateParams } from './video';
Loading
Loading