@runwayml/sdk 4.29.0 → 4.31.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 (152) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/client.d.mts +15 -0
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +15 -0
  5. package/client.d.ts.map +1 -1
  6. package/client.js +15 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +15 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/generate/generate.d.mts +4 -0
  12. package/resources/generate/generate.d.mts.map +1 -1
  13. package/resources/generate/generate.d.ts +4 -0
  14. package/resources/generate/generate.d.ts.map +1 -1
  15. package/resources/generate/generate.js +4 -0
  16. package/resources/generate/generate.js.map +1 -1
  17. package/resources/generate/generate.mjs +4 -0
  18. package/resources/generate/generate.mjs.map +1 -1
  19. package/resources/generate/image.d.mts +2 -2
  20. package/resources/generate/image.d.ts +2 -2
  21. package/resources/generate/index.d.mts +1 -0
  22. package/resources/generate/index.d.mts.map +1 -1
  23. package/resources/generate/index.d.ts +1 -0
  24. package/resources/generate/index.d.ts.map +1 -1
  25. package/resources/generate/index.js +3 -1
  26. package/resources/generate/index.js.map +1 -1
  27. package/resources/generate/index.mjs +1 -0
  28. package/resources/generate/index.mjs.map +1 -1
  29. package/resources/generate/mesh.d.mts +162 -0
  30. package/resources/generate/mesh.d.mts.map +1 -0
  31. package/resources/generate/mesh.d.ts +162 -0
  32. package/resources/generate/mesh.d.ts.map +1 -0
  33. package/resources/generate/mesh.js +16 -0
  34. package/resources/generate/mesh.js.map +1 -0
  35. package/resources/generate/mesh.mjs +12 -0
  36. package/resources/generate/mesh.mjs.map +1 -0
  37. package/resources/generate/video.d.mts +5 -0
  38. package/resources/generate/video.d.mts.map +1 -1
  39. package/resources/generate/video.d.ts +5 -0
  40. package/resources/generate/video.d.ts.map +1 -1
  41. package/resources/image-to-mesh.d.mts +128 -0
  42. package/resources/image-to-mesh.d.mts.map +1 -0
  43. package/resources/image-to-mesh.d.ts +128 -0
  44. package/resources/image-to-mesh.d.ts.map +1 -0
  45. package/resources/image-to-mesh.js +27 -0
  46. package/resources/image-to-mesh.js.map +1 -0
  47. package/resources/image-to-mesh.mjs +23 -0
  48. package/resources/image-to-mesh.mjs.map +1 -0
  49. package/resources/image-to-video.d.mts +6 -1
  50. package/resources/image-to-video.d.mts.map +1 -1
  51. package/resources/image-to-video.d.ts +6 -1
  52. package/resources/image-to-video.d.ts.map +1 -1
  53. package/resources/index.d.mts +3 -0
  54. package/resources/index.d.mts.map +1 -1
  55. package/resources/index.d.ts +3 -0
  56. package/resources/index.d.ts.map +1 -1
  57. package/resources/index.js +7 -1
  58. package/resources/index.js.map +1 -1
  59. package/resources/index.mjs +3 -0
  60. package/resources/index.mjs.map +1 -1
  61. package/resources/model-catalog.d.mts +139 -0
  62. package/resources/model-catalog.d.mts.map +1 -0
  63. package/resources/model-catalog.d.ts +139 -0
  64. package/resources/model-catalog.d.ts.map +1 -0
  65. package/resources/model-catalog.js +28 -0
  66. package/resources/model-catalog.js.map +1 -0
  67. package/resources/model-catalog.mjs +24 -0
  68. package/resources/model-catalog.mjs.map +1 -0
  69. package/resources/organization/index.d.mts +1 -1
  70. package/resources/organization/index.d.mts.map +1 -1
  71. package/resources/organization/index.d.ts +1 -1
  72. package/resources/organization/index.d.ts.map +1 -1
  73. package/resources/organization/index.js.map +1 -1
  74. package/resources/organization/index.mjs.map +1 -1
  75. package/resources/organization/organization.d.mts +4 -4
  76. package/resources/organization/organization.d.mts.map +1 -1
  77. package/resources/organization/organization.d.ts +4 -4
  78. package/resources/organization/organization.d.ts.map +1 -1
  79. package/resources/organization/organization.js.map +1 -1
  80. package/resources/organization/organization.mjs.map +1 -1
  81. package/resources/organization/webapp/audit-logs.d.mts +34 -14
  82. package/resources/organization/webapp/audit-logs.d.mts.map +1 -1
  83. package/resources/organization/webapp/audit-logs.d.ts +34 -14
  84. package/resources/organization/webapp/audit-logs.d.ts.map +1 -1
  85. package/resources/organization/webapp/index.d.mts +1 -1
  86. package/resources/organization/webapp/index.d.mts.map +1 -1
  87. package/resources/organization/webapp/index.d.ts +1 -1
  88. package/resources/organization/webapp/index.d.ts.map +1 -1
  89. package/resources/organization/webapp/index.js.map +1 -1
  90. package/resources/organization/webapp/index.mjs.map +1 -1
  91. package/resources/organization/webapp/webapp.d.mts +79 -1
  92. package/resources/organization/webapp/webapp.d.mts.map +1 -1
  93. package/resources/organization/webapp/webapp.d.ts +79 -1
  94. package/resources/organization/webapp/webapp.d.ts.map +1 -1
  95. package/resources/organization/webapp/webapp.js +12 -0
  96. package/resources/organization/webapp/webapp.js.map +1 -1
  97. package/resources/organization/webapp/webapp.mjs +12 -0
  98. package/resources/organization/webapp/webapp.mjs.map +1 -1
  99. package/resources/tasks.d.mts +25 -2
  100. package/resources/tasks.d.mts.map +1 -1
  101. package/resources/tasks.d.ts +25 -2
  102. package/resources/tasks.d.ts.map +1 -1
  103. package/resources/text-to-image.d.mts +86 -4
  104. package/resources/text-to-image.d.mts.map +1 -1
  105. package/resources/text-to-image.d.ts +86 -4
  106. package/resources/text-to-image.d.ts.map +1 -1
  107. package/resources/text-to-mesh.d.mts +83 -0
  108. package/resources/text-to-mesh.d.mts.map +1 -0
  109. package/resources/text-to-mesh.d.ts +83 -0
  110. package/resources/text-to-mesh.d.ts.map +1 -0
  111. package/resources/text-to-mesh.js +19 -0
  112. package/resources/text-to-mesh.js.map +1 -0
  113. package/resources/text-to-mesh.mjs +15 -0
  114. package/resources/text-to-mesh.mjs.map +1 -0
  115. package/resources/text-to-speech.d.mts +77 -1
  116. package/resources/text-to-speech.d.mts.map +1 -1
  117. package/resources/text-to-speech.d.ts +77 -1
  118. package/resources/text-to-speech.d.ts.map +1 -1
  119. package/resources/text-to-video.d.mts +7 -2
  120. package/resources/text-to-video.d.mts.map +1 -1
  121. package/resources/text-to-video.d.ts +7 -2
  122. package/resources/text-to-video.d.ts.map +1 -1
  123. package/resources/video-to-video.d.mts +7 -2
  124. package/resources/video-to-video.d.mts.map +1 -1
  125. package/resources/video-to-video.d.ts +7 -2
  126. package/resources/video-to-video.d.ts.map +1 -1
  127. package/src/client.ts +29 -0
  128. package/src/resources/generate/generate.ts +10 -0
  129. package/src/resources/generate/image.ts +2 -2
  130. package/src/resources/generate/index.ts +1 -0
  131. package/src/resources/generate/mesh.ts +214 -0
  132. package/src/resources/generate/video.ts +6 -0
  133. package/src/resources/image-to-mesh.ts +176 -0
  134. package/src/resources/image-to-video.ts +7 -1
  135. package/src/resources/index.ts +3 -0
  136. package/src/resources/model-catalog.ts +161 -0
  137. package/src/resources/organization/index.ts +3 -0
  138. package/src/resources/organization/organization.ts +16 -2
  139. package/src/resources/organization/webapp/audit-logs.ts +58 -12
  140. package/src/resources/organization/webapp/index.ts +3 -0
  141. package/src/resources/organization/webapp/webapp.ts +104 -0
  142. package/src/resources/tasks.ts +33 -2
  143. package/src/resources/text-to-image.ts +132 -4
  144. package/src/resources/text-to-mesh.ts +118 -0
  145. package/src/resources/text-to-speech.ts +143 -1
  146. package/src/resources/text-to-video.ts +13 -2
  147. package/src/resources/video-to-video.ts +13 -2
  148. package/src/version.ts +1 -1
  149. package/version.d.mts +1 -1
  150. package/version.d.ts +1 -1
  151. package/version.js +1 -1
  152. package/version.mjs +1 -1
