@runwayml/sdk 4.10.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.
Files changed (99) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/README.md +8 -8
  3. package/client.d.mts +6 -0
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +6 -0
  6. package/client.d.ts.map +1 -1
  7. package/client.js +6 -0
  8. package/client.js.map +1 -1
  9. package/client.mjs +6 -0
  10. package/client.mjs.map +1 -1
  11. package/package.json +1 -1
  12. package/resources/generate/audio.d.mts +180 -0
  13. package/resources/generate/audio.d.mts.map +1 -0
  14. package/resources/generate/audio.d.ts +180 -0
  15. package/resources/generate/audio.d.ts.map +1 -0
  16. package/resources/generate/audio.js +18 -0
  17. package/resources/generate/audio.js.map +1 -0
  18. package/resources/generate/audio.mjs +14 -0
  19. package/resources/generate/audio.mjs.map +1 -0
  20. package/resources/generate/generate.d.mts +18 -0
  21. package/resources/generate/generate.d.mts.map +1 -0
  22. package/resources/generate/generate.d.ts +18 -0
  23. package/resources/generate/generate.d.ts.map +1 -0
  24. package/resources/generate/generate.js +25 -0
  25. package/resources/generate/generate.js.map +1 -0
  26. package/resources/generate/generate.mjs +20 -0
  27. package/resources/generate/generate.mjs.map +1 -0
  28. package/resources/generate/image.d.mts +171 -0
  29. package/resources/generate/image.d.mts.map +1 -0
  30. package/resources/generate/image.d.ts +171 -0
  31. package/resources/generate/image.d.ts.map +1 -0
  32. package/resources/generate/image.js +17 -0
  33. package/resources/generate/image.js.map +1 -0
  34. package/resources/generate/image.mjs +13 -0
  35. package/resources/generate/image.mjs.map +1 -0
  36. package/resources/generate/index.d.mts +5 -0
  37. package/resources/generate/index.d.mts.map +1 -0
  38. package/resources/generate/index.d.ts +5 -0
  39. package/resources/generate/index.d.ts.map +1 -0
  40. package/resources/generate/index.js +13 -0
  41. package/resources/generate/index.js.map +1 -0
  42. package/resources/generate/index.mjs +6 -0
  43. package/resources/generate/index.mjs.map +1 -0
  44. package/resources/generate/video.d.mts +246 -0
  45. package/resources/generate/video.d.mts.map +1 -0
  46. package/resources/generate/video.d.ts +246 -0
  47. package/resources/generate/video.d.ts.map +1 -0
  48. package/resources/generate/video.js +17 -0
  49. package/resources/generate/video.js.map +1 -0
  50. package/resources/generate/video.mjs +13 -0
  51. package/resources/generate/video.mjs.map +1 -0
  52. package/resources/generate.d.mts +2 -0
  53. package/resources/generate.d.mts.map +1 -0
  54. package/resources/generate.d.ts +2 -0
  55. package/resources/generate.d.ts.map +1 -0
  56. package/resources/generate.js +6 -0
  57. package/resources/generate.js.map +1 -0
  58. package/resources/generate.mjs +3 -0
  59. package/resources/generate.mjs.map +1 -0
  60. package/resources/index.d.mts +2 -0
  61. package/resources/index.d.mts.map +1 -1
  62. package/resources/index.d.ts +2 -0
  63. package/resources/index.d.ts.map +1 -1
  64. package/resources/index.js +5 -1
  65. package/resources/index.js.map +1 -1
  66. package/resources/index.mjs +2 -0
  67. package/resources/index.mjs.map +1 -1
  68. package/resources/organization.d.mts +20 -2
  69. package/resources/organization.d.mts.map +1 -1
  70. package/resources/organization.d.ts +20 -2
  71. package/resources/organization.d.ts.map +1 -1
  72. package/resources/routers.d.mts +490 -0
  73. package/resources/routers.d.mts.map +1 -0
  74. package/resources/routers.d.ts +490 -0
  75. package/resources/routers.d.ts.map +1 -0
  76. package/resources/routers.js +49 -0
  77. package/resources/routers.js.map +1 -0
  78. package/resources/routers.mjs +45 -0
  79. package/resources/routers.mjs.map +1 -0
  80. package/resources/text-to-image.d.mts +5 -0
  81. package/resources/text-to-image.d.mts.map +1 -1
  82. package/resources/text-to-image.d.ts +5 -0
  83. package/resources/text-to-image.d.ts.map +1 -1
  84. package/src/client.ts +30 -0
  85. package/src/resources/generate/audio.ts +265 -0
  86. package/src/resources/generate/generate.ts +39 -0
  87. package/src/resources/generate/image.ts +206 -0
  88. package/src/resources/generate/index.ts +6 -0
  89. package/src/resources/generate/video.ts +300 -0
  90. package/src/resources/generate.ts +3 -0
  91. package/src/resources/index.ts +12 -0
  92. package/src/resources/organization.ts +26 -0
  93. package/src/resources/routers.ts +622 -0
  94. package/src/resources/text-to-image.ts +6 -0
  95. package/src/version.ts +1 -1
  96. package/version.d.mts +1 -1
  97. package/version.d.ts +1 -1
  98. package/version.js +1 -1
  99. 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;;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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,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,E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AAE,MAAM,CAAC;QAEnB;;;WAGG;QACH,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,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"}
@@ -0,0 +1,5 @@
1
+ export { Audio, type AudioCreateResponse, type AudioCreateParams } from "./audio.mjs";
2
+ export { Generate } from "./generate.mjs";
3
+ export { Image, type ImageCreateResponse, type ImageCreateParams } from "./image.mjs";
4
+ export { Video, type VideoCreateResponse, type VideoCreateParams } from "./video.mjs";
5
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,5 @@
1
+ export { Audio, type AudioCreateResponse, type AudioCreateParams } from "./audio.js";
2
+ export { Generate } from "./generate.js";
3
+ export { Image, type ImageCreateResponse, type ImageCreateParams } from "./image.js";
4
+ export { Video, type VideoCreateResponse, type VideoCreateParams } from "./video.js";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,13 @@
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.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; } });
7
+ var generate_1 = require("./generate.js");
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; } });
11
+ var video_1 = require("./video.js");
12
+ Object.defineProperty(exports, "Video", { enumerable: true, get: function () { return video_1.Video; } });
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,6 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ export { Audio } from "./audio.mjs";
3
+ export { Generate } from "./generate.mjs";
4
+ export { Image } from "./image.mjs";
5
+ export { Video } from "./video.mjs";
6
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
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"}