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
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "3.14.3"
".": "3.15.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: 14
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runwayml%2Frunwayml-b3276a8508268090b14e297f5cb18448da7a763653c6d38c23f0eea0984d8008.yml
openapi_spec_hash: 95ae975f17217c8d144c4ba80846beca
config_hash: 3a3a9803a21ef667a2d3a91023a5cb9d
configured_endpoints: 31
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runwayml%2Frunwayml-4ddc8e3d83c8601fc378c702bbcb5af2976b481db513bd389a5f57645a20cd04.yml
openapi_spec_hash: 5795c6af9e9404765bda670e781fe500
config_hash: 3c88fcd4dd6f3a7d7f6e94b57b430243
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# Changelog

## 3.15.0 (2026-03-06)

Full Changelog: [v3.14.3...v3.15.0](https://github.com/runwayml/sdk-node/compare/v3.14.3...v3.15.0)

### Features

* **api:** add avatar, voice, document, and realtime session endpoints ([9534a7e](https://github.com/runwayml/sdk-node/commit/9534a7e892b9b11d7c2420a0b79b4c065b820a42))


### Bug Fixes

* fix request delays for retrying to be more respectful of high requested delays ([0a0a653](https://github.com/runwayml/sdk-node/commit/0a0a653562760410cbe9425ab6ef118ee8682546))


### Chores

* **docs:** add missing descriptions ([322c513](https://github.com/runwayml/sdk-node/commit/322c513a65a9250c65215cc636ee1ca061c1592a))
* **internal:** move stringifyQuery implementation to internal function ([bdc20f1](https://github.com/runwayml/sdk-node/commit/bdc20f12c6558a6f405f0790b1601d4bbf2b9078))
* **test:** do not count install time for mock server timeout ([a5761c0](https://github.com/runwayml/sdk-node/commit/a5761c04cc605146aa284eeefcaf1f23bd7ab0ff))

## 3.14.3 (2026-02-23)

Full Changelog: [v3.14.2...v3.14.3](https://github.com/runwayml/sdk-node/compare/v3.14.2...v3.14.3)
Expand Down
38 changes: 38 additions & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ client.example.list(undefined, { headers: { ... } });
This affects the following methods:

- `client.organization.retrieveUsage()`
- `client.avatars.update()`

### Removed `httpAgent` in favor of `fetchOptions`

Expand Down Expand Up @@ -151,6 +152,43 @@ import RunwayML from '@runwayml/sdk';

The `@runwayml/sdk/shims` imports have been removed. Your global types must now be [correctly configured](#minimum-types-requirements).

### Pagination changes

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);
}
```

The interface for manually paginating through list results has been simplified:

```ts
// Before
page.nextPageParams();
page.nextPageInfo();
// Required manually handling { url } | { params } type

// After
page.nextPageRequestOptions();
```

#### Removed unnecessary classes

Page classes for individual methods are now type aliases:

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

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

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.

### `@runwayml/sdk/src` directory removed

Previously IDEs may have auto-completed imports from the `@runwayml/sdk/src` directory, however this
Expand Down
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,37 @@ On timeout, an `APIConnectionTimeoutError` is thrown.

Note that requests which time out will be [retried twice by default](#retries).

## Auto-pagination

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 = [];
// Automatically fetches more pages as needed.
for await (const avatarListResponse of client.avatars.list({ limit: 1 })) {
allAvatarListResponses.push(avatarListResponse);
}
return allAvatarListResponses;
}
```

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);
}

// Convenience methods are provided for manually paginating:
while (page.hasNextPage()) {
page = await page.getNextPage();
// ...
}
```

## Advanced Usage

### Accessing raw Response data (e.g., headers)
Expand Down
62 changes: 62 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,65 @@ Methods:

- <code title="get /v1/organization">client.organization.<a href="./src/resources/organization.ts">retrieve</a>() -> OrganizationRetrieveResponse</code>
- <code title="post /v1/organization/usage">client.organization.<a href="./src/resources/organization.ts">retrieveUsage</a>({ ...params }) -> OrganizationRetrieveUsageResponse</code>

# Avatars

Types:

- <code><a href="./src/resources/avatars.ts">AvatarCreateResponse</a></code>
- <code><a href="./src/resources/avatars.ts">AvatarRetrieveResponse</a></code>
- <code><a href="./src/resources/avatars.ts">AvatarUpdateResponse</a></code>
- <code><a href="./src/resources/avatars.ts">AvatarListResponse</a></code>

Methods:

- <code title="post /v1/avatars">client.avatars.<a href="./src/resources/avatars.ts">create</a>({ ...params }) -> AvatarCreateResponse</code>
- <code title="get /v1/avatars/{id}">client.avatars.<a href="./src/resources/avatars.ts">retrieve</a>(id) -> AvatarRetrieveResponse</code>
- <code title="patch /v1/avatars/{id}">client.avatars.<a href="./src/resources/avatars.ts">update</a>(id, { ...params }) -> AvatarUpdateResponse</code>
- <code title="get /v1/avatars">client.avatars.<a href="./src/resources/avatars.ts">list</a>({ ...params }) -> AvatarListResponsesCursorPage</code>
- <code title="delete /v1/avatars/{id}">client.avatars.<a href="./src/resources/avatars.ts">delete</a>(id) -> void</code>

# Documents

Types:

- <code><a href="./src/resources/documents.ts">DocumentCreateResponse</a></code>
- <code><a href="./src/resources/documents.ts">DocumentRetrieveResponse</a></code>
- <code><a href="./src/resources/documents.ts">DocumentListResponse</a></code>

Methods:

- <code title="post /v1/documents">client.documents.<a href="./src/resources/documents.ts">create</a>({ ...params }) -> DocumentCreateResponse</code>
- <code title="get /v1/documents/{id}">client.documents.<a href="./src/resources/documents.ts">retrieve</a>(id) -> DocumentRetrieveResponse</code>
- <code title="get /v1/documents">client.documents.<a href="./src/resources/documents.ts">list</a>({ ...params }) -> DocumentListResponsesCursorPage</code>
- <code title="delete /v1/documents/{id}">client.documents.<a href="./src/resources/documents.ts">delete</a>(id) -> void</code>

# RealtimeSessions

Types:

- <code><a href="./src/resources/realtime-sessions.ts">RealtimeSessionCreateResponse</a></code>
- <code><a href="./src/resources/realtime-sessions.ts">RealtimeSessionRetrieveResponse</a></code>

Methods:

- <code title="post /v1/realtime_sessions">client.realtimeSessions.<a href="./src/resources/realtime-sessions.ts">create</a>({ ...params }) -> RealtimeSessionCreateResponse</code>
- <code title="get /v1/realtime_sessions/{id}">client.realtimeSessions.<a href="./src/resources/realtime-sessions.ts">retrieve</a>(id) -> RealtimeSessionRetrieveResponse</code>
- <code title="delete /v1/realtime_sessions/{id}">client.realtimeSessions.<a href="./src/resources/realtime-sessions.ts">delete</a>(id) -> void</code>

# Voices

Types:

- <code><a href="./src/resources/voices.ts">VoiceCreateResponse</a></code>
- <code><a href="./src/resources/voices.ts">VoiceRetrieveResponse</a></code>
- <code><a href="./src/resources/voices.ts">VoiceListResponse</a></code>
- <code><a href="./src/resources/voices.ts">VoicePreviewResponse</a></code>

Methods:

- <code title="post /v1/voices">client.voices.<a href="./src/resources/voices.ts">create</a>({ ...params }) -> VoiceCreateResponse</code>
- <code title="get /v1/voices/{id}">client.voices.<a href="./src/resources/voices.ts">retrieve</a>(id) -> VoiceRetrieveResponse</code>
- <code title="get /v1/voices">client.voices.<a href="./src/resources/voices.ts">list</a>({ ...params }) -> VoiceListResponsesCursorPage</code>
- <code title="delete /v1/voices/{id}">client.voices.<a href="./src/resources/voices.ts">delete</a>(id) -> void</code>
- <code title="post /v1/voices/preview">client.voices.<a href="./src/resources/voices.ts">preview</a>({ ...params }) -> VoicePreviewResponse</code>
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": "3.14.3",
"version": "3.15.0",
"description": "The official TypeScript library for the RunwayML API",
"author": "RunwayML <dev-feedback@runwayml.com>",
"types": "dist/index.d.ts",
Expand Down
13 changes: 12 additions & 1 deletion scripts/mock
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,22 @@ echo "==> Starting mock server with URL ${URL}"

# Run prism mock on the given spec
if [ "$1" == "--daemon" ]; then
# Pre-install the package so the download doesn't eat into the startup timeout
npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism --version

npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log &

# Wait for server to come online
# Wait for server to come online (max 30s)
echo -n "Waiting for server"
attempts=0
while ! grep -q "✖ fatal\|Prism is listening" ".prism.log" ; do
attempts=$((attempts + 1))
if [ "$attempts" -ge 300 ]; then
echo
echo "Timed out waiting for Prism server to start"
cat .prism.log
exit 1
fi
echo -n "."
sleep 0.1
done
Expand Down
Loading