@runwayml/sdk 4.11.0 → 4.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/avatar-videos.d.mts +3 -1
- package/resources/avatar-videos.d.mts.map +1 -1
- package/resources/avatar-videos.d.ts +3 -1
- package/resources/avatar-videos.d.ts.map +1 -1
- package/resources/avatars.d.mts +6 -2
- package/resources/avatars.d.mts.map +1 -1
- package/resources/avatars.d.ts +6 -2
- package/resources/avatars.d.ts.map +1 -1
- package/resources/character-performance.d.mts +10 -4
- package/resources/character-performance.d.mts.map +1 -1
- package/resources/character-performance.d.ts +10 -4
- package/resources/character-performance.d.ts.map +1 -1
- package/resources/character-performance.js +1 -1
- package/resources/character-performance.mjs +1 -1
- package/resources/generate/audio.d.mts +184 -0
- package/resources/generate/audio.d.mts.map +1 -0
- package/resources/generate/audio.d.ts +184 -0
- package/resources/generate/audio.d.ts.map +1 -0
- package/resources/generate/audio.js +18 -0
- package/resources/generate/audio.js.map +1 -0
- package/resources/generate/audio.mjs +14 -0
- package/resources/generate/audio.mjs.map +1 -0
- package/resources/generate/generate.d.mts +8 -0
- package/resources/generate/generate.d.mts.map +1 -1
- package/resources/generate/generate.d.ts +8 -0
- package/resources/generate/generate.d.ts.map +1 -1
- package/resources/generate/generate.js +8 -0
- package/resources/generate/generate.js.map +1 -1
- package/resources/generate/generate.mjs +8 -0
- package/resources/generate/generate.mjs.map +1 -1
- package/resources/generate/image.d.mts +173 -0
- package/resources/generate/image.d.mts.map +1 -0
- package/resources/generate/image.d.ts +173 -0
- package/resources/generate/image.d.ts.map +1 -0
- package/resources/generate/image.js +17 -0
- package/resources/generate/image.js.map +1 -0
- package/resources/generate/image.mjs +13 -0
- package/resources/generate/image.mjs.map +1 -0
- package/resources/generate/index.d.mts +2 -0
- package/resources/generate/index.d.mts.map +1 -1
- package/resources/generate/index.d.ts +2 -0
- package/resources/generate/index.d.ts.map +1 -1
- package/resources/generate/index.js +5 -1
- package/resources/generate/index.js.map +1 -1
- package/resources/generate/index.mjs +2 -0
- package/resources/generate/index.mjs.map +1 -1
- package/resources/generate/video.d.mts +17 -7
- package/resources/generate/video.d.mts.map +1 -1
- package/resources/generate/video.d.ts +17 -7
- package/resources/generate/video.d.ts.map +1 -1
- package/resources/image-to-video.d.mts +51 -17
- package/resources/image-to-video.d.mts.map +1 -1
- package/resources/image-to-video.d.ts +51 -17
- package/resources/image-to-video.d.ts.map +1 -1
- package/resources/image-upscale.d.mts +3 -1
- package/resources/image-upscale.d.mts.map +1 -1
- package/resources/image-upscale.d.ts +3 -1
- package/resources/image-upscale.d.ts.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/realtime-sessions.d.mts +25 -25
- package/resources/realtime-sessions.d.mts.map +1 -1
- package/resources/realtime-sessions.d.ts +25 -25
- package/resources/realtime-sessions.d.ts.map +1 -1
- package/resources/recipes.d.mts +48 -24
- package/resources/recipes.d.mts.map +1 -1
- package/resources/recipes.d.ts +48 -24
- package/resources/recipes.d.ts.map +1 -1
- package/resources/routers.d.mts +49 -49
- package/resources/routers.d.ts +49 -49
- package/resources/routers.js +1 -1
- package/resources/routers.mjs +1 -1
- package/resources/speech-to-speech.d.mts +6 -2
- package/resources/speech-to-speech.d.mts.map +1 -1
- package/resources/speech-to-speech.d.ts +6 -2
- package/resources/speech-to-speech.d.ts.map +1 -1
- package/resources/text-to-image.d.mts +36 -14
- package/resources/text-to-image.d.mts.map +1 -1
- package/resources/text-to-image.d.ts +36 -14
- package/resources/text-to-image.d.ts.map +1 -1
- package/resources/text-to-speech.d.mts +3 -1
- package/resources/text-to-speech.d.mts.map +1 -1
- package/resources/text-to-speech.d.ts +3 -1
- package/resources/text-to-speech.d.ts.map +1 -1
- package/resources/text-to-video.d.mts +27 -9
- package/resources/text-to-video.d.mts.map +1 -1
- package/resources/text-to-video.d.ts +27 -9
- package/resources/text-to-video.d.ts.map +1 -1
- package/resources/video-to-video.d.mts +51 -17
- package/resources/video-to-video.d.mts.map +1 -1
- package/resources/video-to-video.d.ts +51 -17
- package/resources/video-to-video.d.ts.map +1 -1
- package/resources/video-upscale.d.mts +3 -1
- package/resources/video-upscale.d.mts.map +1 -1
- package/resources/video-upscale.d.ts +3 -1
- package/resources/video-upscale.d.ts.map +1 -1
- package/resources/voice-dubbing.d.mts +3 -1
- package/resources/voice-dubbing.d.mts.map +1 -1
- package/resources/voice-dubbing.d.ts +3 -1
- package/resources/voice-dubbing.d.ts.map +1 -1
- package/resources/voice-isolation.d.mts +3 -1
- package/resources/voice-isolation.d.mts.map +1 -1
- package/resources/voice-isolation.d.ts +3 -1
- package/resources/voice-isolation.d.ts.map +1 -1
- package/resources/voices.d.mts +3 -1
- package/resources/voices.d.mts.map +1 -1
- package/resources/voices.d.ts +3 -1
- package/resources/voices.d.ts.map +1 -1
- package/resources/workflows.d.mts +9 -3
- package/resources/workflows.d.mts.map +1 -1
- package/resources/workflows.d.ts +9 -3
- package/resources/workflows.d.ts.map +1 -1
- package/src/client.ts +2 -0
- package/src/resources/avatar-videos.ts +3 -1
- package/src/resources/avatars.ts +6 -2
- package/src/resources/character-performance.ts +10 -4
- package/src/resources/generate/audio.ts +269 -0
- package/src/resources/generate/generate.ts +20 -0
- package/src/resources/generate/image.ts +208 -0
- package/src/resources/generate/index.ts +2 -0
- package/src/resources/generate/video.ts +17 -7
- package/src/resources/image-to-video.ts +51 -17
- package/src/resources/image-upscale.ts +3 -1
- package/src/resources/index.ts +1 -0
- package/src/resources/realtime-sessions.ts +29 -28
- package/src/resources/recipes.ts +48 -24
- package/src/resources/routers.ts +49 -49
- package/src/resources/speech-to-speech.ts +6 -2
- package/src/resources/text-to-image.ts +36 -14
- package/src/resources/text-to-speech.ts +3 -1
- package/src/resources/text-to-video.ts +27 -9
- package/src/resources/video-to-video.ts +51 -17
- package/src/resources/video-upscale.ts +3 -1
- package/src/resources/voice-dubbing.ts +3 -1
- package/src/resources/voice-isolation.ts +3 -1
- package/src/resources/voices.ts +3 -1
- package/src/resources/workflows.ts +9 -3
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
+
import * as AudioAPI from "./audio.mjs";
|
|
3
|
+
import { Audio, AudioCreateParams, AudioCreateResponse } from "./audio.mjs";
|
|
4
|
+
import * as ImageAPI from "./image.mjs";
|
|
5
|
+
import { Image, ImageCreateParams, ImageCreateResponse } from "./image.mjs";
|
|
2
6
|
import * as VideoAPI from "./video.mjs";
|
|
3
7
|
import { Video, VideoCreateParams, VideoCreateResponse } from "./video.mjs";
|
|
4
8
|
export declare class Generate extends APIResource {
|
|
5
9
|
video: VideoAPI.Video;
|
|
10
|
+
image: ImageAPI.Image;
|
|
11
|
+
audio: AudioAPI.Audio;
|
|
6
12
|
}
|
|
7
13
|
export declare namespace Generate {
|
|
8
14
|
export { Video as Video, type VideoCreateResponse as VideoCreateResponse, type VideoCreateParams as VideoCreateParams, };
|
|
15
|
+
export { Image as Image, type ImageCreateResponse as ImageCreateResponse, type ImageCreateParams as ImageCreateParams, };
|
|
16
|
+
export { Audio as Audio, type AudioCreateResponse as AudioCreateResponse, type AudioCreateParams as AudioCreateParams, };
|
|
9
17
|
}
|
|
10
18
|
//# sourceMappingURL=generate.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.d.mts","sourceRoot":"","sources":["../../src/resources/generate/generate.ts"],"names":[],"mappings":"AAEA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1,10 +1,18 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.js";
|
|
2
|
+
import * as AudioAPI from "./audio.js";
|
|
3
|
+
import { Audio, AudioCreateParams, AudioCreateResponse } from "./audio.js";
|
|
4
|
+
import * as ImageAPI from "./image.js";
|
|
5
|
+
import { Image, ImageCreateParams, ImageCreateResponse } from "./image.js";
|
|
2
6
|
import * as VideoAPI from "./video.js";
|
|
3
7
|
import { Video, VideoCreateParams, VideoCreateResponse } from "./video.js";
|
|
4
8
|
export declare class Generate extends APIResource {
|
|
5
9
|
video: VideoAPI.Video;
|
|
10
|
+
image: ImageAPI.Image;
|
|
11
|
+
audio: AudioAPI.Audio;
|
|
6
12
|
}
|
|
7
13
|
export declare namespace Generate {
|
|
8
14
|
export { Video as Video, type VideoCreateResponse as VideoCreateResponse, type VideoCreateParams as VideoCreateParams, };
|
|
15
|
+
export { Image as Image, type ImageCreateResponse as ImageCreateResponse, type ImageCreateParams as ImageCreateParams, };
|
|
16
|
+
export { Audio as Audio, type AudioCreateResponse as AudioCreateResponse, type AudioCreateParams as AudioCreateParams, };
|
|
9
17
|
}
|
|
10
18
|
//# sourceMappingURL=generate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/resources/generate/generate.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,QAAQ,mBAAgB;AACpC,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,mBAAgB;AAExE,qBAAa,QAAS,SAAQ,WAAW;IACvC,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAoC;CAC1D;
|
|
1
|
+
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/resources/generate/generate.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,QAAQ,mBAAgB;AACpC,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,mBAAgB;AACxE,OAAO,KAAK,QAAQ,mBAAgB;AACpC,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,mBAAgB;AACxE,OAAO,KAAK,QAAQ,mBAAgB;AACpC,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,mBAAgB;AAExE,qBAAa,QAAS,SAAQ,WAAW;IACvC,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAoC;IACzD,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAoC;IACzD,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAoC;CAC1D;AAMD,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,IAAI,KAAK,EACd,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;IAEF,OAAO,EACL,KAAK,IAAI,KAAK,EACd,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;IAEF,OAAO,EACL,KAAK,IAAI,KAAK,EACd,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
|
|
@@ -4,14 +4,22 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.Generate = void 0;
|
|
5
5
|
const tslib_1 = require("../../internal/tslib.js");
|
|
6
6
|
const resource_1 = require("../../core/resource.js");
|
|
7
|
+
const AudioAPI = tslib_1.__importStar(require("./audio.js"));
|
|
8
|
+
const audio_1 = require("./audio.js");
|
|
9
|
+
const ImageAPI = tslib_1.__importStar(require("./image.js"));
|
|
10
|
+
const image_1 = require("./image.js");
|
|
7
11
|
const VideoAPI = tslib_1.__importStar(require("./video.js"));
|
|
8
12
|
const video_1 = require("./video.js");
|
|
9
13
|
class Generate extends resource_1.APIResource {
|
|
10
14
|
constructor() {
|
|
11
15
|
super(...arguments);
|
|
12
16
|
this.video = new VideoAPI.Video(this._client);
|
|
17
|
+
this.image = new ImageAPI.Image(this._client);
|
|
18
|
+
this.audio = new AudioAPI.Audio(this._client);
|
|
13
19
|
}
|
|
14
20
|
}
|
|
15
21
|
exports.Generate = Generate;
|
|
16
22
|
Generate.Video = video_1.Video;
|
|
23
|
+
Generate.Image = image_1.Image;
|
|
24
|
+
Generate.Audio = audio_1.Audio;
|
|
17
25
|
//# sourceMappingURL=generate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../src/resources/generate/generate.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,6DAAoC;AACpC,sCAAwE;AAExE,MAAa,QAAS,SAAQ,sBAAW;IAAzC;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC3D,CAAC;CAAA;
|
|
1
|
+
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../src/resources/generate/generate.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,6DAAoC;AACpC,sCAAwE;AACxE,6DAAoC;AACpC,sCAAwE;AACxE,6DAAoC;AACpC,sCAAwE;AAExE,MAAa,QAAS,SAAQ,sBAAW;IAAzC;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACzD,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACzD,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC3D,CAAC;CAAA;AAJD,4BAIC;AAED,QAAQ,CAAC,KAAK,GAAG,aAAK,CAAC;AACvB,QAAQ,CAAC,KAAK,GAAG,aAAK,CAAC;AACvB,QAAQ,CAAC,KAAK,GAAG,aAAK,CAAC"}
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import * as AudioAPI from "./audio.mjs";
|
|
4
|
+
import { Audio } from "./audio.mjs";
|
|
5
|
+
import * as ImageAPI from "./image.mjs";
|
|
6
|
+
import { Image } from "./image.mjs";
|
|
3
7
|
import * as VideoAPI from "./video.mjs";
|
|
4
8
|
import { Video } from "./video.mjs";
|
|
5
9
|
export class Generate extends APIResource {
|
|
6
10
|
constructor() {
|
|
7
11
|
super(...arguments);
|
|
8
12
|
this.video = new VideoAPI.Video(this._client);
|
|
13
|
+
this.image = new ImageAPI.Image(this._client);
|
|
14
|
+
this.audio = new AudioAPI.Audio(this._client);
|
|
9
15
|
}
|
|
10
16
|
}
|
|
11
17
|
Generate.Video = Video;
|
|
18
|
+
Generate.Image = Image;
|
|
19
|
+
Generate.Audio = Audio;
|
|
12
20
|
//# sourceMappingURL=generate.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.mjs","sourceRoot":"","sources":["../../src/resources/generate/generate.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,QAAQ,oBAAgB;AACpC,OAAO,EAAE,KAAK,EAA0C,oBAAgB;AAExE,MAAM,OAAO,QAAS,SAAQ,WAAW;IAAzC;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC3D,CAAC;CAAA;AAED,QAAQ,CAAC,KAAK,GAAG,KAAK,CAAC"}
|
|
1
|
+
{"version":3,"file":"generate.mjs","sourceRoot":"","sources":["../../src/resources/generate/generate.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,QAAQ,oBAAgB;AACpC,OAAO,EAAE,KAAK,EAA0C,oBAAgB;AACxE,OAAO,KAAK,QAAQ,oBAAgB;AACpC,OAAO,EAAE,KAAK,EAA0C,oBAAgB;AACxE,OAAO,KAAK,QAAQ,oBAAgB;AACpC,OAAO,EAAE,KAAK,EAA0C,oBAAgB;AAExE,MAAM,OAAO,QAAS,SAAQ,WAAW;IAAzC;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACzD,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACzD,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC3D,CAAC;CAAA;AAED,QAAQ,CAAC,KAAK,GAAG,KAAK,CAAC;AACvB,QAAQ,CAAC,KAAK,GAAG,KAAK,CAAC;AACvB,QAAQ,CAAC,KAAK,GAAG,KAAK,CAAC"}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
+
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
3
|
+
import { APIPromiseWithAwaitableTask } from "../../lib/polling.mjs";
|
|
4
|
+
export declare class Image extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Start an image generation task using a saved Model Router config instead of
|
|
7
|
+
* naming a model.
|
|
8
|
+
*/
|
|
9
|
+
create(body: ImageCreateParams, options?: RequestOptions): APIPromiseWithAwaitableTask<ImageCreateResponse>;
|
|
10
|
+
}
|
|
11
|
+
export interface ImageCreateResponse {
|
|
12
|
+
/**
|
|
13
|
+
* The ID of the created task. Poll GET /v1/tasks/:id for the result.
|
|
14
|
+
*/
|
|
15
|
+
id: string;
|
|
16
|
+
/**
|
|
17
|
+
* Metadata describing which model the router selected and why.
|
|
18
|
+
*/
|
|
19
|
+
routing: ImageCreateResponse.Routing;
|
|
20
|
+
}
|
|
21
|
+
export declare namespace ImageCreateResponse {
|
|
22
|
+
/**
|
|
23
|
+
* Metadata describing which model the router selected and why.
|
|
24
|
+
*/
|
|
25
|
+
interface Routing {
|
|
26
|
+
/**
|
|
27
|
+
* The slug of the router config that was applied to this request.
|
|
28
|
+
*/
|
|
29
|
+
configId: string;
|
|
30
|
+
/**
|
|
31
|
+
* Estimated cost, computed against current pricing.
|
|
32
|
+
*/
|
|
33
|
+
estimatedCost: Routing.EstimatedCost;
|
|
34
|
+
/**
|
|
35
|
+
* The public name of the model the router selected.
|
|
36
|
+
*/
|
|
37
|
+
model: string;
|
|
38
|
+
/**
|
|
39
|
+
* The provider of the selected model.
|
|
40
|
+
*/
|
|
41
|
+
provider: string;
|
|
42
|
+
/**
|
|
43
|
+
* Request-side defaults resolved for the routing response. Not necessarily
|
|
44
|
+
* identical to prepared model options.
|
|
45
|
+
*/
|
|
46
|
+
resolvedInput: Routing.ResolvedInput;
|
|
47
|
+
/**
|
|
48
|
+
* The resolved config settings the router used for this request.
|
|
49
|
+
*/
|
|
50
|
+
resolvedSettings: Routing.ResolvedSettings;
|
|
51
|
+
}
|
|
52
|
+
namespace Routing {
|
|
53
|
+
/**
|
|
54
|
+
* Estimated cost, computed against current pricing.
|
|
55
|
+
*/
|
|
56
|
+
interface EstimatedCost {
|
|
57
|
+
/**
|
|
58
|
+
* Estimated cost of the generation in credits.
|
|
59
|
+
*/
|
|
60
|
+
credits: number;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Request-side defaults resolved for the routing response. Not necessarily
|
|
64
|
+
* identical to prepared model options.
|
|
65
|
+
*/
|
|
66
|
+
interface ResolvedInput {
|
|
67
|
+
/**
|
|
68
|
+
* Aspect ratio used for routing display.
|
|
69
|
+
*/
|
|
70
|
+
aspectRatio: string;
|
|
71
|
+
/**
|
|
72
|
+
* Concrete output ratio derived from aspectRatio and resolution for the selected
|
|
73
|
+
* model.
|
|
74
|
+
*/
|
|
75
|
+
ratio: string;
|
|
76
|
+
/**
|
|
77
|
+
* Megapixel tier used for routing display.
|
|
78
|
+
*/
|
|
79
|
+
resolution: string;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* The resolved config settings the router used for this request.
|
|
83
|
+
*/
|
|
84
|
+
interface ResolvedSettings {
|
|
85
|
+
/**
|
|
86
|
+
* The single optimization preference the config selected, used as the soft
|
|
87
|
+
* weighting when scoring eligible models.
|
|
88
|
+
*/
|
|
89
|
+
optimizeFor: 'cost' | 'latency' | 'quality';
|
|
90
|
+
/**
|
|
91
|
+
* The applied maximum credits per generation for this request's modality, or null
|
|
92
|
+
* if the config sets no ceiling.
|
|
93
|
+
*/
|
|
94
|
+
priceCeiling: number | null;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
export interface ImageCreateParams {
|
|
99
|
+
/**
|
|
100
|
+
* The slug of a saved Model Router config to route this request with.
|
|
101
|
+
*/
|
|
102
|
+
configId: string;
|
|
103
|
+
/**
|
|
104
|
+
* Model-agnostic image generation input. The router selects a model and maps these
|
|
105
|
+
* options to it.
|
|
106
|
+
*/
|
|
107
|
+
input: ImageCreateParams.Input;
|
|
108
|
+
}
|
|
109
|
+
export declare namespace ImageCreateParams {
|
|
110
|
+
/**
|
|
111
|
+
* Model-agnostic image generation input. The router selects a model and maps these
|
|
112
|
+
* options to it.
|
|
113
|
+
*/
|
|
114
|
+
interface Input {
|
|
115
|
+
/**
|
|
116
|
+
* A text prompt describing the desired image.
|
|
117
|
+
*/
|
|
118
|
+
promptText: string;
|
|
119
|
+
/**
|
|
120
|
+
* Desired aspect ratio. Models that do not support the requested aspect are
|
|
121
|
+
* excluded.
|
|
122
|
+
*/
|
|
123
|
+
aspectRatio?: '16:9' | '9:16' | '1:1' | '4:3' | '3:4' | '21:9' | '2:3' | '3:2' | '4:5' | '5:4';
|
|
124
|
+
/**
|
|
125
|
+
* Settings that affect the behavior of the content moderation system.
|
|
126
|
+
*/
|
|
127
|
+
contentModeration?: Input.ContentModeration;
|
|
128
|
+
/**
|
|
129
|
+
* Number of images to generate (1-10). Models that cannot produce the exact count
|
|
130
|
+
* are excluded and cost scales with this value.
|
|
131
|
+
*/
|
|
132
|
+
outputCount?: number;
|
|
133
|
+
/**
|
|
134
|
+
* Optional reference images for models that support them. Tags are assigned per
|
|
135
|
+
* model when omitted.
|
|
136
|
+
*/
|
|
137
|
+
referenceImages?: Array<Input.ReferenceImage>;
|
|
138
|
+
/**
|
|
139
|
+
* Desired megapixel tier. Models that do not support the requested tier are
|
|
140
|
+
* excluded.
|
|
141
|
+
*/
|
|
142
|
+
resolution?: '1k' | '2k' | '4k';
|
|
143
|
+
/**
|
|
144
|
+
* A seed for reproducible generation. Only gen4_image and gen4_image_turbo accept
|
|
145
|
+
* this field.
|
|
146
|
+
*/
|
|
147
|
+
seed?: number;
|
|
148
|
+
}
|
|
149
|
+
namespace Input {
|
|
150
|
+
/**
|
|
151
|
+
* Settings that affect the behavior of the content moderation system.
|
|
152
|
+
*/
|
|
153
|
+
interface ContentModeration {
|
|
154
|
+
/**
|
|
155
|
+
* When set to `low`, the content moderation system will be less strict about
|
|
156
|
+
* preventing generations that include recognizable public figures.
|
|
157
|
+
*/
|
|
158
|
+
publicFigureThreshold?: 'auto' | 'low';
|
|
159
|
+
}
|
|
160
|
+
interface ReferenceImage {
|
|
161
|
+
/**
|
|
162
|
+
* A HTTPS URL, Runway upload URI, or base64 data URI (e.g.
|
|
163
|
+
* `data:image/png;base64,...`, up to 5MB) containing an encoded image. See
|
|
164
|
+
* [our docs](/assets/inputs#images) on image inputs for more information.
|
|
165
|
+
*/
|
|
166
|
+
uri: string;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
export declare namespace Image {
|
|
171
|
+
export { type ImageCreateResponse as ImageCreateResponse, type ImageCreateParams as ImageCreateParams };
|
|
172
|
+
}
|
|
173
|
+
//# sourceMappingURL=image.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image.d.mts","sourceRoot":"","sources":["../../src/resources/generate/image.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAChE,OAAO,EAAE,2BAA2B,EAA0B,8BAA0B;AAExF,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;OAGG;IACH,MAAM,CACJ,IAAI,EAAE,iBAAiB,EACvB,OAAO,CAAC,EAAE,cAAc,GACvB,2BAA2B,CAAC,mBAAmB,CAAC;CAKpD;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,OAAO,EAAE,mBAAmB,CAAC,OAAO,CAAC;CACtC;AAED,yBAAiB,mBAAmB,CAAC;IACnC;;OAEG;IACH,UAAiB,OAAO;QACtB;;WAEG;QACH,QAAQ,EAAE,MAAM,CAAC;QAEjB;;WAEG;QACH,aAAa,EAAE,OAAO,CAAC,aAAa,CAAC;QAErC;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;QAEd;;WAEG;QACH,QAAQ,EAAE,MAAM,CAAC;QAEjB;;;WAGG;QACH,aAAa,EAAE,OAAO,CAAC,aAAa,CAAC;QAErC;;WAEG;QACH,gBAAgB,EAAE,OAAO,CAAC,gBAAgB,CAAC;KAC5C;IAED,UAAiB,OAAO,CAAC;QACvB;;WAEG;QACH,UAAiB,aAAa;YAC5B;;eAEG;YACH,OAAO,EAAE,MAAM,CAAC;SACjB;QAED;;;WAGG;QACH,UAAiB,aAAa;YAC5B;;eAEG;YACH,WAAW,EAAE,MAAM,CAAC;YAEpB;;;eAGG;YACH,KAAK,EAAE,MAAM,CAAC;YAEd;;eAEG;YACH,UAAU,EAAE,MAAM,CAAC;SACpB;QAED;;WAEG;QACH,UAAiB,gBAAgB;YAC/B;;;eAGG;YACH,WAAW,E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from "../../core/resource.js";
|
|
2
|
+
import { RequestOptions } from "../../internal/request-options.js";
|
|
3
|
+
import { APIPromiseWithAwaitableTask } from "../../lib/polling.js";
|
|
4
|
+
export declare class Image extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Start an image generation task using a saved Model Router config instead of
|
|
7
|
+
* naming a model.
|
|
8
|
+
*/
|
|
9
|
+
create(body: ImageCreateParams, options?: RequestOptions): APIPromiseWithAwaitableTask<ImageCreateResponse>;
|
|
10
|
+
}
|
|
11
|
+
export interface ImageCreateResponse {
|
|
12
|
+
/**
|
|
13
|
+
* The ID of the created task. Poll GET /v1/tasks/:id for the result.
|
|
14
|
+
*/
|
|
15
|
+
id: string;
|
|
16
|
+
/**
|
|
17
|
+
* Metadata describing which model the router selected and why.
|
|
18
|
+
*/
|
|
19
|
+
routing: ImageCreateResponse.Routing;
|
|
20
|
+
}
|
|
21
|
+
export declare namespace ImageCreateResponse {
|
|
22
|
+
/**
|
|
23
|
+
* Metadata describing which model the router selected and why.
|
|
24
|
+
*/
|
|
25
|
+
interface Routing {
|
|
26
|
+
/**
|
|
27
|
+
* The slug of the router config that was applied to this request.
|
|
28
|
+
*/
|
|
29
|
+
configId: string;
|
|
30
|
+
/**
|
|
31
|
+
* Estimated cost, computed against current pricing.
|
|
32
|
+
*/
|
|
33
|
+
estimatedCost: Routing.EstimatedCost;
|
|
34
|
+
/**
|
|
35
|
+
* The public name of the model the router selected.
|
|
36
|
+
*/
|
|
37
|
+
model: string;
|
|
38
|
+
/**
|
|
39
|
+
* The provider of the selected model.
|
|
40
|
+
*/
|
|
41
|
+
provider: string;
|
|
42
|
+
/**
|
|
43
|
+
* Request-side defaults resolved for the routing response. Not necessarily
|
|
44
|
+
* identical to prepared model options.
|
|
45
|
+
*/
|
|
46
|
+
resolvedInput: Routing.ResolvedInput;
|
|
47
|
+
/**
|
|
48
|
+
* The resolved config settings the router used for this request.
|
|
49
|
+
*/
|
|
50
|
+
resolvedSettings: Routing.ResolvedSettings;
|
|
51
|
+
}
|
|
52
|
+
namespace Routing {
|
|
53
|
+
/**
|
|
54
|
+
* Estimated cost, computed against current pricing.
|
|
55
|
+
*/
|
|
56
|
+
interface EstimatedCost {
|
|
57
|
+
/**
|
|
58
|
+
* Estimated cost of the generation in credits.
|
|
59
|
+
*/
|
|
60
|
+
credits: number;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Request-side defaults resolved for the routing response. Not necessarily
|
|
64
|
+
* identical to prepared model options.
|
|
65
|
+
*/
|
|
66
|
+
interface ResolvedInput {
|
|
67
|
+
/**
|
|
68
|
+
* Aspect ratio used for routing display.
|
|
69
|
+
*/
|
|
70
|
+
aspectRatio: string;
|
|
71
|
+
/**
|
|
72
|
+
* Concrete output ratio derived from aspectRatio and resolution for the selected
|
|
73
|
+
* model.
|
|
74
|
+
*/
|
|
75
|
+
ratio: string;
|
|
76
|
+
/**
|
|
77
|
+
* Megapixel tier used for routing display.
|
|
78
|
+
*/
|
|
79
|
+
resolution: string;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* The resolved config settings the router used for this request.
|
|
83
|
+
*/
|
|
84
|
+
interface ResolvedSettings {
|
|
85
|
+
/**
|
|
86
|
+
* The single optimization preference the config selected, used as the soft
|
|
87
|
+
* weighting when scoring eligible models.
|
|
88
|
+
*/
|
|
89
|
+
optimizeFor: 'cost' | 'latency' | 'quality';
|
|
90
|
+
/**
|
|
91
|
+
* The applied maximum credits per generation for this request's modality, or null
|
|
92
|
+
* if the config sets no ceiling.
|
|
93
|
+
*/
|
|
94
|
+
priceCeiling: number | null;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
export interface ImageCreateParams {
|
|
99
|
+
/**
|
|
100
|
+
* The slug of a saved Model Router config to route this request with.
|
|
101
|
+
*/
|
|
102
|
+
configId: string;
|
|
103
|
+
/**
|
|
104
|
+
* Model-agnostic image generation input. The router selects a model and maps these
|
|
105
|
+
* options to it.
|
|
106
|
+
*/
|
|
107
|
+
input: ImageCreateParams.Input;
|
|
108
|
+
}
|
|
109
|
+
export declare namespace ImageCreateParams {
|
|
110
|
+
/**
|
|
111
|
+
* Model-agnostic image generation input. The router selects a model and maps these
|
|
112
|
+
* options to it.
|
|
113
|
+
*/
|
|
114
|
+
interface Input {
|
|
115
|
+
/**
|
|
116
|
+
* A text prompt describing the desired image.
|
|
117
|
+
*/
|
|
118
|
+
promptText: string;
|
|
119
|
+
/**
|
|
120
|
+
* Desired aspect ratio. Models that do not support the requested aspect are
|
|
121
|
+
* excluded.
|
|
122
|
+
*/
|
|
123
|
+
aspectRatio?: '16:9' | '9:16' | '1:1' | '4:3' | '3:4' | '21:9' | '2:3' | '3:2' | '4:5' | '5:4';
|
|
124
|
+
/**
|
|
125
|
+
* Settings that affect the behavior of the content moderation system.
|
|
126
|
+
*/
|
|
127
|
+
contentModeration?: Input.ContentModeration;
|
|
128
|
+
/**
|
|
129
|
+
* Number of images to generate (1-10). Models that cannot produce the exact count
|
|
130
|
+
* are excluded and cost scales with this value.
|
|
131
|
+
*/
|
|
132
|
+
outputCount?: number;
|
|
133
|
+
/**
|
|
134
|
+
* Optional reference images for models that support them. Tags are assigned per
|
|
135
|
+
* model when omitted.
|
|
136
|
+
*/
|
|
137
|
+
referenceImages?: Array<Input.ReferenceImage>;
|
|
138
|
+
/**
|
|
139
|
+
* Desired megapixel tier. Models that do not support the requested tier are
|
|
140
|
+
* excluded.
|
|
141
|
+
*/
|
|
142
|
+
resolution?: '1k' | '2k' | '4k';
|
|
143
|
+
/**
|
|
144
|
+
* A seed for reproducible generation. Only gen4_image and gen4_image_turbo accept
|
|
145
|
+
* this field.
|
|
146
|
+
*/
|
|
147
|
+
seed?: number;
|
|
148
|
+
}
|
|
149
|
+
namespace Input {
|
|
150
|
+
/**
|
|
151
|
+
* Settings that affect the behavior of the content moderation system.
|
|
152
|
+
*/
|
|
153
|
+
interface ContentModeration {
|
|
154
|
+
/**
|
|
155
|
+
* When set to `low`, the content moderation system will be less strict about
|
|
156
|
+
* preventing generations that include recognizable public figures.
|
|
157
|
+
*/
|
|
158
|
+
publicFigureThreshold?: 'auto' | 'low';
|
|
159
|
+
}
|
|
160
|
+
interface ReferenceImage {
|
|
161
|
+
/**
|
|
162
|
+
* A HTTPS URL, Runway upload URI, or base64 data URI (e.g.
|
|
163
|
+
* `data:image/png;base64,...`, up to 5MB) containing an encoded image. See
|
|
164
|
+
* [our docs](/assets/inputs#images) on image inputs for more information.
|
|
165
|
+
*/
|
|
166
|
+
uri: string;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
export declare namespace Image {
|
|
171
|
+
export { type ImageCreateResponse as ImageCreateResponse, type ImageCreateParams as ImageCreateParams };
|
|
172
|
+
}
|
|
173
|
+
//# sourceMappingURL=image.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../src/resources/generate/image.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAChE,OAAO,EAAE,2BAA2B,EAA0B,6BAA0B;AAExF,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;OAGG;IACH,MAAM,CACJ,IAAI,EAAE,iBAAiB,EACvB,OAAO,CAAC,EAAE,cAAc,GACvB,2BAA2B,CAAC,mBAAmB,CAAC;CAKpD;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,OAAO,EAAE,mBAAmB,CAAC,OAAO,CAAC;CACtC;AAED,yBAAiB,mBAAmB,CAAC;IACnC;;OAEG;IACH,UAAiB,OAAO;QACtB;;WAEG;QACH,QAAQ,EAAE,MAAM,CAAC;QAEjB;;WAEG;QACH,aAAa,EAAE,OAAO,CAAC,aAAa,CAAC;QAErC;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;QAEd;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AE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;QAEhC;;;WAGG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;KACf;IAED,UAAiB,KAAK,CAAC;QACrB;;WAEG;QACH,UAAiB,iBAAiB;YAChC;;;eAGG;YACH,qBAAqB,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;SACxC;QAED,UAAiB,cAAc;YAC7B;;;;eAIG;YACH,GAAG,EAAE,MAAM,CAAC;SACb;KACF;CACF;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EAAE,KAAK,mBAAmB,IAAI,mBAAmB,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,CAAC;CACzG"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Image = void 0;
|
|
5
|
+
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
const polling_1 = require("../../lib/polling.js");
|
|
7
|
+
class Image extends resource_1.APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Start an image generation task using a saved Model Router config instead of
|
|
10
|
+
* naming a model.
|
|
11
|
+
*/
|
|
12
|
+
create(body, options) {
|
|
13
|
+
return (0, polling_1.wrapAsWaitableResource)(this._client)(this._client.post('/v1/generate/image', { body, ...options }));
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.Image = Image;
|
|
17
|
+
//# sourceMappingURL=image.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image.js","sourceRoot":"","sources":["../../src/resources/generate/image.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,kDAAwF;AAExF,MAAa,KAAM,SAAQ,sBAAW;IACpC;;;OAGG;IACH,MAAM,CACJ,IAAuB,EACvB,OAAwB;QAExB,OAAO,IAAA,gCAAsB,EAAsB,IAAI,CAAC,OAAO,CAAC,CAC9D,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAC9D,CAAC;IACJ,CAAC;CACF;AAbD,sBAaC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import { wrapAsWaitableResource } from "../../lib/polling.mjs";
|
|
4
|
+
export class Image extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Start an image generation task using a saved Model Router config instead of
|
|
7
|
+
* naming a model.
|
|
8
|
+
*/
|
|
9
|
+
create(body, options) {
|
|
10
|
+
return wrapAsWaitableResource(this._client)(this._client.post('/v1/generate/image', { body, ...options }));
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=image.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image.mjs","sourceRoot":"","sources":["../../src/resources/generate/image.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAElD,OAAO,EAA+B,sBAAsB,EAAE,8BAA0B;AAExF,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;;OAGG;IACH,MAAM,CACJ,IAAuB,EACvB,OAAwB;QAExB,OAAO,sBAAsB,CAAsB,IAAI,CAAC,OAAO,CAAC,CAC9D,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAC9D,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export { Audio, type AudioCreateResponse, type AudioCreateParams } from "./audio.mjs";
|
|
1
2
|
export { Generate } from "./generate.mjs";
|
|
3
|
+
export { Image, type ImageCreateResponse, type ImageCreateParams } from "./image.mjs";
|
|
2
4
|
export { Video, type VideoCreateResponse, type VideoCreateParams } from "./video.mjs";
|
|
3
5
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/generate/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,uBAAmB;AACtC,OAAO,EAAE,KAAK,EAAE,KAAK,mBAAmB,EAAE,KAAK,iBAAiB,EAAE,oBAAgB"}
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/generate/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,KAAK,mBAAmB,EAAE,KAAK,iBAAiB,EAAE,oBAAgB;AAClF,OAAO,EAAE,QAAQ,EAAE,uBAAmB;AACtC,OAAO,EAAE,KAAK,EAAE,KAAK,mBAAmB,EAAE,KAAK,iBAAiB,EAAE,oBAAgB;AAClF,OAAO,EAAE,KAAK,EAAE,KAAK,mBAAmB,EAAE,KAAK,iBAAiB,EAAE,oBAAgB"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export { Audio, type AudioCreateResponse, type AudioCreateParams } from "./audio.js";
|
|
1
2
|
export { Generate } from "./generate.js";
|
|
3
|
+
export { Image, type ImageCreateResponse, type ImageCreateParams } from "./image.js";
|
|
2
4
|
export { Video, type VideoCreateResponse, type VideoCreateParams } from "./video.js";
|
|
3
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/generate/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,sBAAmB;AACtC,OAAO,EAAE,KAAK,EAAE,KAAK,mBAAmB,EAAE,KAAK,iBAAiB,EAAE,mBAAgB"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/generate/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,KAAK,mBAAmB,EAAE,KAAK,iBAAiB,EAAE,mBAAgB;AAClF,OAAO,EAAE,QAAQ,EAAE,sBAAmB;AACtC,OAAO,EAAE,KAAK,EAAE,KAAK,mBAAmB,EAAE,KAAK,iBAAiB,EAAE,mBAAgB;AAClF,OAAO,EAAE,KAAK,EAAE,KAAK,mBAAmB,EAAE,KAAK,iBAAiB,EAAE,mBAAgB"}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Video = exports.Generate = void 0;
|
|
4
|
+
exports.Video = exports.Image = exports.Generate = exports.Audio = void 0;
|
|
5
|
+
var audio_1 = require("./audio.js");
|
|
6
|
+
Object.defineProperty(exports, "Audio", { enumerable: true, get: function () { return audio_1.Audio; } });
|
|
5
7
|
var generate_1 = require("./generate.js");
|
|
6
8
|
Object.defineProperty(exports, "Generate", { enumerable: true, get: function () { return generate_1.Generate; } });
|
|
9
|
+
var image_1 = require("./image.js");
|
|
10
|
+
Object.defineProperty(exports, "Image", { enumerable: true, get: function () { return image_1.Image; } });
|
|
7
11
|
var video_1 = require("./video.js");
|
|
8
12
|
Object.defineProperty(exports, "Video", { enumerable: true, get: function () { return video_1.Video; } });
|
|
9
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/generate/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,0CAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,oCAAkF;AAAzE,8FAAA,KAAK,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/generate/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,oCAAkF;AAAzE,8FAAA,KAAK,OAAA;AACd,0CAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,oCAAkF;AAAzE,8FAAA,KAAK,OAAA;AACd,oCAAkF;AAAzE,8FAAA,KAAK,OAAA"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
export { Audio } from "./audio.mjs";
|
|
2
3
|
export { Generate } from "./generate.mjs";
|
|
4
|
+
export { Image } from "./image.mjs";
|
|
3
5
|
export { Video } from "./video.mjs";
|
|
4
6
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/generate/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,QAAQ,EAAE,uBAAmB;AACtC,OAAO,EAAE,KAAK,EAAoD,oBAAgB"}
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/generate/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,KAAK,EAAoD,oBAAgB;AAClF,OAAO,EAAE,QAAQ,EAAE,uBAAmB;AACtC,OAAO,EAAE,KAAK,EAAoD,oBAAgB;AAClF,OAAO,EAAE,KAAK,EAAoD,oBAAgB"}
|
|
@@ -88,7 +88,7 @@ export declare namespace VideoCreateResponse {
|
|
|
88
88
|
*/
|
|
89
89
|
optimizeFor: 'cost' | 'latency' | 'quality';
|
|
90
90
|
/**
|
|
91
|
-
* The applied maximum credits per generation for this request
|
|
91
|
+
* The applied maximum credits per generation for this request's modality, or null
|
|
92
92
|
* if the config sets no ceiling.
|
|
93
93
|
*/
|
|
94
94
|
priceCeiling: number | null;
|
|
@@ -121,7 +121,7 @@ export declare namespace VideoCreateParams {
|
|
|
121
121
|
* Whether to generate native audio with the video. When true, only models that
|
|
122
122
|
* output audio remain eligible; when false, silent models and models with an audio
|
|
123
123
|
* toggle remain eligible (always-on native-audio models are excluded). When
|
|
124
|
-
* omitted, the selected model
|
|
124
|
+
* omitted, the selected model's default applies.
|
|
125
125
|
*/
|
|
126
126
|
audio?: boolean;
|
|
127
127
|
/**
|
|
@@ -185,7 +185,9 @@ export declare namespace VideoCreateParams {
|
|
|
185
185
|
interface UnionMember0 {
|
|
186
186
|
seconds: number;
|
|
187
187
|
/**
|
|
188
|
-
* A HTTPS URL.
|
|
188
|
+
* A HTTPS URL, Runway upload URI, or base64 data URI (e.g.
|
|
189
|
+
* `data:image/png;base64,...`, up to 5MB) containing an encoded image. See
|
|
190
|
+
* [our docs](/assets/inputs#images) on image inputs for more information.
|
|
189
191
|
*/
|
|
190
192
|
uri: string;
|
|
191
193
|
range?: UnionMember0.Range;
|
|
@@ -199,7 +201,9 @@ export declare namespace VideoCreateParams {
|
|
|
199
201
|
interface UnionMember1 {
|
|
200
202
|
at: number;
|
|
201
203
|
/**
|
|
202
|
-
* A HTTPS URL.
|
|
204
|
+
* A HTTPS URL, Runway upload URI, or base64 data URI (e.g.
|
|
205
|
+
* `data:image/png;base64,...`, up to 5MB) containing an encoded image. See
|
|
206
|
+
* [our docs](/assets/inputs#images) on image inputs for more information.
|
|
203
207
|
*/
|
|
204
208
|
uri: string;
|
|
205
209
|
range?: UnionMember1.Range;
|
|
@@ -212,7 +216,9 @@ export declare namespace VideoCreateParams {
|
|
|
212
216
|
}
|
|
213
217
|
interface ReferenceAudio {
|
|
214
218
|
/**
|
|
215
|
-
* A HTTPS URL.
|
|
219
|
+
* A HTTPS URL, Runway upload URI, or base64 data URI (e.g.
|
|
220
|
+
* `data:audio/mp3;base64,...`, up to 16MB) containing an encoded audio. See
|
|
221
|
+
* [our docs](/assets/inputs#audio) on audio inputs for more information.
|
|
216
222
|
*/
|
|
217
223
|
uri: string;
|
|
218
224
|
}
|
|
@@ -223,7 +229,9 @@ export declare namespace VideoCreateParams {
|
|
|
223
229
|
*/
|
|
224
230
|
role: 'first' | 'last' | 'reference';
|
|
225
231
|
/**
|
|
226
|
-
* A HTTPS URL.
|
|
232
|
+
* A HTTPS URL, Runway upload URI, or base64 data URI (e.g.
|
|
233
|
+
* `data:image/png;base64,...`, up to 5MB) containing an encoded image. See
|
|
234
|
+
* [our docs](/assets/inputs#images) on image inputs for more information.
|
|
227
235
|
*/
|
|
228
236
|
uri: string;
|
|
229
237
|
}
|
|
@@ -234,7 +242,9 @@ export declare namespace VideoCreateParams {
|
|
|
234
242
|
*/
|
|
235
243
|
role: 'source' | 'reference';
|
|
236
244
|
/**
|
|
237
|
-
* A HTTPS URL.
|
|
245
|
+
* A HTTPS URL, Runway upload URI, or base64 data URI (e.g.
|
|
246
|
+
* `data:video/mp4;base64,...`, up to 16MB) containing an encoded video. See
|
|
247
|
+
* [our docs](/assets/inputs#videos) on video inputs for more information.
|
|
238
248
|
*/
|
|
239
249
|
uri: string;
|
|
240
250
|
}
|