package/src/client.ts CHANGED
@@ -55,6 +55,7 @@ import {
55
55
  DocumentUpdateParams,
56
56
  Documents,
57
57
  } from './resources/documents';
58
+ import { ImageToMesh, ImageToMeshCreateParams, ImageToMeshCreateResponse } from './resources/image-to-mesh';
58
59
  import {
59
60
  ImageToVector,
60
61
  ImageToVectorCreateParams,
@@ -70,6 +71,7 @@ import {
70
71
  ImageUpscaleCreateParams,
71
72
  ImageUpscaleCreateResponse,
72
73
  } from './resources/image-upscale';
74
+ import { ModelCatalog, ModelCatalogListResponse } from './resources/model-catalog';
73
75
  import {
74
76
  DeprecatedLivekit,
75
77
  RealtimeSessionCreateParams,
@@ -116,6 +118,7 @@ import {
116
118
  } from './resources/speech-to-speech';
117
119
  import { TaskRetrieveResponse, Tasks } from './resources/tasks';
118
120
  import { TextToImage, TextToImageCreateParams, TextToImageCreateResponse } from './resources/text-to-image';
121
+ import { TextToMesh, TextToMeshCreateParams, TextToMeshCreateResponse } from './resources/text-to-mesh';
119
122
  import { TextToMusic, TextToMusicCreateParams, TextToMusicCreateResponse } from './resources/text-to-music';
120
123
  import {
121
124
  TextToSpeech,
@@ -974,6 +977,14 @@ export class RunwayML {
974
977
  * These endpoints all kick off tasks to create generations.
975
978
  */
976
979
  textToMusic: API.TextToMusic = new API.TextToMusic(this);
980
+ /**
981
+ * These endpoints all kick off tasks to create generations.
982
+ */
983
+ textToMesh: API.TextToMesh = new API.TextToMesh(this);
984
+ /**
985
+ * These endpoints all kick off tasks to create generations.
986
+ */
987
+ imageToMesh: API.ImageToMesh = new API.ImageToMesh(this);
977
988
  /**
978
989
  * These endpoints all kick off tasks to create generations.
979
990
  */
@@ -1018,6 +1029,7 @@ export class RunwayML {
1018
1029
  voices: API.Voices = new API.Voices(this);
1019
1030
  uploads: API.Uploads = new API.Uploads(this);
1020
1031
  workflows: API.Workflows = new API.Workflows(this);
1032
+ modelCatalog: API.ModelCatalog = new API.ModelCatalog(this);
1021
1033
  workflowInvocations: API.WorkflowInvocations = new API.WorkflowInvocations(this);
1022
1034
  }
1023
1035
 
@@ -1030,6 +1042,8 @@ RunwayML.TextToVideo = TextToVideo;
1030
1042
  RunwayML.TextToImage = TextToImage;
1031
1043
  RunwayML.ImageToVector = ImageToVector;
1032
1044
  RunwayML.TextToMusic = TextToMusic;
1045
+ RunwayML.TextToMesh = TextToMesh;
1046
+ RunwayML.ImageToMesh = ImageToMesh;
1033
1047
  RunwayML.CharacterPerformance = CharacterPerformance;
1034
1048
  RunwayML.TextToSpeech = TextToSpeech;
1035
1049
  RunwayML.SoundEffect = SoundEffect;
@@ -1050,6 +1064,7 @@ RunwayML.Recipes = Recipes;
1050
1064
  RunwayML.Voices = Voices;
1051
1065
  RunwayML.Uploads = Uploads;
1052
1066
  RunwayML.Workflows = Workflows;
1067
+ RunwayML.ModelCatalog = ModelCatalog;
1053
1068
  RunwayML.WorkflowInvocations = WorkflowInvocations;
1054
1069
 
1055
1070
  export declare namespace RunwayML {
@@ -1108,6 +1123,18 @@ export declare namespace RunwayML {
1108
1123
  type TextToMusicCreateParams as TextToMusicCreateParams,
1109
1124
  };
1110
1125
 
1126
+ export {
1127
+ TextToMesh as TextToMesh,
1128
+ type TextToMeshCreateResponse as TextToMeshCreateResponse,
1129
+ type TextToMeshCreateParams as TextToMeshCreateParams,
1130
+ };
1131
+
1132
+ export {
1133
+ ImageToMesh as ImageToMesh,
1134
+ type ImageToMeshCreateResponse as ImageToMeshCreateResponse,
1135
+ type ImageToMeshCreateParams as ImageToMeshCreateParams,
1136
+ };
1137
+
1111
1138
  export {
1112
1139
  CharacterPerformance as CharacterPerformance,
1113
1140
  type CharacterPerformanceCreateResponse as CharacterPerformanceCreateResponse,
@@ -1273,6 +1300,8 @@ export declare namespace RunwayML {
1273
1300
  type WorkflowRunParams as WorkflowRunParams,
1274
1301
  };
1275
1302
 
1303
+ export { ModelCatalog as ModelCatalog, type ModelCatalogListResponse as ModelCatalogListResponse };
1304
+
1276
1305
  export {
1277
1306
  WorkflowInvocations as WorkflowInvocations,
1278
1307
  type WorkflowInvocationRetrieveResponse as WorkflowInvocationRetrieveResponse,
@@ -5,6 +5,8 @@ import * as AudioAPI from './audio';
5
5
  import { Audio, AudioCreateParams, AudioCreateResponse, ReferenceAudio, ReferenceVoice } from './audio';
6
6
  import * as ImageAPI from './image';
7
7
  import { Image, ImageCreateParams, ImageCreateResponse } from './image';
8
+ import * as MeshAPI from './mesh';
9
+ import { Mesh, MeshCreateParams, MeshCreateResponse } from './mesh';
8
10
  import * as VideoAPI from './video';
9
11
  import { Video, VideoCreateParams, VideoCreateResponse } from './video';
10
12
 
@@ -12,11 +14,13 @@ export class Generate extends APIResource {
12
14
  video: VideoAPI.Video = new VideoAPI.Video(this._client);
13
15
  image: ImageAPI.Image = new ImageAPI.Image(this._client);
14
16
  audio: AudioAPI.Audio = new AudioAPI.Audio(this._client);
17
+ mesh: MeshAPI.Mesh = new MeshAPI.Mesh(this._client);
15
18
  }
16
19
 
17
20
  Generate.Video = Video;
18
21
  Generate.Image = Image;
19
22
  Generate.Audio = Audio;
23
+ Generate.Mesh = Mesh;
20
24
 
21
25
  export declare namespace Generate {
22
26
  export {
@@ -38,4 +42,10 @@ export declare namespace Generate {
38
42
  type AudioCreateResponse as AudioCreateResponse,
39
43
  type AudioCreateParams as AudioCreateParams,
40
44
  };
45
+
46
+ export {
47
+ Mesh as Mesh,
48
+ type MeshCreateResponse as MeshCreateResponse,
49
+ type MeshCreateParams as MeshCreateParams,
50
+ };
41
51
  }
@@ -200,8 +200,8 @@ export namespace ImageCreateParams {
200
200
  resolution?: '1k' | '2k' | '4k';
201
201
 
202
202
  /**
203
- * A seed for reproducible generation. Only gen4_image and gen4_image_turbo accept
204
- * this field.
203
+ * A seed for reproducible generation. Models that do not accept a seed, or whose
204
+ * seed range does not include this value, are excluded.
205
205
  */
206
206
  seed?: number;
207
207
  }
@@ -9,4 +9,5 @@ export {
9
9
  } from './audio';
10
10
  export { Generate } from './generate';
11
11
  export { Image, type ImageCreateResponse, type ImageCreateParams } from './image';
12
+ export { Mesh, type MeshCreateResponse, type MeshCreateParams } from './mesh';
12
13
  export { Video, type VideoCreateResponse, type VideoCreateParams } from './video';
@@ -0,0 +1,214 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import { RequestOptions } from '../../internal/request-options';
5
+ import { APIPromiseWithAwaitableTask, wrapAsWaitableResource } from '../../lib/polling';
6
+
7
+ export class Mesh extends APIResource {
8
+ /**
9
+ * Generate a GLB mesh using a saved Model Router config.
10
+ */
11
+ create(body: MeshCreateParams, options?: RequestOptions): APIPromiseWithAwaitableTask<MeshCreateResponse> {
12
+ return wrapAsWaitableResource<MeshCreateResponse>(this._client)(
13
+ this._client.post('/v1/generate/mesh', { body, ...options }),
14
+ );
15
+ }
16
+ }
17
+
18
+ export interface MeshCreateResponse {
19
+ /**
20
+ * The ID of the created task. Poll GET /v1/tasks/:id for the result.
21
+ */
22
+ id: string;
23
+
24
+ /**
25
+ * Metadata describing which model the router selected and why.
26
+ */
27
+ routing: MeshCreateResponse.Routing;
28
+ }
29
+
30
+ export namespace MeshCreateResponse {
31
+ /**
32
+ * Metadata describing which model the router selected and why.
33
+ */
34
+ export interface Routing {
35
+ /**
36
+ * The slug of the router config that was applied to this request.
37
+ */
38
+ configId: string;
39
+
40
+ /**
41
+ * Estimated cost, computed against current pricing.
42
+ */
43
+ estimatedCost: Routing.EstimatedCost;
44
+
45
+ /**
46
+ * The public name of the model the router selected.
47
+ */
48
+ model: string;
49
+
50
+ /**
51
+ * The provider of the selected model.
52
+ */
53
+ provider: string;
54
+
55
+ resolvedInput: Routing.ResolvedInput;
56
+
57
+ /**
58
+ * The resolved config settings the router used for this request.
59
+ */
60
+ resolvedSettings: Routing.ResolvedSettings;
61
+
62
+ /**
63
+ * Present only when the config enables fallback.onCapacity and capacity affected
64
+ * this request.
65
+ */
66
+ capacityFallback?: Routing.CapacityFallback;
67
+ }
68
+
69
+ export namespace Routing {
70
+ /**
71
+ * Estimated cost, computed against current pricing.
72
+ */
73
+ export interface EstimatedCost {
74
+ /**
75
+ * Estimated cost of the generation in credits.
76
+ */
77
+ credits: number;
78
+ }
79
+
80
+ export interface ResolvedInput {
81
+ outputFormat: 'glb';
82
+ }
83
+
84
+ /**
85
+ * The resolved config settings the router used for this request.
86
+ */
87
+ export interface ResolvedSettings {
88
+ /**
89
+ * The single optimization preference the config selected, used as the soft
90
+ * weighting when scoring eligible models.
91
+ */
92
+ optimizeFor: 'cost' | 'latency' | 'quality';
93
+
94
+ /**
95
+ * The applied maximum credits per generation for this request's modality, or null
96
+ * if the config sets no ceiling.
97
+ */
98
+ priceCeiling: number | null;
99
+ }
100
+
101
+ /**
102
+ * Present only when the config enables fallback.onCapacity and capacity affected
103
+ * this request.
104
+ */
105
+ export interface CapacityFallback {
106
+ /**
107
+ * True when every eligible model was at its concurrency limit, so the best-ranked
108
+ * model was used and the task will queue.
109
+ */
110
+ allExhausted: boolean;
111
+
112
+ /**
113
+ * Eligible models that were considered for this request but not selected because
114
+ * this account is at its concurrency limit for them.
115
+ */
116
+ skipped: Array<string>;
117
+ }
118
+ }
119
+ }
120
+
121
+ export interface MeshCreateParams {
122
+ /**
123
+ * The slug of a saved Model Router config to route this request with.
124
+ */
125
+ configId: string;
126
+
127
+ /**
128
+ * Generate a GLB mesh from either text or views of the same object, not both.
129
+ */
130
+ input: MeshCreateParams.FromText | MeshCreateParams.FromReferenceImages;
131
+ }
132
+
133
+ export namespace MeshCreateParams {
134
+ export interface FromText {
135
+ promptText: string;
136
+
137
+ autoSize?: boolean;
138
+
139
+ /**
140
+ * Maximum face count: 1,500,000 with standard geometry or 2,000,000 with detailed
141
+ * geometry.
142
+ */
143
+ faceLimit?: number;
144
+
145
+ geometryQuality?: 'standard' | 'detailed';
146
+
147
+ imageSeed?: number;
148
+
149
+ modelSeed?: number;
150
+
151
+ orientation?: 'default' | 'align_image';
152
+
153
+ pbr?: boolean;
154
+
155
+ referenceImages?: unknown;
156
+
157
+ texture?: boolean;
158
+
159
+ textureAlignment?: 'original_image' | 'geometry';
160
+
161
+ textureQuality?: 'standard' | 'detailed';
162
+
163
+ textureSeed?: number;
164
+ }
165
+
166
+ export interface FromReferenceImages {
167
+ referenceImages: Array<FromReferenceImages.ReferenceImage>;
168
+
169
+ autoSize?: boolean;
170
+
171
+ /**
172
+ * Maximum face count: 1,500,000 with standard geometry or 2,000,000 with detailed
173
+ * geometry.
174
+ */
175
+ faceLimit?: number;
176
+
177
+ geometryQuality?: 'standard' | 'detailed';
178
+
179
+ imageSeed?: number;
180
+
181
+ modelSeed?: number;
182
+
183
+ orientation?: 'default' | 'align_image';
184
+
185
+ pbr?: boolean;
186
+
187
+ promptText?: unknown;
188
+
189
+ texture?: boolean;
190
+
191
+ textureAlignment?: 'original_image' | 'geometry';
192
+
193
+ textureQuality?: 'standard' | 'detailed';
194
+
195
+ textureSeed?: number;
196
+ }
197
+
198
+ export namespace FromReferenceImages {
199
+ export interface ReferenceImage {
200
+ /**
201
+ * A HTTPS URL, Runway upload URI, or base64 data URI (e.g.
202
+ * `data:image/png;base64,...`, up to 5MB) containing an encoded image. See
203
+ * [our docs](/assets/inputs#images) on image inputs for more information.
204
+ */
205
+ uri: string;
206
+
207
+ type?: 'front' | 'left' | 'back' | 'right';
208
+ }
209
+ }
210
+ }
211
+
212
+ export declare namespace Mesh {
213
+ export { type MeshCreateResponse as MeshCreateResponse, type MeshCreateParams as MeshCreateParams };
214
+ }
@@ -188,6 +188,12 @@ export namespace VideoCreateParams {
188
188
  */
189
189
  duration?: number;
190
190
 
191
+ /**
192
+ * Request 10-bit HDR output. Only HDR-capable models are eligible; use 1080p or 4k
193
+ * resolution. Additional charges apply.
194
+ */
195
+ hdr?: boolean;
196
+
191
197
  /**
192
198
  * Timed guidance images for video restyle. Requires a source video; unsupported
193
199
  * models are excluded.
@@ -0,0 +1,176 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import { RequestOptions } from '../internal/request-options';
5
+ import { APIPromiseWithAwaitableTask, wrapAsWaitableResource } from '../lib/polling';
6
+
7
+ /**
8
+ * These endpoints all kick off tasks to create generations.
9
+ */
10
+ export class ImageToMesh extends APIResource {
11
+ /**
12
+ * Generate a GLB mesh from one image or ordered views of the same object.
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * const imageToMesh = await client.imageToMesh.create({
17
+ * imageUri: 'https://example.com/image.jpg',
18
+ * model: 'trellis_2',
19
+ * });
20
+ * ```
21
+ */
22
+ create(
23
+ body: ImageToMeshCreateParams,
24
+ options?: RequestOptions,
25
+ ): APIPromiseWithAwaitableTask<ImageToMeshCreateResponse> {
26
+ return wrapAsWaitableResource<ImageToMeshCreateResponse>(this._client)(
27
+ this._client.post('/v1/image_to_mesh', { body, ...options }),
28
+ );
29
+ }
30
+ }
31
+
32
+ export interface ImageToMeshCreateResponse {
33
+ /**
34
+ * The ID of the task that was created. Use this to retrieve the task later.
35
+ */
36
+ id: string;
37
+
38
+ /**
39
+ * The maximum credits this task may charge. The final amount may be lower after
40
+ * the task completes.
41
+ */
42
+ estimatedCost: ImageToMeshCreateResponse.EstimatedCost;
43
+ }
44
+
45
+ export namespace ImageToMeshCreateResponse {
46
+ /**
47
+ * The maximum credits this task may charge. The final amount may be lower after
48
+ * the task completes.
49
+ */
50
+ export interface EstimatedCost {
51
+ /**
52
+ * Estimated cost of the generation in credits.
53
+ */
54
+ credits: number;
55
+ }
56
+ }
57
+
58
+ export type ImageToMeshCreateParams =
59
+ | ImageToMeshCreateParams.Tripo3dH3_1
60
+ | ImageToMeshCreateParams.Hunyuan3d3_1Pro
61
+ | ImageToMeshCreateParams.Trellis2;
62
+
63
+ export declare namespace ImageToMeshCreateParams {
64
+ export interface Tripo3dH3_1 {
65
+ model: 'tripo3d_h3_1';
66
+
67
+ referenceImages: Array<Tripo3dH3_1.ReferenceImage>;
68
+
69
+ /**
70
+ * Estimate the physical size of the object.
71
+ */
72
+ autoSize?: boolean;
73
+
74
+ /**
75
+ * The maximum number of faces in the generated mesh.
76
+ */
77
+ faceLimit?: number;
78
+
79
+ geometryQuality?: 'standard' | 'detailed';
80
+
81
+ modelSeed?: number;
82
+
83
+ orientation?: 'default' | 'align_image';
84
+
85
+ /**
86
+ * Generate physically based materials for the mesh.
87
+ */
88
+ pbr?: boolean;
89
+
90
+ /**
91
+ * Generate textures for the mesh. PBR also enables textures.
92
+ */
93
+ texture?: boolean;
94
+
95
+ textureAlignment?: 'original_image' | 'geometry';
96
+
97
+ textureQuality?: 'standard' | 'detailed';
98
+
99
+ textureSeed?: number;
100
+ }
101
+
102
+ export namespace Tripo3dH3_1 {
103
+ export interface ReferenceImage {
104
+ /**
105
+ * A HTTPS URL, Runway upload URI, or base64 data URI (e.g.
106
+ * `data:image/png;base64,...`, up to 5MB) containing an encoded image. See
107
+ * [our docs](/assets/inputs#images) on image inputs for more information.
108
+ */
109
+ uri: string;
110
+
111
+ type?: 'front' | 'left' | 'back' | 'right';
112
+ }
113
+ }
114
+
115
+ export interface Hunyuan3d3_1Pro {
116
+ model: 'hunyuan_3d_3_1_pro';
117
+
118
+ referenceImages: Array<Hunyuan3d3_1Pro.ReferenceImage>;
119
+
120
+ /**
121
+ * Generate physically based materials for a textured model.
122
+ */
123
+ enablePbr?: boolean;
124
+
125
+ /**
126
+ * The target number of faces in the generated mesh.
127
+ */
128
+ faceCount?: number;
129
+
130
+ /**
131
+ * Generate a textured model or geometry without textures.
132
+ */
133
+ generateType?: 'Normal' | 'Geometry';
134
+ }
135
+
136
+ export namespace Hunyuan3d3_1Pro {
137
+ export interface ReferenceImage {
138
+ /**
139
+ * A HTTPS URL, Runway upload URI, or base64 data URI (e.g.
140
+ * `data:image/png;base64,...`, up to 5MB) containing an encoded image. See
141
+ * [our docs](/assets/inputs#images) on image inputs for more information.
142
+ */
143
+ uri: string;
144
+
145
+ type?: 'front' | 'back' | 'left' | 'right' | 'top' | 'bottom' | 'left_front' | 'right_front';
146
+ }
147
+ }
148
+
149
+ export interface Trellis2 {
150
+ /**
151
+ * A HTTPS URL, Runway upload URI, or base64 data URI (e.g.
152
+ * `data:image/png;base64,...`, up to 5MB) containing an encoded image. See
153
+ * [our docs](/assets/inputs#images) on image inputs for more information.
154
+ */
155
+ imageUri: string;
156
+
157
+ model: 'trellis_2';
158
+
159
+ decimationTarget?: number;
160
+
161
+ remesh?: boolean;
162
+
163
+ resolution?: 512 | 1024 | 1536;
164
+
165
+ seed?: number;
166
+
167
+ textureSize?: 1024 | 2048 | 4096;
168
+ }
169
+ }
170
+
171
+ export declare namespace ImageToMesh {
172
+ export {
173
+ type ImageToMeshCreateResponse as ImageToMeshCreateResponse,
174
+ type ImageToMeshCreateParams as ImageToMeshCreateParams,
175
+ };
176
+ }
@@ -2021,6 +2021,12 @@ export declare namespace ImageToVideoCreateParams {
2021
2021
  */
2022
2022
  duration?: number;
2023
2023
 
2024
+ /**
2025
+ * Generate 10-bit HDR output. Requires a 1080p or 4K ratio. Additional charges
2026
+ * apply per output second. Defaults to false.
2027
+ */
2028
+ hdr?: boolean;
2029
+
2024
2030
  /**
2025
2031
  * A text prompt describing what should happen in the video.
2026
2032
  */
@@ -2029,7 +2035,7 @@ export declare namespace ImageToVideoCreateParams {
2029
2035
  /**
2030
2036
  * Output quality tier. The video keeps the input media framing.
2031
2037
  */
2032
- ratio?: 'auto_720p' | 'auto_1080p';
2038
+ ratio?: 'auto_720p' | 'auto_1080p' | 'auto_4k';
2033
2039
 
2034
2040
  /**
2035
2041
  * Images of characters, objects or styles to use in the video. Up to 10 images in
@@ -37,6 +37,7 @@ export {
37
37
  type DocumentListResponsesCursorPage,
38
38
  } from './documents';
39
39
  export { Generate } from './generate/generate';
40
+ export { ImageToMesh, type ImageToMeshCreateResponse, type ImageToMeshCreateParams } from './image-to-mesh';
40
41
  export {
41
42
  ImageToVector,
42
43
  type ImageToVectorCreateResponse,
@@ -52,6 +53,7 @@ export {
52
53
  type ImageUpscaleCreateResponse,
53
54
  type ImageUpscaleCreateParams,
54
55
  } from './image-upscale';
56
+ export { ModelCatalog, type ModelCatalogListResponse } from './model-catalog';
55
57
  export {
56
58
  Organization,
57
59
  type OrganizationRetrieveResponse,
@@ -104,6 +106,7 @@ export {
104
106
  } from './speech-to-speech';
105
107
  export { Tasks, type TaskRetrieveResponse } from './tasks';
106
108
  export { TextToImage, type TextToImageCreateResponse, type TextToImageCreateParams } from './text-to-image';
109
+ export { TextToMesh, type TextToMeshCreateResponse, type TextToMeshCreateParams } from './text-to-mesh';
107
110
  export { TextToMusic, type TextToMusicCreateResponse, type TextToMusicCreateParams } from './text-to-music';
108
111
  export {
109
112
  TextToSpeech,