@runwayml/sdk 4.10.0 → 4.11.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/README.md +8 -8
- package/client.d.mts +6 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +6 -0
- package/client.d.ts.map +1 -1
- package/client.js +6 -0
- package/client.js.map +1 -1
- package/client.mjs +6 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/generate/generate.d.mts +10 -0
- package/resources/generate/generate.d.mts.map +1 -0
- package/resources/generate/generate.d.ts +10 -0
- package/resources/generate/generate.d.ts.map +1 -0
- package/resources/generate/generate.js +17 -0
- package/resources/generate/generate.js.map +1 -0
- package/resources/generate/generate.mjs +12 -0
- package/resources/generate/generate.mjs.map +1 -0
- package/resources/generate/index.d.mts +3 -0
- package/resources/generate/index.d.mts.map +1 -0
- package/resources/generate/index.d.ts +3 -0
- package/resources/generate/index.d.ts.map +1 -0
- package/resources/generate/index.js +9 -0
- package/resources/generate/index.js.map +1 -0
- package/resources/generate/index.mjs +4 -0
- package/resources/generate/index.mjs.map +1 -0
- package/resources/generate/video.d.mts +246 -0
- package/resources/generate/video.d.mts.map +1 -0
- package/resources/generate/video.d.ts +246 -0
- package/resources/generate/video.d.ts.map +1 -0
- package/resources/generate/video.js +17 -0
- package/resources/generate/video.js.map +1 -0
- package/resources/generate/video.mjs +13 -0
- package/resources/generate/video.mjs.map +1 -0
- package/resources/generate.d.mts +2 -0
- package/resources/generate.d.mts.map +1 -0
- package/resources/generate.d.ts +2 -0
- package/resources/generate.d.ts.map +1 -0
- package/resources/generate.js +6 -0
- package/resources/generate.js.map +1 -0
- package/resources/generate.mjs +3 -0
- package/resources/generate.mjs.map +1 -0
- package/resources/index.d.mts +2 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -0
- package/resources/index.mjs.map +1 -1
- package/resources/organization.d.mts +20 -2
- package/resources/organization.d.mts.map +1 -1
- package/resources/organization.d.ts +20 -2
- package/resources/organization.d.ts.map +1 -1
- package/resources/routers.d.mts +490 -0
- package/resources/routers.d.mts.map +1 -0
- package/resources/routers.d.ts +490 -0
- package/resources/routers.d.ts.map +1 -0
- package/resources/routers.js +49 -0
- package/resources/routers.js.map +1 -0
- package/resources/routers.mjs +45 -0
- package/resources/routers.mjs.map +1 -0
- package/resources/text-to-image.d.mts +5 -0
- package/resources/text-to-image.d.mts.map +1 -1
- package/resources/text-to-image.d.ts +5 -0
- package/resources/text-to-image.d.ts.map +1 -1
- package/src/client.ts +30 -0
- package/src/resources/generate/generate.ts +19 -0
- package/src/resources/generate/index.ts +4 -0
- package/src/resources/generate/video.ts +300 -0
- package/src/resources/generate.ts +3 -0
- package/src/resources/index.ts +12 -0
- package/src/resources/organization.ts +26 -0
- package/src/resources/routers.ts +622 -0
- package/src/resources/text-to-image.ts +6 -0
- 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,622 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { CursorPage, type CursorPageParams, PagePromise } from '../core/pagination';
|
|
6
|
+
import { buildHeaders } from '../internal/headers';
|
|
7
|
+
import { RequestOptions } from '../internal/request-options';
|
|
8
|
+
import { path } from '../internal/utils/path';
|
|
9
|
+
|
|
10
|
+
export class Routers extends APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* Create a Model Router configuration.
|
|
13
|
+
*/
|
|
14
|
+
create(body: RouterCreateParams, options?: RequestOptions): APIPromise<RouterCreateResponse> {
|
|
15
|
+
return this._client.post('/v1/routers', { body, ...options });
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Retrieve a Model Router configuration by ID.
|
|
20
|
+
*/
|
|
21
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<RouterRetrieveResponse> {
|
|
22
|
+
return this._client.get(path`/v1/routers/${id}`, options);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Update a Model Router configuration. Settings changes append a new version; name
|
|
27
|
+
* and description updates do not. Settings are merged with the current snapshot —
|
|
28
|
+
* omitted fields keep their existing values.
|
|
29
|
+
*/
|
|
30
|
+
update(
|
|
31
|
+
id: string,
|
|
32
|
+
body: RouterUpdateParams | null | undefined = {},
|
|
33
|
+
options?: RequestOptions,
|
|
34
|
+
): APIPromise<RouterUpdateResponse> {
|
|
35
|
+
return this._client.patch(path`/v1/routers/${id}`, { body, ...options });
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* List Model Router configurations for the authenticated organization with
|
|
40
|
+
* cursor-based pagination.
|
|
41
|
+
*/
|
|
42
|
+
list(
|
|
43
|
+
query: RouterListParams,
|
|
44
|
+
options?: RequestOptions,
|
|
45
|
+
): PagePromise<RouterListResponsesCursorPage, RouterListResponse> {
|
|
46
|
+
return this._client.getAPIList('/v1/routers', CursorPage<RouterListResponse>, { query, ...options });
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Delete a Model Router configuration. Deleted Model Routers cannot be used for
|
|
51
|
+
* generation.
|
|
52
|
+
*/
|
|
53
|
+
delete(id: string, options?: RequestOptions): APIPromise<void> {
|
|
54
|
+
return this._client.delete(path`/v1/routers/${id}`, {
|
|
55
|
+
...options,
|
|
56
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export type RouterListResponsesCursorPage = CursorPage<RouterListResponse>;
|
|
62
|
+
|
|
63
|
+
export interface RouterCreateResponse {
|
|
64
|
+
/**
|
|
65
|
+
* The Model Router's primary key ID (UUID). Use it to manage this router via the
|
|
66
|
+
* API; use the slug to reference the router in generation requests.
|
|
67
|
+
*/
|
|
68
|
+
id: string;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* When the Model Router was created.
|
|
72
|
+
*/
|
|
73
|
+
createdAt: string;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* An optional Model Router description.
|
|
77
|
+
*/
|
|
78
|
+
description: string | null;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Human-friendly Model Router display name shown in the dev portal. Mutable, and
|
|
82
|
+
* not used to reference the router in requests.
|
|
83
|
+
*/
|
|
84
|
+
name: string;
|
|
85
|
+
|
|
86
|
+
settings: RouterCreateResponse.Settings;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Immutable slug used to reference this Model Router in generation requests (for
|
|
90
|
+
* example, production-video). Unique within the API project. The UUID id remains
|
|
91
|
+
* the canonical management identifier.
|
|
92
|
+
*/
|
|
93
|
+
slug: string;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* When the Model Router was last updated.
|
|
97
|
+
*/
|
|
98
|
+
updatedAt: string;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Current settings version. Increments when settings change; name and description
|
|
102
|
+
* updates do not create a new version.
|
|
103
|
+
*/
|
|
104
|
+
version: number;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export namespace RouterCreateResponse {
|
|
108
|
+
export interface Settings {
|
|
109
|
+
/**
|
|
110
|
+
* Settings JSON schema version used when this snapshot was written.
|
|
111
|
+
*/
|
|
112
|
+
schemaVersion: 1;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Optional per-modality hard caps on credits for one generation. Models whose
|
|
116
|
+
* estimated cost for that modality exceeds the cap are excluded.
|
|
117
|
+
*/
|
|
118
|
+
maxCreditsPerGeneration?: Settings.MaxCreditsPerGeneration;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* When mode is allow_new_except, ids are excluded; when allowlist_only, ids are
|
|
122
|
+
* the only allowed values. Each id must be a known public video model name
|
|
123
|
+
* (unknown ids are rejected on create/update).
|
|
124
|
+
*/
|
|
125
|
+
models?: Settings.Models;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Soft preference among eligible models: cost, latency, or quality.
|
|
129
|
+
*/
|
|
130
|
+
optimizeFor?: 'cost' | 'latency' | 'quality';
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export namespace Settings {
|
|
134
|
+
/**
|
|
135
|
+
* Optional per-modality hard caps on credits for one generation. Models whose
|
|
136
|
+
* estimated cost for that modality exceeds the cap are excluded.
|
|
137
|
+
*/
|
|
138
|
+
export interface MaxCreditsPerGeneration {
|
|
139
|
+
audio?: number;
|
|
140
|
+
|
|
141
|
+
image?: number;
|
|
142
|
+
|
|
143
|
+
video?: number;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* When mode is allow_new_except, ids are excluded; when allowlist_only, ids are
|
|
148
|
+
* the only allowed values. Each id must be a known public video model name
|
|
149
|
+
* (unknown ids are rejected on create/update).
|
|
150
|
+
*/
|
|
151
|
+
export interface Models {
|
|
152
|
+
ids: Array<string>;
|
|
153
|
+
|
|
154
|
+
mode: 'allow_new_except' | 'allowlist_only';
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export interface RouterRetrieveResponse {
|
|
160
|
+
/**
|
|
161
|
+
* The Model Router's primary key ID (UUID). Use it to manage this router via the
|
|
162
|
+
* API; use the slug to reference the router in generation requests.
|
|
163
|
+
*/
|
|
164
|
+
id: string;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* When the Model Router was created.
|
|
168
|
+
*/
|
|
169
|
+
createdAt: string;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* An optional Model Router description.
|
|
173
|
+
*/
|
|
174
|
+
description: string | null;
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Human-friendly Model Router display name shown in the dev portal. Mutable, and
|
|
178
|
+
* not used to reference the router in requests.
|
|
179
|
+
*/
|
|
180
|
+
name: string;
|
|
181
|
+
|
|
182
|
+
settings: RouterRetrieveResponse.Settings;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Immutable slug used to reference this Model Router in generation requests (for
|
|
186
|
+
* example, production-video). Unique within the API project. The UUID id remains
|
|
187
|
+
* the canonical management identifier.
|
|
188
|
+
*/
|
|
189
|
+
slug: string;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* When the Model Router was last updated.
|
|
193
|
+
*/
|
|
194
|
+
updatedAt: string;
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Current settings version. Increments when settings change; name and description
|
|
198
|
+
* updates do not create a new version.
|
|
199
|
+
*/
|
|
200
|
+
version: number;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
export namespace RouterRetrieveResponse {
|
|
204
|
+
export interface Settings {
|
|
205
|
+
/**
|
|
206
|
+
* Settings JSON schema version used when this snapshot was written.
|
|
207
|
+
*/
|
|
208
|
+
schemaVersion: 1;
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Optional per-modality hard caps on credits for one generation. Models whose
|
|
212
|
+
* estimated cost for that modality exceeds the cap are excluded.
|
|
213
|
+
*/
|
|
214
|
+
maxCreditsPerGeneration?: Settings.MaxCreditsPerGeneration;
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* When mode is allow_new_except, ids are excluded; when allowlist_only, ids are
|
|
218
|
+
* the only allowed values. Each id must be a known public video model name
|
|
219
|
+
* (unknown ids are rejected on create/update).
|
|
220
|
+
*/
|
|
221
|
+
models?: Settings.Models;
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Soft preference among eligible models: cost, latency, or quality.
|
|
225
|
+
*/
|
|
226
|
+
optimizeFor?: 'cost' | 'latency' | 'quality';
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export namespace Settings {
|
|
230
|
+
/**
|
|
231
|
+
* Optional per-modality hard caps on credits for one generation. Models whose
|
|
232
|
+
* estimated cost for that modality exceeds the cap are excluded.
|
|
233
|
+
*/
|
|
234
|
+
export interface MaxCreditsPerGeneration {
|
|
235
|
+
audio?: number;
|
|
236
|
+
|
|
237
|
+
image?: number;
|
|
238
|
+
|
|
239
|
+
video?: number;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* When mode is allow_new_except, ids are excluded; when allowlist_only, ids are
|
|
244
|
+
* the only allowed values. Each id must be a known public video model name
|
|
245
|
+
* (unknown ids are rejected on create/update).
|
|
246
|
+
*/
|
|
247
|
+
export interface Models {
|
|
248
|
+
ids: Array<string>;
|
|
249
|
+
|
|
250
|
+
mode: 'allow_new_except' | 'allowlist_only';
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
export interface RouterUpdateResponse {
|
|
256
|
+
/**
|
|
257
|
+
* The Model Router's primary key ID (UUID). Use it to manage this router via the
|
|
258
|
+
* API; use the slug to reference the router in generation requests.
|
|
259
|
+
*/
|
|
260
|
+
id: string;
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* When the Model Router was created.
|
|
264
|
+
*/
|
|
265
|
+
createdAt: string;
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* An optional Model Router description.
|
|
269
|
+
*/
|
|
270
|
+
description: string | null;
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Human-friendly Model Router display name shown in the dev portal. Mutable, and
|
|
274
|
+
* not used to reference the router in requests.
|
|
275
|
+
*/
|
|
276
|
+
name: string;
|
|
277
|
+
|
|
278
|
+
settings: RouterUpdateResponse.Settings;
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* Immutable slug used to reference this Model Router in generation requests (for
|
|
282
|
+
* example, production-video). Unique within the API project. The UUID id remains
|
|
283
|
+
* the canonical management identifier.
|
|
284
|
+
*/
|
|
285
|
+
slug: string;
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* When the Model Router was last updated.
|
|
289
|
+
*/
|
|
290
|
+
updatedAt: string;
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* Current settings version. Increments when settings change; name and description
|
|
294
|
+
* updates do not create a new version.
|
|
295
|
+
*/
|
|
296
|
+
version: number;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
export namespace RouterUpdateResponse {
|
|
300
|
+
export interface Settings {
|
|
301
|
+
/**
|
|
302
|
+
* Settings JSON schema version used when this snapshot was written.
|
|
303
|
+
*/
|
|
304
|
+
schemaVersion: 1;
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Optional per-modality hard caps on credits for one generation. Models whose
|
|
308
|
+
* estimated cost for that modality exceeds the cap are excluded.
|
|
309
|
+
*/
|
|
310
|
+
maxCreditsPerGeneration?: Settings.MaxCreditsPerGeneration;
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* When mode is allow_new_except, ids are excluded; when allowlist_only, ids are
|
|
314
|
+
* the only allowed values. Each id must be a known public video model name
|
|
315
|
+
* (unknown ids are rejected on create/update).
|
|
316
|
+
*/
|
|
317
|
+
models?: Settings.Models;
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* Soft preference among eligible models: cost, latency, or quality.
|
|
321
|
+
*/
|
|
322
|
+
optimizeFor?: 'cost' | 'latency' | 'quality';
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
export namespace Settings {
|
|
326
|
+
/**
|
|
327
|
+
* Optional per-modality hard caps on credits for one generation. Models whose
|
|
328
|
+
* estimated cost for that modality exceeds the cap are excluded.
|
|
329
|
+
*/
|
|
330
|
+
export interface MaxCreditsPerGeneration {
|
|
331
|
+
audio?: number;
|
|
332
|
+
|
|
333
|
+
image?: number;
|
|
334
|
+
|
|
335
|
+
video?: number;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* When mode is allow_new_except, ids are excluded; when allowlist_only, ids are
|
|
340
|
+
* the only allowed values. Each id must be a known public video model name
|
|
341
|
+
* (unknown ids are rejected on create/update).
|
|
342
|
+
*/
|
|
343
|
+
export interface Models {
|
|
344
|
+
ids: Array<string>;
|
|
345
|
+
|
|
346
|
+
mode: 'allow_new_except' | 'allowlist_only';
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* A named Model Router configuration.
|
|
353
|
+
*/
|
|
354
|
+
export interface RouterListResponse {
|
|
355
|
+
/**
|
|
356
|
+
* The Model Router's primary key ID (UUID). Use it to manage this router via the
|
|
357
|
+
* API; use the slug to reference the router in generation requests.
|
|
358
|
+
*/
|
|
359
|
+
id: string;
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* When the Model Router was created.
|
|
363
|
+
*/
|
|
364
|
+
createdAt: string;
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* An optional Model Router description.
|
|
368
|
+
*/
|
|
369
|
+
description: string | null;
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* Human-friendly Model Router display name shown in the dev portal. Mutable, and
|
|
373
|
+
* not used to reference the router in requests.
|
|
374
|
+
*/
|
|
375
|
+
name: string;
|
|
376
|
+
|
|
377
|
+
settings: RouterListResponse.Settings;
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Immutable slug used to reference this Model Router in generation requests (for
|
|
381
|
+
* example, production-video). Unique within the API project. The UUID id remains
|
|
382
|
+
* the canonical management identifier.
|
|
383
|
+
*/
|
|
384
|
+
slug: string;
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* When the Model Router was last updated.
|
|
388
|
+
*/
|
|
389
|
+
updatedAt: string;
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
* Current settings version. Increments when settings change; name and description
|
|
393
|
+
* updates do not create a new version.
|
|
394
|
+
*/
|
|
395
|
+
version: number;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
export namespace RouterListResponse {
|
|
399
|
+
export interface Settings {
|
|
400
|
+
/**
|
|
401
|
+
* Settings JSON schema version used when this snapshot was written.
|
|
402
|
+
*/
|
|
403
|
+
schemaVersion: 1;
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
* Optional per-modality hard caps on credits for one generation. Models whose
|
|
407
|
+
* estimated cost for that modality exceeds the cap are excluded.
|
|
408
|
+
*/
|
|
409
|
+
maxCreditsPerGeneration?: Settings.MaxCreditsPerGeneration;
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* When mode is allow_new_except, ids are excluded; when allowlist_only, ids are
|
|
413
|
+
* the only allowed values. Each id must be a known public video model name
|
|
414
|
+
* (unknown ids are rejected on create/update).
|
|
415
|
+
*/
|
|
416
|
+
models?: Settings.Models;
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* Soft preference among eligible models: cost, latency, or quality.
|
|
420
|
+
*/
|
|
421
|
+
optimizeFor?: 'cost' | 'latency' | 'quality';
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
export namespace Settings {
|
|
425
|
+
/**
|
|
426
|
+
* Optional per-modality hard caps on credits for one generation. Models whose
|
|
427
|
+
* estimated cost for that modality exceeds the cap are excluded.
|
|
428
|
+
*/
|
|
429
|
+
export interface MaxCreditsPerGeneration {
|
|
430
|
+
audio?: number;
|
|
431
|
+
|
|
432
|
+
image?: number;
|
|
433
|
+
|
|
434
|
+
video?: number;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
/**
|
|
438
|
+
* When mode is allow_new_except, ids are excluded; when allowlist_only, ids are
|
|
439
|
+
* the only allowed values. Each id must be a known public video model name
|
|
440
|
+
* (unknown ids are rejected on create/update).
|
|
441
|
+
*/
|
|
442
|
+
export interface Models {
|
|
443
|
+
ids: Array<string>;
|
|
444
|
+
|
|
445
|
+
mode: 'allow_new_except' | 'allowlist_only';
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
export interface RouterCreateParams {
|
|
451
|
+
/**
|
|
452
|
+
* Immutable slug used to reference this Model Router in generation requests (for
|
|
453
|
+
* example, production-video). Unique within the API project. The UUID id remains
|
|
454
|
+
* the canonical management identifier.
|
|
455
|
+
*/
|
|
456
|
+
slug: string;
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* An optional Model Router description.
|
|
460
|
+
*/
|
|
461
|
+
description?: string;
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
* Optional human-readable display name for this router. Defaults to the slug when
|
|
465
|
+
* omitted.
|
|
466
|
+
*/
|
|
467
|
+
name?: string;
|
|
468
|
+
|
|
469
|
+
/**
|
|
470
|
+
* Model Router routing preferences. Defaults to cost-optimized allow-all when
|
|
471
|
+
* omitted. Modality is implied by the generate endpoint used with this Model
|
|
472
|
+
* Router.
|
|
473
|
+
*/
|
|
474
|
+
settings?: RouterCreateParams.Settings;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
export namespace RouterCreateParams {
|
|
478
|
+
/**
|
|
479
|
+
* Model Router routing preferences. Defaults to cost-optimized allow-all when
|
|
480
|
+
* omitted. Modality is implied by the generate endpoint used with this Model
|
|
481
|
+
* Router.
|
|
482
|
+
*/
|
|
483
|
+
export interface Settings {
|
|
484
|
+
/**
|
|
485
|
+
* Optional per-modality hard caps on credits for one generation. Models whose
|
|
486
|
+
* estimated cost for that modality exceeds the cap are excluded.
|
|
487
|
+
*/
|
|
488
|
+
maxCreditsPerGeneration?: Settings.MaxCreditsPerGeneration;
|
|
489
|
+
|
|
490
|
+
/**
|
|
491
|
+
* When mode is allow_new_except, ids are excluded; when allowlist_only, ids are
|
|
492
|
+
* the only allowed values. Each id must be a known public video model name
|
|
493
|
+
* (unknown ids are rejected on create/update).
|
|
494
|
+
*/
|
|
495
|
+
models?: Settings.Models;
|
|
496
|
+
|
|
497
|
+
/**
|
|
498
|
+
* Soft preference among eligible models: cost, latency, or quality.
|
|
499
|
+
*/
|
|
500
|
+
optimizeFor?: 'cost' | 'latency' | 'quality';
|
|
501
|
+
|
|
502
|
+
/**
|
|
503
|
+
* Settings JSON schema version. Omit on write to use the current version;
|
|
504
|
+
* responses and stored snapshots always include it.
|
|
505
|
+
*/
|
|
506
|
+
schemaVersion?: 1;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
export namespace Settings {
|
|
510
|
+
/**
|
|
511
|
+
* Optional per-modality hard caps on credits for one generation. Models whose
|
|
512
|
+
* estimated cost for that modality exceeds the cap are excluded.
|
|
513
|
+
*/
|
|
514
|
+
export interface MaxCreditsPerGeneration {
|
|
515
|
+
audio?: number;
|
|
516
|
+
|
|
517
|
+
image?: number;
|
|
518
|
+
|
|
519
|
+
video?: number;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
/**
|
|
523
|
+
* When mode is allow_new_except, ids are excluded; when allowlist_only, ids are
|
|
524
|
+
* the only allowed values. Each id must be a known public video model name
|
|
525
|
+
* (unknown ids are rejected on create/update).
|
|
526
|
+
*/
|
|
527
|
+
export interface Models {
|
|
528
|
+
ids: Array<string>;
|
|
529
|
+
|
|
530
|
+
mode: 'allow_new_except' | 'allowlist_only';
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
export interface RouterUpdateParams {
|
|
536
|
+
description?: string | null;
|
|
537
|
+
|
|
538
|
+
/**
|
|
539
|
+
* Display name. The slug is immutable and cannot be changed after creation.
|
|
540
|
+
*/
|
|
541
|
+
name?: string;
|
|
542
|
+
|
|
543
|
+
/**
|
|
544
|
+
* Nested merge: omitted settings fields keep their current values. When models is
|
|
545
|
+
* present, omitted models.mode or models.ids are preserved (sending only
|
|
546
|
+
* optimizeFor does not clear the model allowlist or credit ceiling).
|
|
547
|
+
*/
|
|
548
|
+
settings?: RouterUpdateParams.Settings;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
export namespace RouterUpdateParams {
|
|
552
|
+
/**
|
|
553
|
+
* Nested merge: omitted settings fields keep their current values. When models is
|
|
554
|
+
* present, omitted models.mode or models.ids are preserved (sending only
|
|
555
|
+
* optimizeFor does not clear the model allowlist or credit ceiling).
|
|
556
|
+
*/
|
|
557
|
+
export interface Settings {
|
|
558
|
+
/**
|
|
559
|
+
* Optional per-modality hard caps on credits for one generation. Models whose
|
|
560
|
+
* estimated cost for that modality exceeds the cap are excluded.
|
|
561
|
+
*/
|
|
562
|
+
maxCreditsPerGeneration?: Settings.MaxCreditsPerGeneration;
|
|
563
|
+
|
|
564
|
+
/**
|
|
565
|
+
* When mode is allow_new_except, ids are excluded; when allowlist_only, ids are
|
|
566
|
+
* the only allowed values. Each id must be a known public video model name
|
|
567
|
+
* (unknown ids are rejected on create/update).
|
|
568
|
+
*/
|
|
569
|
+
models?: Settings.Models;
|
|
570
|
+
|
|
571
|
+
/**
|
|
572
|
+
* Soft preference among eligible models: cost, latency, or quality.
|
|
573
|
+
*/
|
|
574
|
+
optimizeFor?: 'cost' | 'latency' | 'quality';
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* Settings JSON schema version. Omit on write to use the current version;
|
|
578
|
+
* responses and stored snapshots always include it.
|
|
579
|
+
*/
|
|
580
|
+
schemaVersion?: 1;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
export namespace Settings {
|
|
584
|
+
/**
|
|
585
|
+
* Optional per-modality hard caps on credits for one generation. Models whose
|
|
586
|
+
* estimated cost for that modality exceeds the cap are excluded.
|
|
587
|
+
*/
|
|
588
|
+
export interface MaxCreditsPerGeneration {
|
|
589
|
+
audio?: number;
|
|
590
|
+
|
|
591
|
+
image?: number;
|
|
592
|
+
|
|
593
|
+
video?: number;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
/**
|
|
597
|
+
* When mode is allow_new_except, ids are excluded; when allowlist_only, ids are
|
|
598
|
+
* the only allowed values. Each id must be a known public video model name
|
|
599
|
+
* (unknown ids are rejected on create/update).
|
|
600
|
+
*/
|
|
601
|
+
export interface Models {
|
|
602
|
+
ids: Array<string>;
|
|
603
|
+
|
|
604
|
+
mode: 'allow_new_except' | 'allowlist_only';
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
export interface RouterListParams extends CursorPageParams {}
|
|
610
|
+
|
|
611
|
+
export declare namespace Routers {
|
|
612
|
+
export {
|
|
613
|
+
type RouterCreateResponse as RouterCreateResponse,
|
|
614
|
+
type RouterRetrieveResponse as RouterRetrieveResponse,
|
|
615
|
+
type RouterUpdateResponse as RouterUpdateResponse,
|
|
616
|
+
type RouterListResponse as RouterListResponse,
|
|
617
|
+
type RouterListResponsesCursorPage as RouterListResponsesCursorPage,
|
|
618
|
+
type RouterCreateParams as RouterCreateParams,
|
|
619
|
+
type RouterUpdateParams as RouterUpdateParams,
|
|
620
|
+
type RouterListParams as RouterListParams,
|
|
621
|
+
};
|
|
622
|
+
}
|
|
@@ -492,6 +492,12 @@ export declare namespace TextToImageCreateParams {
|
|
|
492
492
|
| 'auto_1k'
|
|
493
493
|
| 'auto_2k';
|
|
494
494
|
|
|
495
|
+
/**
|
|
496
|
+
* When true, enable live web search so the model can use current brand, trend, or
|
|
497
|
+
* event context. Default false for deterministic output.
|
|
498
|
+
*/
|
|
499
|
+
grounding?: boolean;
|
|
500
|
+
|
|
495
501
|
/**
|
|
496
502
|
* The number of images to generate. Increasing this number will affect the number
|
|
497
503
|
* of credits consumed by the generation.
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '4.
|
|
1
|
+
export const VERSION = '4.11.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "4.
|
|
1
|
+
export declare const VERSION = "4.11.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "4.
|
|
1
|
+
export declare const VERSION = "4.11.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '4.
|
|
1
|
+
export const VERSION = '4.11.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|