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.21.1"
".": "3.22.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: 37
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runwayml/runwayml-ed8d0c17e291217781d37e1e60b969f2950d2fedaa182d41d80aac9945d1ff85.yml
openapi_spec_hash: 083b5c74652bfd7ba82748e1c04f8bc2
config_hash: 3063a17ad98d447287f6f7eab9d6d1d6
configured_endpoints: 38
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runwayml/runwayml-cfb6e42f50c5de798cb44d95bb8e1e0b378a1cad932b937b249aca35136c7758.yml
openapi_spec_hash: 2d2bb8ab56561238e5415dbbd3e4d725
config_hash: 6d8ca402de13857362ee587c404baca9
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## 3.22.0 (2026-06-02)

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

### Features

* **api:** Aleph2 ([d05ce4d](https://github.com/runwayml/sdk-node/commit/d05ce4dcfe8d92a730c4a2ce75f93541c252a03f))
* **api:** Image upscale endpoint ([5ffa7b9](https://github.com/runwayml/sdk-node/commit/5ffa7b980e2e06db13579915d515e15bed637b3b))


### Bug Fixes

* **client:** Awaitable task output on image upscale ([d07cebf](https://github.com/runwayml/sdk-node/commit/d07cebf8ba10d9324043eb4f087a703c2fb01a69))

## 3.21.1 (2026-05-27)

Full Changelog: [v3.21.0...v3.21.1](https://github.com/runwayml/sdk-node/compare/v3.21.0...v3.21.1)
Expand Down
10 changes: 10 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,16 @@ Methods:

- <code title="post /v1/speech_to_speech">client.speechToSpeech.<a href="./src/resources/speech-to-speech.ts">create</a>({ ...params }) -> SpeechToSpeechCreateResponse</code>

# ImageUpscale

Types:

- <code><a href="./src/resources/image-upscale.ts">ImageUpscaleCreateResponse</a></code>

Methods:

- <code title="post /v1/image_upscale">client.imageUpscale.<a href="./src/resources/image-upscale.ts">create</a>({ ...params }) -> ImageUpscaleCreateResponse</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": "3.21.1",
"version": "3.22.0",
"description": "The official TypeScript library for the RunwayML API",
"author": "RunwayML <dev-feedback@runwayml.com>",
"types": "dist/index.d.ts",
Expand Down
16 changes: 16 additions & 0 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ import {
ImageToVideoCreateParams,
ImageToVideoCreateResponse,
} from './resources/image-to-video';
import {
ImageUpscale,
ImageUpscaleCreateParams,
ImageUpscaleCreateResponse,
} from './resources/image-upscale';
import {
Organization,
OrganizationRetrieveResponse,
Expand Down Expand Up @@ -908,6 +913,10 @@ export class RunwayML {
* These endpoints all kick off tasks to create generations.
*/
speechToSpeech: API.SpeechToSpeech = new API.SpeechToSpeech(this);
/**
* These endpoints all kick off tasks to create generations.
*/
imageUpscale: API.ImageUpscale = new API.ImageUpscale(this);
organization: API.Organization = new API.Organization(this);
avatars: API.Avatars = new API.Avatars(this);
avatarVideos: API.AvatarVideos = new API.AvatarVideos(this);
Expand All @@ -930,6 +939,7 @@ RunwayML.SoundEffect = SoundEffect;
RunwayML.VoiceIsolation = VoiceIsolation;
RunwayML.VoiceDubbing = VoiceDubbing;
RunwayML.SpeechToSpeech = SpeechToSpeech;
RunwayML.ImageUpscale = ImageUpscale;
RunwayML.Organization = Organization;
RunwayML.Avatars = Avatars;
RunwayML.AvatarVideos = AvatarVideos;
Expand Down Expand Up @@ -1008,6 +1018,12 @@ export declare namespace RunwayML {
type SpeechToSpeechCreateParams as SpeechToSpeechCreateParams,
};

export {
ImageUpscale as ImageUpscale,
type ImageUpscaleCreateResponse as ImageUpscaleCreateResponse,
type ImageUpscaleCreateParams as ImageUpscaleCreateParams,
};

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

import { APIResource } from '../core/resource';
import { RequestOptions } from '../internal/request-options';
import { APIPromiseWithAwaitableTask, wrapAsWaitableResource } from '../lib/polling';

/**
* These endpoints all kick off tasks to create generations.
*/
export class ImageUpscale extends APIResource {
/**
* Upscale an image with Magnific precision upscaling. Each input dimension must be
* between 300px and 8000px. Output width and height are the input dimensions
* multiplied by `scaleFactor` (default 2). Output width times height cannot exceed
* 25,300,000 pixels (~25.3 million).
*
* @example
* ```ts
* const imageUpscale = await client.imageUpscale.create({
* imageUri: 'https://example.com/image.jpg',
* model: 'magnific_precision_upscaler_v2',
* });
* ```
*/
create(
body: ImageUpscaleCreateParams,
options?: RequestOptions,
): APIPromiseWithAwaitableTask<ImageUpscaleCreateResponse> {
return wrapAsWaitableResource<ImageUpscaleCreateResponse>(this._client)(
this._client.post('/v1/image_upscale', { body, ...options }),
);
}
}

export interface ImageUpscaleCreateResponse {
/**
* The ID of the task that was created. Use this to retrieve the task later.
*/
id: string;
}

export interface ImageUpscaleCreateParams {
/**
* A HTTPS URL.
*/
imageUri: string;

model: 'magnific_precision_upscaler_v2';

/**
* Optimization preset: `sublime` (illustration), `photo` (photographic), or
* `photo_denoiser` (noisy photos).
*/
flavor?: 'sublime' | 'photo' | 'photo_denoiser';

/**
* Multiplies each input dimension to produce output width and height. Defaults
* to 2.
*/
scaleFactor?: 2 | 4 | 8 | 16;

/**
* Sharpness intensity from 0 (none) to 100.
*/
sharpen?: number;

/**
* Grain and texture enhancement from 0 to 100.
*/
smartGrain?: number;

/**
* Fine detail enhancement from 0 to 100.
*/
ultraDetail?: number;
}

export declare namespace ImageUpscale {
export {
type ImageUpscaleCreateResponse as ImageUpscaleCreateResponse,
type ImageUpscaleCreateParams as ImageUpscaleCreateParams,
};
}
5 changes: 5 additions & 0 deletions src/resources/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ export {
type ImageToVideoCreateResponse,
type ImageToVideoCreateParams,
} from './image-to-video';
export {
ImageUpscale,
type ImageUpscaleCreateResponse,
type ImageUpscaleCreateParams,
} from './image-upscale';
export {
Organization,
type OrganizationRetrieveResponse,
Expand Down
22 changes: 21 additions & 1 deletion src/resources/organization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,16 @@ export interface OrganizationRetrieveUsageResponse {
| 'gwm1_avatar_async_text_to_video'
| 'voice_processing'
| 'seedance2'
| 'magnific_precision_upscaler_v2'
| 'kling2.5_turbo_pro'
| 'kling3.0_pro'
| 'kling3.0_4k'
| 'kling3.0_standard'
| 'klingO3_pro'
| 'klingO3_standard'
| 'klingO3_4k'
| 'happyhorse_1_0'
| 'aleph2'
>;

results: Array<OrganizationRetrieveUsageResponse.Result>;
Expand Down Expand Up @@ -183,7 +193,17 @@ export namespace OrganizationRetrieveUsageResponse {
| 'gwm1_avatar_async_audio_to_video'
| 'gwm1_avatar_async_text_to_video'
| 'voice_processing'
| 'seedance2';
| 'seedance2'
| 'magnific_precision_upscaler_v2'
| 'kling2.5_turbo_pro'
| 'kling3.0_pro'
| 'kling3.0_4k'
| 'kling3.0_standard'
| 'klingO3_pro'
| 'klingO3_standard'
| 'klingO3_4k'
| 'happyhorse_1_0'
| 'aleph2';
}
}
}
Expand Down
109 changes: 109 additions & 0 deletions src/resources/text-to-image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export type TextToImageCreateParams =
| TextToImageCreateParams.Gen4Image
| TextToImageCreateParams.GptImage2
| TextToImageCreateParams.GeminiImage3Pro
| TextToImageCreateParams.GeminiImage3_1Flash
| TextToImageCreateParams.Gemini2_5Flash;

export declare namespace TextToImageCreateParams {
Expand Down Expand Up @@ -352,6 +353,114 @@ export declare namespace TextToImageCreateParams {
}
}

export interface GeminiImage3_1Flash {
model: 'gemini_image3.1_flash';

/**
* A non-empty string up to 1000 characters (measured in UTF-16 code units). This
* should describe in detail what should appear in the output.
*/
promptText: string;

/**
* The resolution of the output image.
*/
ratio:
| '512:512'
| '416:624'
| '624:416'
| '432:592'
| '592:432'
| '448:576'
| '576:448'
| '384:672'
| '672:384'
| '768:336'
| '256:1024'
| '1024:256'
| '176:1408'
| '1408:176'
| '1024:1024'
| '832:1248'
| '1248:832'
| '864:1184'
| '1184:864'
| '896:1152'
| '1152:896'
| '768:1344'
| '1344:768'
| '1536:672'
| '512:2048'
| '2048:512'
| '352:2816'
| '2816:352'
| '2048:2048'
| '1696:2528'
| '2528:1696'
| '1792:2400'
| '2400:1792'
| '1856:2304'
| '2304:1856'
| '1536:2752'
| '2752:1536'
| '3168:1344'
| '1024:4096'
| '4096:1024'
| '704:5632'
| '5632:704'
| '4096:4096'
| '3392:5056'
| '5056:3392'
| '3584:4800'
| '4800:3584'
| '3712:4608'
| '4608:3712'
| '3072:5504'
| '5504:3072'
| '6336:2688'
| '2048:8192'
| '8192:2048'
| '1408:11264'
| '11264:1408';

/**
* The number of images to generate. Increasing this number will affect the number
* of credits consumed by the generation. Up to four images can be generated at
* once.
*/
outputCount?: 1 | 4;

/**
* An array of up to 14 images to be used as references for the generated image
* output. Up to five of those images can pass `subject: "human"` to maintain
* character consistency, and up to nine of those images can pass
* `subject: "object"` with high-fidelity images of objects to include in the
* output.
*/
referenceImages?: Array<GeminiImage3_1Flash.ReferenceImage>;
}

export namespace GeminiImage3_1Flash {
export interface ReferenceImage {
/**
* A HTTPS URL.
*/
uri: string;

/**
* Whether this is a reference of a human subject (for character consistency) or an
* object that appears in the output.
*/
subject?: 'object' | 'human';

/**
* A tag to identify the reference image. This is used to reference the image in
* prompt text.
*/
tag?: string;
}
}

export interface Gemini2_5Flash {
model: 'gemini_2.5_flash';

Expand Down
Loading
Loading