From 85101d8c177a9053b631238adaabb3d38875dfaa Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 6 Jul 2026 20:00:36 +0000
Subject: [PATCH 1/2] feat(api): add ad_localization recipe
Add POST /v1/recipes/ad_localization for localizing ad images by target
language (referenceImage + targetLanguage).
---
.stats.yml | 8 +--
api.md | 2 +
src/client.ts | 4 ++
src/resources/index.ts | 2 +
src/resources/recipes.ts | 77 +++++++++++++++++++++++++++++
tests/api-resources/recipes.test.ts | 23 +++++++++
6 files changed, 112 insertions(+), 4 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index f6fb8cf..b1f4800 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 50
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runwayml/runwayml-caa255c8f1c6fd2b54d331eeacc13de517b8dbaba491ef94745d107798b5eb7a.yml
-openapi_spec_hash: d9f7b43604b06f389e2fc45376d0a519
-config_hash: 955a0e451964a44778c5c0f54ca1c994
+configured_endpoints: 51
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runwayml/runwayml-d934e6804620f70a9a7d88bb3acf27146b57860ed56691e390e46027b3c04d4a.yml
+openapi_spec_hash: 132fc1ce816bcfd680a239dc1ed58c8e
+config_hash: 7caf94f26186e1ee432efcaa0b590bab
diff --git a/api.md b/api.md
index d115033..08738e9 100644
--- a/api.md
+++ b/api.md
@@ -216,6 +216,7 @@ Methods:
Types:
+- RecipeAdLocalizationResponse
- RecipeMarketingStockImageResponse
- RecipeMultiShotVideoResponse
- RecipeProductAdResponse
@@ -225,6 +226,7 @@ Types:
Methods:
+- client.recipes.adLocalization({ ...params }) -> RecipeAdLocalizationResponse
- client.recipes.marketingStockImage({ ...params }) -> RecipeMarketingStockImageResponse
- client.recipes.multiShotVideo({ ...params }) -> RecipeMultiShotVideoResponse
- client.recipes.productAd({ ...params }) -> RecipeProductAdResponse
diff --git a/src/client.ts b/src/client.ts
index 361cbc1..1c722ef 100644
--- a/src/client.ts
+++ b/src/client.ts
@@ -78,6 +78,8 @@ import {
RealtimeSessions,
} from './resources/realtime-sessions';
import {
+ RecipeAdLocalizationParams,
+ RecipeAdLocalizationResponse,
RecipeMarketingStockImageParams,
RecipeMarketingStockImageResponse,
RecipeMultiShotVideoParams,
@@ -1133,12 +1135,14 @@ export declare namespace RunwayML {
export {
Recipes as Recipes,
+ type RecipeAdLocalizationResponse as RecipeAdLocalizationResponse,
type RecipeMarketingStockImageResponse as RecipeMarketingStockImageResponse,
type RecipeMultiShotVideoResponse as RecipeMultiShotVideoResponse,
type RecipeProductAdResponse as RecipeProductAdResponse,
type RecipeProductCampaignImageResponse as RecipeProductCampaignImageResponse,
type RecipeProductSwapResponse as RecipeProductSwapResponse,
type RecipeProductUgcResponse as RecipeProductUgcResponse,
+ type RecipeAdLocalizationParams as RecipeAdLocalizationParams,
type RecipeMarketingStockImageParams as RecipeMarketingStockImageParams,
type RecipeMultiShotVideoParams as RecipeMultiShotVideoParams,
type RecipeProductAdParams as RecipeProductAdParams,
diff --git a/src/resources/index.ts b/src/resources/index.ts
index 453a773..c450fce 100644
--- a/src/resources/index.ts
+++ b/src/resources/index.ts
@@ -60,12 +60,14 @@ export {
} from './realtime-sessions';
export {
Recipes,
+ type RecipeAdLocalizationResponse,
type RecipeMarketingStockImageResponse,
type RecipeMultiShotVideoResponse,
type RecipeProductAdResponse,
type RecipeProductCampaignImageResponse,
type RecipeProductSwapResponse,
type RecipeProductUgcResponse,
+ type RecipeAdLocalizationParams,
type RecipeMarketingStockImageParams,
type RecipeMultiShotVideoParams,
type RecipeProductAdParams,
diff --git a/src/resources/recipes.ts b/src/resources/recipes.ts
index 1bcf5ac..8697945 100644
--- a/src/resources/recipes.ts
+++ b/src/resources/recipes.ts
@@ -5,6 +5,19 @@ import { RequestOptions } from '../internal/request-options';
import { APIPromiseWithAwaitableTask, wrapAsWaitableResource } from '../lib/polling';
export class Recipes extends APIResource {
+ /**
+ * Localize an existing ad image for a target language, preserving visual creative
+ * while adapting on-screen messaging.
+ */
+ adLocalization(
+ body: RecipeAdLocalizationParams,
+ options?: RequestOptions,
+ ): APIPromiseWithAwaitableTask {
+ return wrapAsWaitableResource(this._client)(
+ this._client.post('/v1/recipes/ad_localization', { body, ...options }),
+ );
+ }
+
/**
* Generate a polished marketing stock image from a text brief and optional brand
* logo image.
@@ -83,6 +96,13 @@ export class Recipes extends APIResource {
}
}
+export interface RecipeAdLocalizationResponse {
+ /**
+ * The ID of the task that was created. Use this to retrieve the task later.
+ */
+ id: string;
+}
+
export interface RecipeMarketingStockImageResponse {
/**
* The ID of the task that was created. Use this to retrieve the task later.
@@ -125,6 +145,61 @@ export interface RecipeProductUgcResponse {
id: string;
}
+export interface RecipeAdLocalizationParams {
+ /**
+ * Reference ad image to localize. See [our docs](/assets/inputs#images) on image
+ * inputs.
+ */
+ referenceImage: RecipeAdLocalizationParams.ReferenceImage;
+
+ /**
+ * Target language for the localized ad. Use ISO-style codes (e.g. "ja" for
+ * Japanese, "es" for Spanish).
+ */
+ targetLanguage:
+ | 'ar'
+ | 'zh'
+ | 'zh-Hant'
+ | 'nl'
+ | 'en'
+ | 'fr'
+ | 'de'
+ | 'hi'
+ | 'id'
+ | 'it'
+ | 'ja'
+ | 'ko'
+ | 'pl'
+ | 'pt'
+ | 'ru'
+ | 'es'
+ | 'sv'
+ | 'th'
+ | 'tr'
+ | 'uk'
+ | 'vi'
+ | 'el';
+
+ /**
+ * Workflow version. Use a dated version (e.g. "2026-06") to pin behavior, or
+ * "unsafe-latest" to track the newest stable version (may break without notice).
+ */
+ version: '2026-06' | 'unsafe-latest';
+}
+
+export namespace RecipeAdLocalizationParams {
+ /**
+ * Reference ad image to localize. See [our docs](/assets/inputs#images) on image
+ * inputs.
+ */
+ export interface ReferenceImage {
+ /**
+ * A HTTPS URL.
+ */
+ uri: string;
+ }
+}
+
export interface RecipeMarketingStockImageParams {
/**
* Marketing image brief. Describe the subject, audience, channel, desired mood,
@@ -561,12 +636,14 @@ export namespace RecipeProductUgcParams {
export declare namespace Recipes {
export {
+ type RecipeAdLocalizationResponse as RecipeAdLocalizationResponse,
type RecipeMarketingStockImageResponse as RecipeMarketingStockImageResponse,
type RecipeMultiShotVideoResponse as RecipeMultiShotVideoResponse,
type RecipeProductAdResponse as RecipeProductAdResponse,
type RecipeProductCampaignImageResponse as RecipeProductCampaignImageResponse,
type RecipeProductSwapResponse as RecipeProductSwapResponse,
type RecipeProductUgcResponse as RecipeProductUgcResponse,
+ type RecipeAdLocalizationParams as RecipeAdLocalizationParams,
type RecipeMarketingStockImageParams as RecipeMarketingStockImageParams,
type RecipeMultiShotVideoParams as RecipeMultiShotVideoParams,
type RecipeProductAdParams as RecipeProductAdParams,
diff --git a/tests/api-resources/recipes.test.ts b/tests/api-resources/recipes.test.ts
index ae4031a..e3273f5 100644
--- a/tests/api-resources/recipes.test.ts
+++ b/tests/api-resources/recipes.test.ts
@@ -8,6 +8,29 @@ const client = new RunwayML({
});
describe('resource recipes', () => {
+ test('adLocalization: only required params', async () => {
+ const responsePromise = client.recipes.adLocalization({
+ referenceImage: { uri: 'https://example.com/file' },
+ targetLanguage: 'ar',
+ version: '2026-06',
+ });
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ test('adLocalization: required and optional params', async () => {
+ const response = await client.recipes.adLocalization({
+ referenceImage: { uri: 'https://example.com/file' },
+ targetLanguage: 'ar',
+ version: '2026-06',
+ });
+ });
+
test('marketingStockImage: only required params', async () => {
const responsePromise = client.recipes.marketingStockImage({ prompt: 'x', version: '2026-06' });
const rawResponse = await responsePromise.asResponse();
From 6c619a88a9416e621b38d0926ac8d6d448353a50 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 6 Jul 2026 20:19:06 +0000
Subject: [PATCH 2/2] release: 4.9.0
---
.release-please-manifest.json | 2 +-
CHANGELOG.md | 8 ++++++++
package.json | 2 +-
src/version.ts | 2 +-
4 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 1ed3fbd..d9141eb 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "4.8.0"
+ ".": "4.9.0"
}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index acec617..e4e1037 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
# Changelog
+## 4.9.0 (2026-07-06)
+
+Full Changelog: [v4.8.0...v4.9.0](https://github.com/runwayml/sdk-node/compare/v4.8.0...v4.9.0)
+
+### Features
+
+* **api:** add ad_localization recipe ([85101d8](https://github.com/runwayml/sdk-node/commit/85101d8c177a9053b631238adaabb3d38875dfaa))
+
## 4.8.0 (2026-07-06)
Full Changelog: [v4.7.0...v4.8.0](https://github.com/runwayml/sdk-node/compare/v4.7.0...v4.8.0)
diff --git a/package.json b/package.json
index b4b149e..e6620f9 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@runwayml/sdk",
- "version": "4.8.0",
+ "version": "4.9.0",
"description": "The official TypeScript library for the RunwayML API",
"author": "RunwayML ",
"types": "dist/index.d.ts",
diff --git a/src/version.ts b/src/version.ts
index 5ae204f..7e0a988 100644
--- a/src/version.ts
+++ b/src/version.ts
@@ -1 +1 @@
-export const VERSION = '4.8.0'; // x-release-please-version
+export const VERSION = '4.9.0'; // x-release-please-version