@runwayml/sdk 4.29.0 → 4.30.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 (80) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/package.json +1 -1
  3. package/resources/generate/image.d.mts +2 -2
  4. package/resources/generate/image.d.ts +2 -2
  5. package/resources/generate/video.d.mts +5 -0
  6. package/resources/generate/video.d.mts.map +1 -1
  7. package/resources/generate/video.d.ts +5 -0
  8. package/resources/generate/video.d.ts.map +1 -1
  9. package/resources/image-to-video.d.mts +6 -1
  10. package/resources/image-to-video.d.mts.map +1 -1
  11. package/resources/image-to-video.d.ts +6 -1
  12. package/resources/image-to-video.d.ts.map +1 -1
  13. package/resources/organization/index.d.mts +1 -1
  14. package/resources/organization/index.d.mts.map +1 -1
  15. package/resources/organization/index.d.ts +1 -1
  16. package/resources/organization/index.d.ts.map +1 -1
  17. package/resources/organization/index.js.map +1 -1
  18. package/resources/organization/index.mjs.map +1 -1
  19. package/resources/organization/organization.d.mts +4 -4
  20. package/resources/organization/organization.d.mts.map +1 -1
  21. package/resources/organization/organization.d.ts +4 -4
  22. package/resources/organization/organization.d.ts.map +1 -1
  23. package/resources/organization/organization.js.map +1 -1
  24. package/resources/organization/organization.mjs.map +1 -1
  25. package/resources/organization/webapp/audit-logs.d.mts +34 -14
  26. package/resources/organization/webapp/audit-logs.d.mts.map +1 -1
  27. package/resources/organization/webapp/audit-logs.d.ts +34 -14
  28. package/resources/organization/webapp/audit-logs.d.ts.map +1 -1
  29. package/resources/organization/webapp/index.d.mts +1 -1
  30. package/resources/organization/webapp/index.d.mts.map +1 -1
  31. package/resources/organization/webapp/index.d.ts +1 -1
  32. package/resources/organization/webapp/index.d.ts.map +1 -1
  33. package/resources/organization/webapp/index.js.map +1 -1
  34. package/resources/organization/webapp/index.mjs.map +1 -1
  35. package/resources/organization/webapp/webapp.d.mts +79 -1
  36. package/resources/organization/webapp/webapp.d.mts.map +1 -1
  37. package/resources/organization/webapp/webapp.d.ts +79 -1
  38. package/resources/organization/webapp/webapp.d.ts.map +1 -1
  39. package/resources/organization/webapp/webapp.js +12 -0
  40. package/resources/organization/webapp/webapp.js.map +1 -1
  41. package/resources/organization/webapp/webapp.mjs +12 -0
  42. package/resources/organization/webapp/webapp.mjs.map +1 -1
  43. package/resources/tasks.d.mts +25 -2
  44. package/resources/tasks.d.mts.map +1 -1
  45. package/resources/tasks.d.ts +25 -2
  46. package/resources/tasks.d.ts.map +1 -1
  47. package/resources/text-to-image.d.mts +86 -4
  48. package/resources/text-to-image.d.mts.map +1 -1
  49. package/resources/text-to-image.d.ts +86 -4
  50. package/resources/text-to-image.d.ts.map +1 -1
  51. package/resources/text-to-speech.d.mts +77 -1
  52. package/resources/text-to-speech.d.mts.map +1 -1
  53. package/resources/text-to-speech.d.ts +77 -1
  54. package/resources/text-to-speech.d.ts.map +1 -1
  55. package/resources/text-to-video.d.mts +7 -2
  56. package/resources/text-to-video.d.mts.map +1 -1
  57. package/resources/text-to-video.d.ts +7 -2
  58. package/resources/text-to-video.d.ts.map +1 -1
  59. package/resources/video-to-video.d.mts +7 -2
  60. package/resources/video-to-video.d.mts.map +1 -1
  61. package/resources/video-to-video.d.ts +7 -2
  62. package/resources/video-to-video.d.ts.map +1 -1
  63. package/src/resources/generate/image.ts +2 -2
  64. package/src/resources/generate/video.ts +6 -0
  65. package/src/resources/image-to-video.ts +7 -1
  66. package/src/resources/organization/index.ts +3 -0
  67. package/src/resources/organization/organization.ts +16 -2
  68. package/src/resources/organization/webapp/audit-logs.ts +58 -12
  69. package/src/resources/organization/webapp/index.ts +3 -0
  70. package/src/resources/organization/webapp/webapp.ts +104 -0
  71. package/src/resources/tasks.ts +33 -2
  72. package/src/resources/text-to-image.ts +132 -4
  73. package/src/resources/text-to-speech.ts +143 -1
  74. package/src/resources/text-to-video.ts +13 -2
  75. package/src/resources/video-to-video.ts +13 -2
  76. package/src/version.ts +1 -1
  77. package/version.d.mts +1 -1
  78. package/version.d.ts +1 -1
  79. package/version.js +1 -1
  80. package/version.mjs +1 -1
