@runwayml/sdk 4.11.0 → 4.12.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 +14 -0
- package/package.json +1 -1
- package/resources/generate/audio.d.mts +180 -0
- package/resources/generate/audio.d.mts.map +1 -0
- package/resources/generate/audio.d.ts +180 -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 +171 -0
- package/resources/generate/image.d.mts.map +1 -0
- package/resources/generate/image.d.ts +171 -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/routers.d.mts +24 -24
- package/resources/routers.d.ts +24 -24
- package/src/resources/generate/audio.ts +265 -0
- package/src/resources/generate/generate.ts +20 -0
- package/src/resources/generate/image.ts +206 -0
- package/src/resources/generate/index.ts +2 -0
- package/src/resources/routers.ts +24 -24
- 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
|
@@ -0,0 +1,171 @@
|
|
|
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.
|
|
163
|
+
*/
|
|
164
|
+
uri: string;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
export declare namespace Image {
|
|
169
|
+
export { type ImageCreateResponse as ImageCreateResponse, type ImageCreateParams as ImageCreateParams };
|
|
170
|
+
}
|
|
171
|
+
//# 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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AI,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;;eAEG;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,171 @@
|
|
|
1
|
+
import { APIResource } 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.
|
|
163
|
+
*/
|
|
164
|
+
uri: string;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
export declare namespace Image {
|
|
169
|
+
export { type ImageCreateResponse as ImageCreateResponse, type ImageCreateParams as ImageCreateParams };
|
|
170
|
+
}
|
|
171
|
+
//# 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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K,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;QAE/F;;WAEG;QACH,iBAAiB,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC;QAE5C;;;WAGG;QACH,WAAW,CAAC,EAAE,MAAM,CAAC;QAErB;;;WAGG;QACH,eAAe,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;QAE9C;;;WAGG;QACH,UAAU,CAAC,EAAE,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;;eAEG;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"}
|
package/resources/routers.d.mts
CHANGED
|
@@ -78,8 +78,8 @@ export declare namespace RouterCreateResponse {
|
|
|
78
78
|
maxCreditsPerGeneration?: Settings.MaxCreditsPerGeneration;
|
|
79
79
|
/**
|
|
80
80
|
* When mode is allow_new_except, ids are excluded; when allowlist_only, ids are
|
|
81
|
-
* the only allowed values. Each id must be a known public video model
|
|
82
|
-
* (unknown ids are rejected on create/update).
|
|
81
|
+
* the only allowed values. Each id must be a known public video or image model
|
|
82
|
+
* name (unknown ids are rejected on create/update).
|
|
83
83
|
*/
|
|
84
84
|
models?: Settings.Models;
|
|
85
85
|
/**
|
|
@@ -99,8 +99,8 @@ export declare namespace RouterCreateResponse {
|
|
|
99
99
|
}
|
|
100
100
|
/**
|
|
101
101
|
* When mode is allow_new_except, ids are excluded; when allowlist_only, ids are
|
|
102
|
-
* the only allowed values. Each id must be a known public video model
|
|
103
|
-
* (unknown ids are rejected on create/update).
|
|
102
|
+
* the only allowed values. Each id must be a known public video or image model
|
|
103
|
+
* name (unknown ids are rejected on create/update).
|
|
104
104
|
*/
|
|
105
105
|
interface Models {
|
|
106
106
|
ids: Array<string>;
|
|
@@ -157,8 +157,8 @@ export declare namespace RouterRetrieveResponse {
|
|
|
157
157
|
maxCreditsPerGeneration?: Settings.MaxCreditsPerGeneration;
|
|
158
158
|
/**
|
|
159
159
|
* When mode is allow_new_except, ids are excluded; when allowlist_only, ids are
|
|
160
|
-
* the only allowed values. Each id must be a known public video model
|
|
161
|
-
* (unknown ids are rejected on create/update).
|
|
160
|
+
* the only allowed values. Each id must be a known public video or image model
|
|
161
|
+
* name (unknown ids are rejected on create/update).
|
|
162
162
|
*/
|
|
163
163
|
models?: Settings.Models;
|
|
164
164
|
/**
|
|
@@ -178,8 +178,8 @@ export declare namespace RouterRetrieveResponse {
|
|
|
178
178
|
}
|
|
179
179
|
/**
|
|
180
180
|
* When mode is allow_new_except, ids are excluded; when allowlist_only, ids are
|
|
181
|
-
* the only allowed values. Each id must be a known public video model
|
|
182
|
-
* (unknown ids are rejected on create/update).
|
|
181
|
+
* the only allowed values. Each id must be a known public video or image model
|
|
182
|
+
* name (unknown ids are rejected on create/update).
|
|
183
183
|
*/
|
|
184
184
|
interface Models {
|
|
185
185
|
ids: Array<string>;
|
|
@@ -236,8 +236,8 @@ export declare namespace RouterUpdateResponse {
|
|
|
236
236
|
maxCreditsPerGeneration?: Settings.MaxCreditsPerGeneration;
|
|
237
237
|
/**
|
|
238
238
|
* When mode is allow_new_except, ids are excluded; when allowlist_only, ids are
|
|
239
|
-
* the only allowed values. Each id must be a known public video model
|
|
240
|
-
* (unknown ids are rejected on create/update).
|
|
239
|
+
* the only allowed values. Each id must be a known public video or image model
|
|
240
|
+
* name (unknown ids are rejected on create/update).
|
|
241
241
|
*/
|
|
242
242
|
models?: Settings.Models;
|
|
243
243
|
/**
|
|
@@ -257,8 +257,8 @@ export declare namespace RouterUpdateResponse {
|
|
|
257
257
|
}
|
|
258
258
|
/**
|
|
259
259
|
* When mode is allow_new_except, ids are excluded; when allowlist_only, ids are
|
|
260
|
-
* the only allowed values. Each id must be a known public video model
|
|
261
|
-
* (unknown ids are rejected on create/update).
|
|
260
|
+
* the only allowed values. Each id must be a known public video or image model
|
|
261
|
+
* name (unknown ids are rejected on create/update).
|
|
262
262
|
*/
|
|
263
263
|
interface Models {
|
|
264
264
|
ids: Array<string>;
|
|
@@ -318,8 +318,8 @@ export declare namespace RouterListResponse {
|
|
|
318
318
|
maxCreditsPerGeneration?: Settings.MaxCreditsPerGeneration;
|
|
319
319
|
/**
|
|
320
320
|
* When mode is allow_new_except, ids are excluded; when allowlist_only, ids are
|
|
321
|
-
* the only allowed values. Each id must be a known public video model
|
|
322
|
-
* (unknown ids are rejected on create/update).
|
|
321
|
+
* the only allowed values. Each id must be a known public video or image model
|
|
322
|
+
* name (unknown ids are rejected on create/update).
|
|
323
323
|
*/
|
|
324
324
|
models?: Settings.Models;
|
|
325
325
|
/**
|
|
@@ -339,8 +339,8 @@ export declare namespace RouterListResponse {
|
|
|
339
339
|
}
|
|
340
340
|
/**
|
|
341
341
|
* When mode is allow_new_except, ids are excluded; when allowlist_only, ids are
|
|
342
|
-
* the only allowed values. Each id must be a known public video model
|
|
343
|
-
* (unknown ids are rejected on create/update).
|
|
342
|
+
* the only allowed values. Each id must be a known public video or image model
|
|
343
|
+
* name (unknown ids are rejected on create/update).
|
|
344
344
|
*/
|
|
345
345
|
interface Models {
|
|
346
346
|
ids: Array<string>;
|
|
@@ -385,8 +385,8 @@ export declare namespace RouterCreateParams {
|
|
|
385
385
|
maxCreditsPerGeneration?: Settings.MaxCreditsPerGeneration;
|
|
386
386
|
/**
|
|
387
387
|
* When mode is allow_new_except, ids are excluded; when allowlist_only, ids are
|
|
388
|
-
* the only allowed values. Each id must be a known public video model
|
|
389
|
-
* (unknown ids are rejected on create/update).
|
|
388
|
+
* the only allowed values. Each id must be a known public video or image model
|
|
389
|
+
* name (unknown ids are rejected on create/update).
|
|
390
390
|
*/
|
|
391
391
|
models?: Settings.Models;
|
|
392
392
|
/**
|
|
@@ -411,8 +411,8 @@ export declare namespace RouterCreateParams {
|
|
|
411
411
|
}
|
|
412
412
|
/**
|
|
413
413
|
* When mode is allow_new_except, ids are excluded; when allowlist_only, ids are
|
|
414
|
-
* the only allowed values. Each id must be a known public video model
|
|
415
|
-
* (unknown ids are rejected on create/update).
|
|
414
|
+
* the only allowed values. Each id must be a known public video or image model
|
|
415
|
+
* name (unknown ids are rejected on create/update).
|
|
416
416
|
*/
|
|
417
417
|
interface Models {
|
|
418
418
|
ids: Array<string>;
|
|
@@ -447,8 +447,8 @@ export declare namespace RouterUpdateParams {
|
|
|
447
447
|
maxCreditsPerGeneration?: Settings.MaxCreditsPerGeneration;
|
|
448
448
|
/**
|
|
449
449
|
* When mode is allow_new_except, ids are excluded; when allowlist_only, ids are
|
|
450
|
-
* the only allowed values. Each id must be a known public video model
|
|
451
|
-
* (unknown ids are rejected on create/update).
|
|
450
|
+
* the only allowed values. Each id must be a known public video or image model
|
|
451
|
+
* name (unknown ids are rejected on create/update).
|
|
452
452
|
*/
|
|
453
453
|
models?: Settings.Models;
|
|
454
454
|
/**
|
|
@@ -473,8 +473,8 @@ export declare namespace RouterUpdateParams {
|
|
|
473
473
|
}
|
|
474
474
|
/**
|
|
475
475
|
* When mode is allow_new_except, ids are excluded; when allowlist_only, ids are
|
|
476
|
-
* the only allowed values. Each id must be a known public video model
|
|
477
|
-
* (unknown ids are rejected on create/update).
|
|
476
|
+
* the only allowed values. Each id must be a known public video or image model
|
|
477
|
+
* name (unknown ids are rejected on create/update).
|
|
478
478
|
*/
|
|
479
479
|
interface Models {
|
|
480
480
|
ids: Array<string>;
|