@@ -44,6 +44,7 @@ export interface AuditLogRetrieveResponse {
44
44
  */
45
45
  action:
46
46
  | 'AgentArtifactCommentCreated'
47
+ | 'AgentArtifactCommentDeleted'
47
48
  | 'AgentArtifactCreated'
48
49
  | 'AgentArtifactVersionSaved'
49
50
  | 'AgentArtifactSessionAttached'
@@ -151,6 +152,7 @@ export interface AuditLogRetrieveResponse {
151
152
  | 'AdCreativeApprovalRevoked'
152
153
  | 'AdCreativeArchived'
153
154
  | 'AdCreativeUnarchived'
155
+ | 'AdCreativeCopyUpdated'
154
156
  | 'AdPublishBatchQueued'
155
157
  | 'AdPublishBatchCancelled'
156
158
  | 'AdPublishBatchRetried'
@@ -179,6 +181,8 @@ export interface AuditLogRetrieveResponse {
179
181
  | 'EnterpriseSpendCapEnforcementUpdated'
180
182
  | 'OnboardingBonusGranted'
181
183
  | 'PromotionCreditsGranted'
184
+ | 'CreditsGranted'
185
+ | 'SpendCapAmountChanged'
182
186
  | 'AwsMarketplaceEnterpriseSubscriptionLinked';
183
187
 
184
188
  /**
@@ -271,6 +275,10 @@ export namespace AuditLogRetrieveResponse {
271
275
 
272
276
  'Ad review request ID'?: string;
273
277
 
278
+ 'Ad revision ID'?: string;
279
+
280
+ 'Ad revision number'?: string;
281
+
274
282
  'Ad sync end date'?: string;
275
283
 
276
284
  'Ad sync run ID'?: string;
@@ -339,6 +347,10 @@ export namespace AuditLogRetrieveResponse {
339
347
 
340
348
  Connector?: string;
341
349
 
350
+ 'Contract end'?: string;
351
+
352
+ 'Contract start'?: string;
353
+
342
354
  'Creatives cancelled'?: number;
343
355
 
344
356
  'Creatives queued'?: number;
@@ -367,6 +379,8 @@ export namespace AuditLogRetrieveResponse {
367
379
 
368
380
  'Files moved'?: number;
369
381
 
382
+ 'From workspace'?: string;
383
+
370
384
  'From workspace ID'?: number;
371
385
 
372
386
  'Group name'?: string;
@@ -395,6 +409,8 @@ export namespace AuditLogRetrieveResponse {
395
409
 
396
410
  Model?: string;
397
411
 
412
+ 'Models changed'?: Array<string>;
413
+
398
414
  'New email'?: string;
399
415
 
400
416
  'New role'?: string;
@@ -425,6 +441,8 @@ export namespace AuditLogRetrieveResponse {
425
441
 
426
442
  'Previous role'?: string | null;
427
443
 
444
+ 'Previous spend cap'?: number;
445
+
428
446
  'Previous text'?: string;
429
447
 
430
448
  'Previous value'?: string | number | boolean | { [key: string]: boolean } | null;
@@ -487,6 +505,8 @@ export namespace AuditLogRetrieveResponse {
487
505
 
488
506
  'Spend cap change'?: number;
489
507
 
508
+ 'Spend cap used'?: number;
509
+
490
510
  'Status after'?: string;
491
511
 
492
512
  'Status before'?: string;
@@ -501,6 +521,8 @@ export namespace AuditLogRetrieveResponse {
501
521
 
502
522
  'Task ID'?: string;
503
523
 
524
+ 'To workspace'?: string;
525
+
504
526
  'To workspace ID'?: number;
505
527
 
506
528
  Tool?: string;
@@ -529,6 +551,7 @@ export interface AuditLogListResponse {
529
551
  */
530
552
  action:
531
553
  | 'AgentArtifactCommentCreated'
554
+ | 'AgentArtifactCommentDeleted'
532
555
  | 'AgentArtifactCreated'
533
556
  | 'AgentArtifactVersionSaved'
534
557
  | 'AgentArtifactSessionAttached'
@@ -636,6 +659,7 @@ export interface AuditLogListResponse {
636
659
  | 'AdCreativeApprovalRevoked'
637
660
  | 'AdCreativeArchived'
638
661
  | 'AdCreativeUnarchived'
662
+ | 'AdCreativeCopyUpdated'
639
663
  | 'AdPublishBatchQueued'
640
664
  | 'AdPublishBatchCancelled'
641
665
  | 'AdPublishBatchRetried'
@@ -664,6 +688,8 @@ export interface AuditLogListResponse {
664
688
  | 'EnterpriseSpendCapEnforcementUpdated'
665
689
  | 'OnboardingBonusGranted'
666
690
  | 'PromotionCreditsGranted'
691
+ | 'CreditsGranted'
692
+ | 'SpendCapAmountChanged'
667
693
  | 'AwsMarketplaceEnterpriseSubscriptionLinked';
668
694
 
669
695
  /**
@@ -726,6 +752,10 @@ export namespace AuditLogListResponse {
726
752
 
727
753
  'Ad review request ID'?: string;
728
754
 
755
+ 'Ad revision ID'?: string;
756
+
757
+ 'Ad revision number'?: string;
758
+
729
759
  'Ad sync end date'?: string;
730
760
 
731
761
  'Ad sync run ID'?: string;
@@ -794,6 +824,10 @@ export namespace AuditLogListResponse {
794
824
 
795
825
  Connector?: string;
796
826
 
827
+ 'Contract end'?: string;
828
+
829
+ 'Contract start'?: string;
830
+
797
831
  'Creatives cancelled'?: number;
798
832
 
799
833
  'Creatives queued'?: number;
@@ -822,6 +856,8 @@ export namespace AuditLogListResponse {
822
856
 
823
857
  'Files moved'?: number;
824
858
 
859
+ 'From workspace'?: string;
860
+
825
861
  'From workspace ID'?: number;
826
862
 
827
863
  'Group name'?: string;
@@ -850,6 +886,8 @@ export namespace AuditLogListResponse {
850
886
 
851
887
  Model?: string;
852
888
 
889
+ 'Models changed'?: Array<string>;
890
+
853
891
  'New email'?: string;
854
892
 
855
893
  'New role'?: string;
@@ -880,6 +918,8 @@ export namespace AuditLogListResponse {
880
918
 
881
919
  'Previous role'?: string | null;
882
920
 
921
+ 'Previous spend cap'?: number;
922
+
883
923
  'Previous text'?: string;
884
924
 
885
925
  'Previous value'?: string | number | boolean | { [key: string]: boolean } | null;
@@ -942,6 +982,8 @@ export namespace AuditLogListResponse {
942
982
 
943
983
  'Spend cap change'?: number;
944
984
 
985
+ 'Spend cap used'?: number;
986
+
945
987
  'Status after'?: string;
946
988
 
947
989
  'Status before'?: string;
@@ -956,6 +998,8 @@ export namespace AuditLogListResponse {
956
998
 
957
999
  'Task ID'?: string;
958
1000
 
1001
+ 'To workspace'?: string;
1002
+
959
1003
  'To workspace ID'?: number;
960
1004
 
961
1005
  Tool?: string;
@@ -992,10 +1036,11 @@ export interface AuditLogListParams extends CursorPageParams {
992
1036
  /**
993
1037
  * Restrict results to these audit log actions, as a comma-separated list of up to
994
1038
  * 50 actions. Allowed values: `AgentArtifactCommentCreated`,
995
- * `AgentArtifactCreated`, `AgentArtifactVersionSaved`,
996
- * `AgentArtifactSessionAttached`, `AgentArtifactSessionDetached`, `UserLogin`,
997
- * `PasswordChanged`, `EmailChangeRequested`, `EmailChanged`, `UserRegistered`,
998
- * `UserAccountDeleted`, `WorkspaceCreated`, `WorkspaceDeleted`, `MemberInvited`,
1039
+ * `AgentArtifactCommentDeleted`, `AgentArtifactCreated`,
1040
+ * `AgentArtifactVersionSaved`, `AgentArtifactSessionAttached`,
1041
+ * `AgentArtifactSessionDetached`, `UserLogin`, `PasswordChanged`,
1042
+ * `EmailChangeRequested`, `EmailChanged`, `UserRegistered`, `UserAccountDeleted`,
1043
+ * `WorkspaceCreated`, `WorkspaceDeleted`, `MemberInvited`,
999
1044
  * `MemberInviteReminderSent`, `MemberRemoved`, `MemberRoleChanged`,
1000
1045
  * `InviteAccepted`, `MemberJoinedViaDomain`, `TeamSettingsUpdated`,
1001
1046
  * `InviteLinkToggled`, `UserGroupCreated`, `UserGroupUpdated`, `UserGroupDeleted`,
@@ -1030,20 +1075,21 @@ export interface AuditLogListParams extends CursorPageParams {
1030
1075
  * `AdConnectionDisconnected`, `AdWorkspaceOnboardingUpdated`,
1031
1076
  * `AdCreativeReviewSubmitted`, `AdCreativeReviewCancelled`,
1032
1077
  * `AdCreativeReviewDecided`, `AdCreativeApprovalRevoked`, `AdCreativeArchived`,
1033
- * `AdCreativeUnarchived`, `AdPublishBatchQueued`, `AdPublishBatchCancelled`,
1034
- * `AdPublishBatchRetried`, `AdStatusChanged`, `AdCampaignSetupDrafted`,
1035
- * `AdCampaignSetupDiscarded`, `AdCampaignSetupConfirmed`,
1036
- * `AdCampaignSetupCancelled`, `AdCampaignSetupRetried`,
1037
- * `OrganizationSettingsUpdated`, `OrganizationDisabledModelsUpdated`,
1038
- * `OrganizationAgentSandboxUpdated`, `OrganizationApiAccountReleased`,
1039
- * `OrganizationApiAccountMemberInvited`,
1078
+ * `AdCreativeUnarchived`, `AdCreativeCopyUpdated`, `AdPublishBatchQueued`,
1079
+ * `AdPublishBatchCancelled`, `AdPublishBatchRetried`, `AdStatusChanged`,
1080
+ * `AdCampaignSetupDrafted`, `AdCampaignSetupDiscarded`,
1081
+ * `AdCampaignSetupConfirmed`, `AdCampaignSetupCancelled`,
1082
+ * `AdCampaignSetupRetried`, `OrganizationSettingsUpdated`,
1083
+ * `OrganizationDisabledModelsUpdated`, `OrganizationAgentSandboxUpdated`,
1084
+ * `OrganizationApiAccountReleased`, `OrganizationApiAccountMemberInvited`,
1040
1085
  * `OrganizationApiAccountMemberRoleChanged`,
1041
1086
  * `OrganizationApiAccountMemberRemoved`, `WorkspaceCountryLockUpdated`,
1042
1087
  * `WorkspaceTagCreated`, `WorkspaceTagUpdated`, `WorkspaceTagDeleted`,
1043
1088
  * `WorkspaceTagAssigned`, `WorkspaceTagUnassigned`, `MeteredBillingConfigUpdated`,
1044
1089
  * `MeteredBillingRefillTriggered`, `MeteredBillingRetryTriggered`,
1045
1090
  * `EnterpriseSpendCapEnforcementUpdated`, `OnboardingBonusGranted`,
1046
- * `PromotionCreditsGranted`, `AwsMarketplaceEnterpriseSubscriptionLinked`.
1091
+ * `PromotionCreditsGranted`, `CreditsGranted`, `SpendCapAmountChanged`,
1092
+ * `AwsMarketplaceEnterpriseSubscriptionLinked`.
1047
1093
  */
1048
1094
  actions?: string;
1049
1095
 
@@ -10,7 +10,10 @@ export {
10
10
  } from './audit-logs';
11
11
  export {
12
12
  Webapp,
13
+ type WebappListMembersResponse,
13
14
  type WebappListUsageResponse,
15
+ type WebappListMembersParams,
14
16
  type WebappListUsageParams,
17
+ type WebappListMembersResponsesCursorPage,
15
18
  type WebappListUsageResponsesCursorPage,
16
19
  } from './webapp';
@@ -16,6 +16,22 @@ import { RequestOptions } from '../../../internal/request-options';
16
16
  export class Webapp extends APIResource {
17
17
  auditLogs: AuditLogsAPI.AuditLogs = new AuditLogsAPI.AuditLogs(this._client);
18
18
 
19
+ /**
20
+ * List the members of the linked Runway workspaces you administer, one row per
21
+ * member per workspace, including pending invites and members who were removed.
22
+ * Ordered by `membershipId`. Authorized via the account link between this API
23
+ * project and the workspace.
24
+ */
25
+ listMembers(
26
+ query: WebappListMembersParams | null | undefined = {},
27
+ options?: RequestOptions,
28
+ ): PagePromise<WebappListMembersResponsesCursorPage, WebappListMembersResponse> {
29
+ return this._client.getAPIList('/v1/organization/webapp/members', CursorPage<WebappListMembersResponse>, {
30
+ query,
31
+ ...options,
32
+ });
33
+ }
34
+
19
35
  /**
20
36
  * List per-generation credit-usage rows for the linked Runway workspaces you
21
37
  * administer, newest first. Unlike `/v1/organization/usage` (this API project's
@@ -33,8 +49,77 @@ export class Webapp extends APIResource {
33
49
  }
34
50
  }
35
51
 
52
+ export type WebappListMembersResponsesCursorPage = CursorPage<WebappListMembersResponse>;
53
+
36
54
  export type WebappListUsageResponsesCursorPage = CursorPage<WebappListUsageResponse>;
37
55
 
56
+ export interface WebappListMembersResponse {
57
+ /**
58
+ * Why the membership is `deactivated`. `removed`: the member was removed from the
59
+ * workspace. `invite_ended`: the invite was declined or revoked, which are
60
+ * recorded the same way. `suspended`: the user is suspended. `null` unless
61
+ * `status` is `deactivated`.
62
+ */
63
+ deactivationReason: 'removed' | 'invite_ended' | 'suspended' | null;
64
+
65
+ /**
66
+ * Approximately when the member was removed, or the invite was declined or
67
+ * revoked: the membership's last change. `null` when the membership was not ended,
68
+ * including for a suspended user.
69
+ */
70
+ deprovisionedAt: string | null;
71
+
72
+ /**
73
+ * Email of the member, or the email the invite was sent to.
74
+ */
75
+ email: string;
76
+
77
+ /**
78
+ * Last UTC date the member used Runway, on the web or mobile app and in any
79
+ * workspace. `null` when they never accepted the invite or have no recorded
80
+ * activity.
81
+ */
82
+ lastActiveDate: string | null;
83
+
84
+ /**
85
+ * Unique ID of the membership. Stable across requests, so use it to update a
86
+ * member's row between pulls.
87
+ */
88
+ membershipId: number;
89
+
90
+ /**
91
+ * When the member was added, or when the invite was sent.
92
+ */
93
+ provisionedAt: string;
94
+
95
+ /**
96
+ * Role in the workspace. `non-generating-admin` is a Billing Admin.
97
+ */
98
+ role: 'viewer' | 'editor' | 'admin' | 'non-generating-admin';
99
+
100
+ /**
101
+ * `active`: a member of the workspace. `invited`: invited, and the invite is not
102
+ * accepted yet. `deactivated`: no longer a member; `deactivationReason` says why.
103
+ */
104
+ status: 'active' | 'invited' | 'deactivated';
105
+
106
+ /**
107
+ * ID of the member's Runway user. It doesn't change when their email does. `null`
108
+ * for an invite to an email with no Runway account yet.
109
+ */
110
+ userId: number | null;
111
+
112
+ /**
113
+ * ID of the workspace.
114
+ */
115
+ workspaceId: number;
116
+
117
+ /**
118
+ * Name of the workspace.
119
+ */
120
+ workspaceName: string;
121
+ }
122
+
38
123
  export interface WebappListUsageResponse {
39
124
  /**
40
125
  * Credits charged for this generation.
@@ -145,6 +230,22 @@ export interface WebappListUsageResponse {
145
230
  workspaceName: string;
146
231
  }
147
232
 
233
+ export interface WebappListMembersParams extends CursorPageParams {
234
+ /**
235
+ * Organization to report on. Optional when this API project is linked to a single
236
+ * organization; required when it is linked to more than one. If it is missing
237
+ * then, the 400 response lists the IDs and names of the linked organizations in
238
+ * `details.organizations`.
239
+ */
240
+ organizationId?: string;
241
+
242
+ /**
243
+ * Restrict results to these workspace IDs, as a comma-separated list of up to 50
244
+ * IDs. Defaults to every workspace you administer in the organization.
245
+ */
246
+ workspaceIds?: string;
247
+ }
248
+
148
249
  export interface WebappListUsageParams extends CursorPageParams {
149
250
  /**
150
251
  * Start of the time window (inclusive), ISO-8601 datetime or date. A date means
@@ -178,8 +279,11 @@ Webapp.AuditLogs = AuditLogs;
178
279
 
179
280
  export declare namespace Webapp {
180
281
  export {
282
+ type WebappListMembersResponse as WebappListMembersResponse,
181
283
  type WebappListUsageResponse as WebappListUsageResponse,
284
+ type WebappListMembersResponsesCursorPage as WebappListMembersResponsesCursorPage,
182
285
  type WebappListUsageResponsesCursorPage as WebappListUsageResponsesCursorPage,
286
+ type WebappListMembersParams as WebappListMembersParams,
183
287
  type WebappListUsageParams as WebappListUsageParams,
184
288
  };
185
289
 
@@ -275,8 +275,14 @@ export namespace TaskRetrieveResponse {
275
275
  status: 'SUCCEEDED';
276
276
 
277
277
  /**
278
- * Layer details for successful Seedream layer decomposition tasks. Each URI
279
- * matches the output URL at the same index.
278
+ * The ads an ad generation task made. Each URI matches the output URL at the same
279
+ * index.
280
+ */
281
+ ads?: Array<Succeeded.Ad>;
282
+
283
+ /**
284
+ * Layer details for successful layer decomposition tasks. Each URI matches the
285
+ * output URL at the same index.
280
286
  */
281
287
  layers?: Array<Succeeded.Layer>;
282
288
  }
@@ -293,6 +299,31 @@ export namespace TaskRetrieveResponse {
293
299
  credits: number;
294
300
  }
295
301
 
302
+ export interface Ad {
303
+ /**
304
+ * Which version this is, such as "9:16, Spanish".
305
+ */
306
+ label: string;
307
+
308
+ mediaType: 'image' | 'video';
309
+
310
+ /**
311
+ * An ephemeral URL for this ad, matching output at the same index.
312
+ */
313
+ uri: string;
314
+
315
+ durationSeconds?: number;
316
+
317
+ height?: number;
318
+
319
+ /**
320
+ * The post copy to run with the ad, when there is any.
321
+ */
322
+ postText?: string;
323
+
324
+ width?: number;
325
+ }
326
+
296
327
  export interface Layer {
297
328
  /**
298
329
  * An ephemeral URL for this layer, matching output at the same index.
@@ -83,7 +83,8 @@ export type TextToImageCreateParams =
83
83
  | TextToImageCreateParams.Seedream5_5
84
84
  | TextToImageCreateParams.Seedream5_5Layers
85
85
  | TextToImageCreateParams.MinimaxH3Image
86
- | TextToImageCreateParams.Gemini2_5Flash;
86
+ | TextToImageCreateParams.Gemini2_5Flash
87
+ | TextToImageCreateParams.Ideogram4_6;
87
88
 
88
89
  export declare namespace TextToImageCreateParams {
89
90
  export interface Gen4ImageTurbo {
@@ -1840,8 +1841,9 @@ export declare namespace TextToImageCreateParams {
1840
1841
 
1841
1842
  /**
1842
1843
  * The resolution of the output image, expressed as `<width>:<height>`. Use
1843
- * `auto_1k`, `auto_1.5k` or `auto_2k` to let the model pick the aspect ratio at a
1844
- * fixed resolution tier.
1844
+ * `auto_1k`, `auto_1.5k`, `auto_2k` or `auto_4k` to let the model pick the aspect
1845
+ * ratio at a fixed resolution tier. With `auto_4k`, the output takes the 4K aspect
1846
+ * ratio nearest to the first reference image, or 1:1 without reference images.
1845
1847
  */
1846
1848
  ratio:
1847
1849
  | '1024:1024'
@@ -1868,9 +1870,18 @@ export declare namespace TextToImageCreateParams {
1868
1870
  | '2496:1664'
1869
1871
  | '1664:2496'
1870
1872
  | '3136:1344'
1873
+ | '2880:2880'
1874
+ | '3264:2448'
1875
+ | '2448:3264'
1876
+ | '3840:2160'
1877
+ | '2160:3840'
1878
+ | '3504:2336'
1879
+ | '2336:3504'
1880
+ | '4368:1872'
1871
1881
  | 'auto_1k'
1872
1882
  | 'auto_1.5k'
1873
- | 'auto_2k';
1883
+ | 'auto_2k'
1884
+ | 'auto_4k';
1874
1885
 
1875
1886
  /**
1876
1887
  * Whether the image has a transparent or an opaque background. A transparent
@@ -2095,6 +2106,123 @@ export declare namespace TextToImageCreateParams {
2095
2106
  tag?: string;
2096
2107
  }
2097
2108
  }
2109
+
2110
+ export interface Ideogram4_6 {
2111
+ model: 'ideogram_4_6';
2112
+
2113
+ /**
2114
+ * Describe the image to generate, or the changes to make to the first reference
2115
+ * image.
2116
+ */
2117
+ promptText: string;
2118
+
2119
+ /**
2120
+ * Use `transparent` to return a PNG with an alpha channel, or `opaque` for a solid
2121
+ * background. Omit it to let the model decide. Not available with `maskUri` or
2122
+ * `preciseEdit`.
2123
+ */
2124
+ background?: 'transparent' | 'opaque';
2125
+
2126
+ /**
2127
+ * Precise-edit region: `none`, `auto` (requires `maskUri`), or
2128
+ * `top,left,bottom,right` in original-image pixels, with exclusive maximum edges.
2129
+ * A manual region preserves full resolution and all pixels outside it. All masked
2130
+ * edit pixels must lie inside a manual region. Requires edit-window access.
2131
+ */
2132
+ contextWindow?: string;
2133
+
2134
+ /**
2135
+ * Whether Ideogram rewrites the prompt to add detail before generating. Defaults
2136
+ * to `auto`. Only `auto` is available with reference images.
2137
+ */
2138
+ magicPrompt?: 'auto' | 'on' | 'off';
2139
+
2140
+ /**
2141
+ * A HTTPS URL, Runway upload URI, or base64 data URI (e.g.
2142
+ * `data:image/png;base64,...`, up to 5MB) containing an encoded image. See
2143
+ * [our docs](/assets/inputs#images) on image inputs for more information.
2144
+ */
2145
+ maskUri?: string;
2146
+
2147
+ /**
2148
+ * The number of images to generate. Increasing this number will affect the number
2149
+ * of credits consumed by the generation.
2150
+ */
2151
+ outputCount?: number;
2152
+
2153
+ /**
2154
+ * When true, change part of the first reference image and keep its size. Requires
2155
+ * at least one reference image, which may be up to 64 megapixels. Whole-image
2156
+ * edits above 4,194,304 pixels are scaled down. Set `contextWindow` to edit a
2157
+ * region at full source resolution.
2158
+ */
2159
+ preciseEdit?: boolean;
2160
+
2161
+ /**
2162
+ * How much rendering effort the model spends on each image. Defaults to `medium`.
2163
+ * Credits per image at 2K / 4K: `very_low` 1 (2K only), `low` 3 / 6, `medium` 6 /
2164
+ * 12, `high` 10 / 20. With reference images or `preciseEdit`: `medium` 6 / 20,
2165
+ * `high` 22 / 60. Edits that keep the source size are billed at 4K when the source
2166
+ * is larger than 2048×2048 pixels.
2167
+ */
2168
+ quality?: 'very_low' | 'low' | 'medium' | 'high';
2169
+
2170
+ /**
2171
+ * The resolution of the output image, expressed as `<width>:<height>`. Omit it or
2172
+ * use `auto` to let the model choose a size around 2K. `4096:4096`, `4096:2304`,
2173
+ * `2304:4096`, `4096:3072`, `3072:4096`, `3840:2560`, `2560:3840`, `3840:3072`,
2174
+ * `3072:3840`, `4096:2048`, `2048:4096` are 4K and billed at the 4K price. Not
2175
+ * available with `maskUri` or `preciseEdit`, which keep the size of the first
2176
+ * reference image.
2177
+ */
2178
+ ratio?:
2179
+ | 'auto'
2180
+ | '2048:2048'
2181
+ | '2560:1440'
2182
+ | '1440:2560'
2183
+ | '2304:1728'
2184
+ | '1728:2304'
2185
+ | '2496:1664'
2186
+ | '1664:2496'
2187
+ | '2240:1792'
2188
+ | '1792:2240'
2189
+ | '2880:1440'
2190
+ | '1440:2880'
2191
+ | '4096:4096'
2192
+ | '4096:2304'
2193
+ | '2304:4096'
2194
+ | '4096:3072'
2195
+ | '3072:4096'
2196
+ | '3840:2560'
2197
+ | '2560:3840'
2198
+ | '3840:3072'
2199
+ | '3072:3840'
2200
+ | '4096:2048'
2201
+ | '2048:4096';
2202
+
2203
+ /**
2204
+ * Up to 5 images. The first image is the one being edited and the rest are
2205
+ * references.
2206
+ */
2207
+ referenceImages?: Array<Ideogram4_6.ReferenceImage>;
2208
+
2209
+ /**
2210
+ * A fixed seed reproduces the same result for the same request. Omit it for a
2211
+ * random seed.
2212
+ */
2213
+ seed?: number;
2214
+ }
2215
+
2216
+ export namespace Ideogram4_6 {
2217
+ export interface ReferenceImage {
2218
+ /**
2219
+ * A HTTPS URL, Runway upload URI, or base64 data URI (e.g.
2220
+ * `data:image/png;base64,...`, up to 5MB) containing an encoded image. See
2221
+ * [our docs](/assets/inputs#images) on image inputs for more information.
2222
+ */
2223
+ uri: string;
2224
+ }
2225
+ }
2098
2226
  }
2099
2227
 
2100
2228
  export declare namespace TextToImage {