@scenario-labs/sdk 2.7.0 → 3.0.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 (214) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/client.d.mts +10 -10
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +10 -10
  5. package/client.d.ts.map +1 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs.map +1 -1
  8. package/lib/job.d.mts +2 -2
  9. package/lib/job.d.mts.map +1 -1
  10. package/lib/job.d.ts +2 -2
  11. package/lib/job.d.ts.map +1 -1
  12. package/lib/job.js +3 -3
  13. package/lib/job.js.map +1 -1
  14. package/lib/job.mjs +3 -3
  15. package/lib/job.mjs.map +1 -1
  16. package/lib/upload.d.mts +2 -2
  17. package/lib/upload.d.mts.map +1 -1
  18. package/lib/upload.d.ts +2 -2
  19. package/lib/upload.d.ts.map +1 -1
  20. package/lib/upload.js +4 -4
  21. package/lib/upload.js.map +1 -1
  22. package/lib/upload.mjs +4 -4
  23. package/lib/upload.mjs.map +1 -1
  24. package/lib/workflow.d.mts +2 -2
  25. package/lib/workflow.d.mts.map +1 -1
  26. package/lib/workflow.d.ts +2 -2
  27. package/lib/workflow.d.ts.map +1 -1
  28. package/lib/workflow.js +2 -2
  29. package/lib/workflow.js.map +1 -1
  30. package/lib/workflow.mjs +2 -2
  31. package/lib/workflow.mjs.map +1 -1
  32. package/package.json +1 -1
  33. package/resources/assets/assets.d.mts +1091 -8
  34. package/resources/assets/assets.d.mts.map +1 -1
  35. package/resources/assets/assets.d.ts +1091 -8
  36. package/resources/assets/assets.d.ts.map +1 -1
  37. package/resources/assets/assets.js +34 -16
  38. package/resources/assets/assets.js.map +1 -1
  39. package/resources/assets/assets.mjs +34 -16
  40. package/resources/assets/assets.mjs.map +1 -1
  41. package/resources/assets/download.d.mts +28 -5
  42. package/resources/assets/download.d.mts.map +1 -1
  43. package/resources/assets/download.d.ts +28 -5
  44. package/resources/assets/download.d.ts.map +1 -1
  45. package/resources/assets/download.js +8 -6
  46. package/resources/assets/download.js.map +1 -1
  47. package/resources/assets/download.mjs +8 -6
  48. package/resources/assets/download.mjs.map +1 -1
  49. package/resources/assets/index.d.mts +1 -1
  50. package/resources/assets/index.d.mts.map +1 -1
  51. package/resources/assets/index.d.ts +1 -1
  52. package/resources/assets/index.d.ts.map +1 -1
  53. package/resources/assets/index.js.map +1 -1
  54. package/resources/assets/index.mjs.map +1 -1
  55. package/resources/collections/assets.d.mts +15 -4
  56. package/resources/collections/assets.d.mts.map +1 -1
  57. package/resources/collections/assets.d.ts +15 -4
  58. package/resources/collections/assets.d.ts.map +1 -1
  59. package/resources/collections/assets.js +14 -4
  60. package/resources/collections/assets.js.map +1 -1
  61. package/resources/collections/assets.mjs +14 -4
  62. package/resources/collections/assets.mjs.map +1 -1
  63. package/resources/collections/collections.d.mts +38 -9
  64. package/resources/collections/collections.d.mts.map +1 -1
  65. package/resources/collections/collections.d.ts +38 -9
  66. package/resources/collections/collections.d.ts.map +1 -1
  67. package/resources/collections/collections.js +11 -8
  68. package/resources/collections/collections.js.map +1 -1
  69. package/resources/collections/collections.mjs +11 -8
  70. package/resources/collections/collections.mjs.map +1 -1
  71. package/resources/collections/index.d.mts +1 -1
  72. package/resources/collections/index.d.mts.map +1 -1
  73. package/resources/collections/index.d.ts +1 -1
  74. package/resources/collections/index.d.ts.map +1 -1
  75. package/resources/collections/index.js.map +1 -1
  76. package/resources/collections/index.mjs.map +1 -1
  77. package/resources/collections/models.d.mts +15 -4
  78. package/resources/collections/models.d.mts.map +1 -1
  79. package/resources/collections/models.d.ts +15 -4
  80. package/resources/collections/models.d.ts.map +1 -1
  81. package/resources/collections/models.js +14 -4
  82. package/resources/collections/models.js.map +1 -1
  83. package/resources/collections/models.mjs +14 -4
  84. package/resources/collections/models.mjs.map +1 -1
  85. package/resources/generate.d.mts +941 -0
  86. package/resources/generate.d.mts.map +1 -1
  87. package/resources/generate.d.ts +941 -0
  88. package/resources/generate.d.ts.map +1 -1
  89. package/resources/generate.js +28 -16
  90. package/resources/generate.js.map +1 -1
  91. package/resources/generate.mjs +28 -16
  92. package/resources/generate.mjs.map +1 -1
  93. package/resources/index.d.mts +5 -5
  94. package/resources/index.d.mts.map +1 -1
  95. package/resources/index.d.ts +5 -5
  96. package/resources/index.d.ts.map +1 -1
  97. package/resources/index.js.map +1 -1
  98. package/resources/index.mjs.map +1 -1
  99. package/resources/jobs.d.mts +146 -2
  100. package/resources/jobs.d.mts.map +1 -1
  101. package/resources/jobs.d.ts +146 -2
  102. package/resources/jobs.d.ts.map +1 -1
  103. package/resources/jobs.js +8 -4
  104. package/resources/jobs.js.map +1 -1
  105. package/resources/jobs.mjs +8 -4
  106. package/resources/jobs.mjs.map +1 -1
  107. package/resources/models/description.d.mts +10 -0
  108. package/resources/models/description.d.mts.map +1 -1
  109. package/resources/models/description.d.ts +10 -0
  110. package/resources/models/description.d.ts.map +1 -1
  111. package/resources/models/description.js +2 -2
  112. package/resources/models/description.js.map +1 -1
  113. package/resources/models/description.mjs +2 -2
  114. package/resources/models/description.mjs.map +1 -1
  115. package/resources/models/examples.d.mts +344 -0
  116. package/resources/models/examples.d.mts.map +1 -1
  117. package/resources/models/examples.d.ts +344 -0
  118. package/resources/models/examples.d.ts.map +1 -1
  119. package/resources/models/examples.js +2 -2
  120. package/resources/models/examples.js.map +1 -1
  121. package/resources/models/examples.mjs +2 -2
  122. package/resources/models/examples.mjs.map +1 -1
  123. package/resources/models/index.d.mts +1 -1
  124. package/resources/models/index.d.mts.map +1 -1
  125. package/resources/models/index.d.ts +1 -1
  126. package/resources/models/index.d.ts.map +1 -1
  127. package/resources/models/index.js.map +1 -1
  128. package/resources/models/index.mjs.map +1 -1
  129. package/resources/models/models.d.mts +71 -13
  130. package/resources/models/models.d.mts.map +1 -1
  131. package/resources/models/models.d.ts +71 -13
  132. package/resources/models/models.d.ts.map +1 -1
  133. package/resources/models/models.js +30 -18
  134. package/resources/models/models.js.map +1 -1
  135. package/resources/models/models.mjs +30 -18
  136. package/resources/models/models.mjs.map +1 -1
  137. package/resources/models/train.d.mts +93 -0
  138. package/resources/models/train.d.mts.map +1 -1
  139. package/resources/models/train.d.ts +93 -0
  140. package/resources/models/train.d.ts.map +1 -1
  141. package/resources/models/train.js +4 -4
  142. package/resources/models/train.js.map +1 -1
  143. package/resources/models/train.mjs +4 -4
  144. package/resources/models/train.mjs.map +1 -1
  145. package/resources/models/training-images.d.mts +22 -2
  146. package/resources/models/training-images.d.mts.map +1 -1
  147. package/resources/models/training-images.d.ts +22 -2
  148. package/resources/models/training-images.d.ts.map +1 -1
  149. package/resources/models/training-images.js +15 -8
  150. package/resources/models/training-images.js.map +1 -1
  151. package/resources/models/training-images.mjs +15 -8
  152. package/resources/models/training-images.mjs.map +1 -1
  153. package/resources/search.d.mts +10 -0
  154. package/resources/search.d.mts.map +1 -1
  155. package/resources/search.d.ts +10 -0
  156. package/resources/search.d.ts.map +1 -1
  157. package/resources/search.js +4 -4
  158. package/resources/search.js.map +1 -1
  159. package/resources/search.mjs +4 -4
  160. package/resources/search.mjs.map +1 -1
  161. package/resources/tags.d.mts +5 -0
  162. package/resources/tags.d.mts.map +1 -1
  163. package/resources/tags.d.ts +5 -0
  164. package/resources/tags.d.ts.map +1 -1
  165. package/resources/uploads.d.mts +35 -20
  166. package/resources/uploads.d.mts.map +1 -1
  167. package/resources/uploads.d.ts +35 -20
  168. package/resources/uploads.d.ts.map +1 -1
  169. package/resources/uploads.js +8 -6
  170. package/resources/uploads.js.map +1 -1
  171. package/resources/uploads.mjs +8 -6
  172. package/resources/uploads.mjs.map +1 -1
  173. package/resources/usages.d.mts +53 -10
  174. package/resources/usages.d.mts.map +1 -1
  175. package/resources/usages.d.ts +53 -10
  176. package/resources/usages.d.ts.map +1 -1
  177. package/resources/workflows.d.mts +446 -266
  178. package/resources/workflows.d.mts.map +1 -1
  179. package/resources/workflows.d.ts +446 -266
  180. package/resources/workflows.d.ts.map +1 -1
  181. package/resources/workflows.js +20 -12
  182. package/resources/workflows.js.map +1 -1
  183. package/resources/workflows.mjs +20 -12
  184. package/resources/workflows.mjs.map +1 -1
  185. package/src/client.ts +14 -0
  186. package/src/lib/job.ts +8 -3
  187. package/src/lib/upload.ts +5 -3
  188. package/src/lib/workflow.ts +3 -1
  189. package/src/resources/assets/assets.ts +1310 -32
  190. package/src/resources/assets/download.ts +40 -7
  191. package/src/resources/assets/index.ts +1 -0
  192. package/src/resources/collections/assets.ts +29 -6
  193. package/src/resources/collections/collections.ts +59 -12
  194. package/src/resources/collections/index.ts +2 -0
  195. package/src/resources/collections/models.ts +29 -6
  196. package/src/resources/generate.ts +1247 -30
  197. package/src/resources/index.ts +7 -0
  198. package/src/resources/jobs.ts +169 -4
  199. package/src/resources/models/description.ts +14 -2
  200. package/src/resources/models/examples.ts +394 -2
  201. package/src/resources/models/index.ts +1 -0
  202. package/src/resources/models/models.ts +112 -26
  203. package/src/resources/models/train.ts +126 -4
  204. package/src/resources/models/training-images.ts +41 -10
  205. package/src/resources/search.ts +16 -4
  206. package/src/resources/tags.ts +6 -0
  207. package/src/resources/uploads.ts +47 -22
  208. package/src/resources/usages.ts +63 -10
  209. package/src/resources/workflows.ts +783 -563
  210. package/src/version.ts +1 -1
  211. package/version.d.mts +1 -1
  212. package/version.d.ts +1 -1
  213. package/version.js +1 -1
  214. package/version.mjs +1 -1
@@ -10,8 +10,8 @@ export class Generate extends APIResource {
10
10
  * Caption image(s)
11
11
  */
12
12
  caption(params: GenerateCaptionParams, options?: RequestOptions): APIPromise<GenerateCaptionResponse> {
13
- const { dryRun, ...body } = params;
14
- return this._client.post('/generate/caption', { query: { dryRun }, body, ...options });
13
+ const { dryRun, projectId, ...body } = params;
14
+ return this._client.post('/generate/caption', { query: { dryRun, projectId }, body, ...options });
15
15
  }
16
16
 
17
17
  /**
@@ -21,8 +21,8 @@ export class Generate extends APIResource {
21
21
  params: GenerateDescribeStyleParams,
22
22
  options?: RequestOptions,
23
23
  ): APIPromise<GenerateDescribeStyleResponse> {
24
- const { dryRun, ...body } = params;
25
- return this._client.post('/generate/describe-style', { query: { dryRun }, body, ...options });
24
+ const { dryRun, projectId, ...body } = params;
25
+ return this._client.post('/generate/describe-style', { query: { dryRun, projectId }, body, ...options });
26
26
  }
27
27
 
28
28
  /**
@@ -30,32 +30,44 @@ export class Generate extends APIResource {
30
30
  * images into mode maps.
31
31
  */
32
32
  detect(params: GenerateDetectParams, options?: RequestOptions): APIPromise<GenerateDetectResponse> {
33
- const { dryRun, originalAssets, ...body } = params;
34
- return this._client.post('/generate/detect', { query: { dryRun, originalAssets }, body, ...options });
33
+ const { dryRun, originalAssets, projectId, ...body } = params;
34
+ return this._client.post('/generate/detect', {
35
+ query: { dryRun, originalAssets, projectId },
36
+ body,
37
+ ...options,
38
+ });
35
39
  }
36
40
 
37
41
  /**
38
42
  * Get embeddings from text
39
43
  */
40
44
  embed(params: GenerateEmbedParams, options?: RequestOptions): APIPromise<GenerateEmbedResponse> {
41
- const { dryRun, originalAssets, ...body } = params;
42
- return this._client.post('/generate/embed', { query: { dryRun, originalAssets }, body, ...options });
45
+ const { dryRun, originalAssets, projectId, ...body } = params;
46
+ return this._client.post('/generate/embed', {
47
+ query: { dryRun, originalAssets, projectId },
48
+ body,
49
+ ...options,
50
+ });
43
51
  }
44
52
 
45
53
  /**
46
54
  * Patch an asset with an image.
47
55
  */
48
56
  patch(params: GeneratePatchParams, options?: RequestOptions): APIPromise<GeneratePatchResponse> {
49
- const { dryRun, originalAssets, ...body } = params;
50
- return this._client.post('/generate/patch', { query: { dryRun, originalAssets }, body, ...options });
57
+ const { dryRun, originalAssets, projectId, ...body } = params;
58
+ return this._client.post('/generate/patch', {
59
+ query: { dryRun, originalAssets, projectId },
60
+ body,
61
+ ...options,
62
+ });
51
63
  }
52
64
 
53
65
  /**
54
66
  * Generate, complete or invent new prompts.
55
67
  */
56
68
  prompt(params: GeneratePromptParams, options?: RequestOptions): APIPromise<GeneratePromptResponse> {
57
- const { dryRun, ...body } = params;
58
- return this._client.post('/generate/prompt', { query: { dryRun }, body, ...options });
69
+ const { dryRun, projectId, ...body } = params;
70
+ return this._client.post('/generate/prompt', { query: { dryRun, projectId }, body, ...options });
59
71
  }
60
72
 
61
73
  /**
@@ -68,9 +80,9 @@ export class Generate extends APIResource {
68
80
  params: GenerateRunModelParams,
69
81
  options?: RequestOptions,
70
82
  ): APIPromise<GenerateRunModelResponse> {
71
- const { body, dryRun, ipDetection } = params;
83
+ const { body, dryRun, ipDetection, projectId } = params;
72
84
  return this._client.post(path`/generate/custom/${modelID}`, {
73
- query: { dryRun, ipDetection },
85
+ query: { dryRun, ipDetection, projectId },
74
86
  body: body,
75
87
  ...options,
76
88
  });
@@ -83,8 +95,8 @@ export class Generate extends APIResource {
83
95
  params: GenerateTranslateParams,
84
96
  options?: RequestOptions,
85
97
  ): APIPromise<GenerateTranslateResponse> {
86
- const { dryRun, ...body } = params;
87
- return this._client.post('/generate/translate', { query: { dryRun }, body, ...options });
98
+ const { dryRun, projectId, ...body } = params;
99
+ return this._client.post('/generate/translate', { query: { dryRun, projectId }, body, ...options });
88
100
  }
89
101
  }
90
102
 
@@ -96,6 +108,14 @@ export interface GenerateCaptionResponse {
96
108
 
97
109
  job: GenerateCaptionResponse.Job;
98
110
 
111
+ /**
112
+ * Compute Units cost per billing action for this request, after discount. Values
113
+ * sum to `creativeUnitsCost`. Only Compute-Units-consuming actions with a non-zero
114
+ * charge appear. Lets clients split the total (e.g. generation vs
115
+ * `slop-detection`) — including on dryRun estimates.
116
+ */
117
+ costDetails?: GenerateCaptionResponse.CostDetails;
118
+
99
119
  /**
100
120
  * The Compute Units cost for the request billed
101
121
  */
@@ -1068,6 +1088,27 @@ export namespace GenerateCaptionResponse {
1068
1088
 
1069
1089
  cuDiscount: number;
1070
1090
 
1091
+ /**
1092
+ * Compute Units charged for the ADD-ONS of this job, per action — the fees paid on
1093
+ * top of the generation itself, such as `slop-detection`.
1094
+ *
1095
+ * `cuCost` above is the main action alone, so the job's total is `cuCost` plus the
1096
+ * values here.
1097
+ *
1098
+ * Two caveats when displaying it:
1099
+ *
1100
+ * - These are a remaining refundable balance, not a receipt: a job that failed or
1101
+ * was cancelled has had its add-ons refunded, so they read 0 while `cuCost`
1102
+ * still shows the main action's original charge.
1103
+ * - `ip-detection` is part of the shape but is never populated today: that fee is
1104
+ * charged outside the job and reported once, as
1105
+ * `ipDetection.creativeUnitsCharged`, in the response of the request that ran
1106
+ * it.
1107
+ *
1108
+ * Absent when the job paid for no add-on.
1109
+ */
1110
+ cuCostDetails?: Billing.CuCostDetails;
1111
+
1071
1112
  /**
1072
1113
  * When true, the credits charged for this job are not automatically refunded if
1073
1114
  * the generation fails, because the model used does not support refund-on-failure.
@@ -1075,6 +1116,87 @@ export namespace GenerateCaptionResponse {
1075
1116
  */
1076
1117
  disableRefund?: boolean;
1077
1118
  }
1119
+
1120
+ export namespace Billing {
1121
+ /**
1122
+ * Compute Units charged for the ADD-ONS of this job, per action — the fees paid on
1123
+ * top of the generation itself, such as `slop-detection`.
1124
+ *
1125
+ * `cuCost` above is the main action alone, so the job's total is `cuCost` plus the
1126
+ * values here.
1127
+ *
1128
+ * Two caveats when displaying it:
1129
+ *
1130
+ * - These are a remaining refundable balance, not a receipt: a job that failed or
1131
+ * was cancelled has had its add-ons refunded, so they read 0 while `cuCost`
1132
+ * still shows the main action's original charge.
1133
+ * - `ip-detection` is part of the shape but is never populated today: that fee is
1134
+ * charged outside the job and reported once, as
1135
+ * `ipDetection.creativeUnitsCharged`, in the response of the request that ran
1136
+ * it.
1137
+ *
1138
+ * Absent when the job paid for no add-on.
1139
+ */
1140
+ export interface CuCostDetails {
1141
+ 'ip-detection'?: number;
1142
+
1143
+ 'slop-detection'?: number;
1144
+ }
1145
+ }
1146
+ }
1147
+
1148
+ /**
1149
+ * Compute Units cost per billing action for this request, after discount. Values
1150
+ * sum to `creativeUnitsCost`. Only Compute-Units-consuming actions with a non-zero
1151
+ * charge appear. Lets clients split the total (e.g. generation vs
1152
+ * `slop-detection`) — including on dryRun estimates.
1153
+ */
1154
+ export interface CostDetails {
1155
+ 'assistant-message'?: number;
1156
+
1157
+ caption?: number;
1158
+
1159
+ 'custom-generation'?: number;
1160
+
1161
+ 'describe-style'?: number;
1162
+
1163
+ detection?: number;
1164
+
1165
+ embed?: number;
1166
+
1167
+ 'image-prompt-editing'?: number;
1168
+
1169
+ 'inference-images'?: number;
1170
+
1171
+ 'ip-detection'?: number;
1172
+
1173
+ pixelate?: number;
1174
+
1175
+ prompt?: number;
1176
+
1177
+ 'remove-background'?: number;
1178
+
1179
+ repaint?: number;
1180
+
1181
+ restyle?: number;
1182
+
1183
+ segmentation?: number;
1184
+
1185
+ 'skybox-base-360'?: number;
1186
+
1187
+ 'skybox-upscale-360'?: number;
1188
+
1189
+ 'slop-detection'?: number;
1190
+
1191
+ texture?: number;
1192
+
1193
+ 'train-model'?: number;
1194
+
1195
+ translate?: number;
1196
+
1197
+ upscale?: number;
1198
+
1199
+ vectorization?: number;
1078
1200
  }
1079
1201
 
1080
1202
  /**
@@ -1169,6 +1291,14 @@ export interface GenerateDescribeStyleResponse {
1169
1291
  */
1170
1292
  synthesis: string;
1171
1293
 
1294
+ /**
1295
+ * Compute Units cost per billing action for this request, after discount. Values
1296
+ * sum to `creativeUnitsCost`. Only Compute-Units-consuming actions with a non-zero
1297
+ * charge appear. Lets clients split the total (e.g. generation vs
1298
+ * `slop-detection`) — including on dryRun estimates.
1299
+ */
1300
+ costDetails?: GenerateDescribeStyleResponse.CostDetails;
1301
+
1172
1302
  /**
1173
1303
  * The Compute Units cost for the request billed
1174
1304
  */
@@ -2133,6 +2263,27 @@ export namespace GenerateDescribeStyleResponse {
2133
2263
 
2134
2264
  cuDiscount: number;
2135
2265
 
2266
+ /**
2267
+ * Compute Units charged for the ADD-ONS of this job, per action — the fees paid on
2268
+ * top of the generation itself, such as `slop-detection`.
2269
+ *
2270
+ * `cuCost` above is the main action alone, so the job's total is `cuCost` plus the
2271
+ * values here.
2272
+ *
2273
+ * Two caveats when displaying it:
2274
+ *
2275
+ * - These are a remaining refundable balance, not a receipt: a job that failed or
2276
+ * was cancelled has had its add-ons refunded, so they read 0 while `cuCost`
2277
+ * still shows the main action's original charge.
2278
+ * - `ip-detection` is part of the shape but is never populated today: that fee is
2279
+ * charged outside the job and reported once, as
2280
+ * `ipDetection.creativeUnitsCharged`, in the response of the request that ran
2281
+ * it.
2282
+ *
2283
+ * Absent when the job paid for no add-on.
2284
+ */
2285
+ cuCostDetails?: Billing.CuCostDetails;
2286
+
2136
2287
  /**
2137
2288
  * When true, the credits charged for this job are not automatically refunded if
2138
2289
  * the generation fails, because the model used does not support refund-on-failure.
@@ -2140,6 +2291,87 @@ export namespace GenerateDescribeStyleResponse {
2140
2291
  */
2141
2292
  disableRefund?: boolean;
2142
2293
  }
2294
+
2295
+ export namespace Billing {
2296
+ /**
2297
+ * Compute Units charged for the ADD-ONS of this job, per action — the fees paid on
2298
+ * top of the generation itself, such as `slop-detection`.
2299
+ *
2300
+ * `cuCost` above is the main action alone, so the job's total is `cuCost` plus the
2301
+ * values here.
2302
+ *
2303
+ * Two caveats when displaying it:
2304
+ *
2305
+ * - These are a remaining refundable balance, not a receipt: a job that failed or
2306
+ * was cancelled has had its add-ons refunded, so they read 0 while `cuCost`
2307
+ * still shows the main action's original charge.
2308
+ * - `ip-detection` is part of the shape but is never populated today: that fee is
2309
+ * charged outside the job and reported once, as
2310
+ * `ipDetection.creativeUnitsCharged`, in the response of the request that ran
2311
+ * it.
2312
+ *
2313
+ * Absent when the job paid for no add-on.
2314
+ */
2315
+ export interface CuCostDetails {
2316
+ 'ip-detection'?: number;
2317
+
2318
+ 'slop-detection'?: number;
2319
+ }
2320
+ }
2321
+ }
2322
+
2323
+ /**
2324
+ * Compute Units cost per billing action for this request, after discount. Values
2325
+ * sum to `creativeUnitsCost`. Only Compute-Units-consuming actions with a non-zero
2326
+ * charge appear. Lets clients split the total (e.g. generation vs
2327
+ * `slop-detection`) — including on dryRun estimates.
2328
+ */
2329
+ export interface CostDetails {
2330
+ 'assistant-message'?: number;
2331
+
2332
+ caption?: number;
2333
+
2334
+ 'custom-generation'?: number;
2335
+
2336
+ 'describe-style'?: number;
2337
+
2338
+ detection?: number;
2339
+
2340
+ embed?: number;
2341
+
2342
+ 'image-prompt-editing'?: number;
2343
+
2344
+ 'inference-images'?: number;
2345
+
2346
+ 'ip-detection'?: number;
2347
+
2348
+ pixelate?: number;
2349
+
2350
+ prompt?: number;
2351
+
2352
+ 'remove-background'?: number;
2353
+
2354
+ repaint?: number;
2355
+
2356
+ restyle?: number;
2357
+
2358
+ segmentation?: number;
2359
+
2360
+ 'skybox-base-360'?: number;
2361
+
2362
+ 'skybox-upscale-360'?: number;
2363
+
2364
+ 'slop-detection'?: number;
2365
+
2366
+ texture?: number;
2367
+
2368
+ 'train-model'?: number;
2369
+
2370
+ translate?: number;
2371
+
2372
+ upscale?: number;
2373
+
2374
+ vectorization?: number;
2143
2375
  }
2144
2376
 
2145
2377
  /**
@@ -2226,6 +2458,14 @@ export interface GenerateDetectResponse {
2226
2458
 
2227
2459
  asset?: GenerateDetectResponse.Asset;
2228
2460
 
2461
+ /**
2462
+ * Compute Units cost per billing action for this request, after discount. Values
2463
+ * sum to `creativeUnitsCost`. Only Compute-Units-consuming actions with a non-zero
2464
+ * charge appear. Lets clients split the total (e.g. generation vs
2465
+ * `slop-detection`) — including on dryRun estimates.
2466
+ */
2467
+ costDetails?: GenerateDetectResponse.CostDetails;
2468
+
2229
2469
  /**
2230
2470
  * The Compute Units cost for the request billed
2231
2471
  */
@@ -3190,6 +3430,27 @@ export namespace GenerateDetectResponse {
3190
3430
 
3191
3431
  cuDiscount: number;
3192
3432
 
3433
+ /**
3434
+ * Compute Units charged for the ADD-ONS of this job, per action — the fees paid on
3435
+ * top of the generation itself, such as `slop-detection`.
3436
+ *
3437
+ * `cuCost` above is the main action alone, so the job's total is `cuCost` plus the
3438
+ * values here.
3439
+ *
3440
+ * Two caveats when displaying it:
3441
+ *
3442
+ * - These are a remaining refundable balance, not a receipt: a job that failed or
3443
+ * was cancelled has had its add-ons refunded, so they read 0 while `cuCost`
3444
+ * still shows the main action's original charge.
3445
+ * - `ip-detection` is part of the shape but is never populated today: that fee is
3446
+ * charged outside the job and reported once, as
3447
+ * `ipDetection.creativeUnitsCharged`, in the response of the request that ran
3448
+ * it.
3449
+ *
3450
+ * Absent when the job paid for no add-on.
3451
+ */
3452
+ cuCostDetails?: Billing.CuCostDetails;
3453
+
3193
3454
  /**
3194
3455
  * When true, the credits charged for this job are not automatically refunded if
3195
3456
  * the generation fails, because the model used does not support refund-on-failure.
@@ -3197,6 +3458,33 @@ export namespace GenerateDetectResponse {
3197
3458
  */
3198
3459
  disableRefund?: boolean;
3199
3460
  }
3461
+
3462
+ export namespace Billing {
3463
+ /**
3464
+ * Compute Units charged for the ADD-ONS of this job, per action — the fees paid on
3465
+ * top of the generation itself, such as `slop-detection`.
3466
+ *
3467
+ * `cuCost` above is the main action alone, so the job's total is `cuCost` plus the
3468
+ * values here.
3469
+ *
3470
+ * Two caveats when displaying it:
3471
+ *
3472
+ * - These are a remaining refundable balance, not a receipt: a job that failed or
3473
+ * was cancelled has had its add-ons refunded, so they read 0 while `cuCost`
3474
+ * still shows the main action's original charge.
3475
+ * - `ip-detection` is part of the shape but is never populated today: that fee is
3476
+ * charged outside the job and reported once, as
3477
+ * `ipDetection.creativeUnitsCharged`, in the response of the request that ran
3478
+ * it.
3479
+ *
3480
+ * Absent when the job paid for no add-on.
3481
+ */
3482
+ export interface CuCostDetails {
3483
+ 'ip-detection'?: number;
3484
+
3485
+ 'slop-detection'?: number;
3486
+ }
3487
+ }
3200
3488
  }
3201
3489
 
3202
3490
  export interface Asset {
@@ -3442,6 +3730,14 @@ export namespace GenerateDetectResponse {
3442
3730
  */
3443
3731
  preview?: Asset.Preview;
3444
3732
 
3733
+ /**
3734
+ * SlopGuard detection result, computed asynchronously after generation.
3735
+ *
3736
+ * `details` (the per-dimension reasons and suggestions) is returned only when the
3737
+ * asset is read with `withSlopGuardDetails=true`.
3738
+ */
3739
+ slopGuard?: Asset.SlopGuard;
3740
+
3445
3741
  /**
3446
3742
  * The asset's thumbnail.
3447
3743
  *
@@ -4358,6 +4654,140 @@ export namespace GenerateDetectResponse {
4358
4654
  url: string;
4359
4655
  }
4360
4656
 
4657
+ /**
4658
+ * SlopGuard detection result, computed asynchronously after generation.
4659
+ *
4660
+ * `details` (the per-dimension reasons and suggestions) is returned only when the
4661
+ * asset is read with `withSlopGuardDetails=true`.
4662
+ */
4663
+ export interface SlopGuard {
4664
+ /**
4665
+ * ISO-8601 timestamp of when scoring ran
4666
+ */
4667
+ computedAt: string;
4668
+
4669
+ /**
4670
+ * Whether scoring succeeded or errored
4671
+ */
4672
+ status: 'error' | 'scored';
4673
+
4674
+ /**
4675
+ * Rubric/model version that produced this result
4676
+ */
4677
+ version: string;
4678
+
4679
+ /**
4680
+ * Generic AI-quality sub-score
4681
+ */
4682
+ aiQualityScore?: number;
4683
+
4684
+ /**
4685
+ * Ids of briefs that contributed
4686
+ */
4687
+ appliedBriefIds?: Array<string>;
4688
+
4689
+ /**
4690
+ * Brief-compliance sub-score (omitted when no brief applied)
4691
+ */
4692
+ briefComplianceScore?: number;
4693
+
4694
+ /**
4695
+ * Per-dimension reasons and suggestions, as produced by the detector.
4696
+ *
4697
+ * Returned only when the asset is read with `withSlopGuardDetails=true` by the
4698
+ * project that owns it — the brief-compliance text paraphrases that project's
4699
+ * brief, so a cross-project read of a public asset gets the summary alone. Also
4700
+ * omitted when the archived verdict is unavailable (asset scored by an older
4701
+ * version, or an unreadable archive).
4702
+ */
4703
+ details?: SlopGuard.Details;
4704
+
4705
+ /**
4706
+ * Error message when status is 'error' (truncated)
4707
+ */
4708
+ error?: string;
4709
+
4710
+ /**
4711
+ * 0–100 composite score (present when status is 'scored')
4712
+ */
4713
+ overallScore?: number;
4714
+
4715
+ /**
4716
+ * Sensitivity used for the verdict
4717
+ */
4718
+ sensitivity?: 'high' | 'low' | 'medium';
4719
+
4720
+ /**
4721
+ * pass / warn / fail (present when status is 'scored')
4722
+ */
4723
+ verdict?: 'fail' | 'pass' | 'warn';
4724
+ }
4725
+
4726
+ export namespace SlopGuard {
4727
+ /**
4728
+ * Per-dimension reasons and suggestions, as produced by the detector.
4729
+ *
4730
+ * Returned only when the asset is read with `withSlopGuardDetails=true` by the
4731
+ * project that owns it — the brief-compliance text paraphrases that project's
4732
+ * brief, so a cross-project read of a public asset gets the summary alone. Also
4733
+ * omitted when the archived verdict is unavailable (asset scored by an older
4734
+ * version, or an unreadable archive).
4735
+ */
4736
+ export interface Details {
4737
+ /**
4738
+ * Always-on generic AI-quality dimension
4739
+ */
4740
+ aiQuality: Details.AIQuality;
4741
+
4742
+ /**
4743
+ * Brief-compliance dimension; omitted when no brief applied
4744
+ */
4745
+ briefCompliance?: Details.BriefCompliance;
4746
+ }
4747
+
4748
+ export namespace Details {
4749
+ /**
4750
+ * Always-on generic AI-quality dimension
4751
+ */
4752
+ export interface AIQuality {
4753
+ /**
4754
+ * Why the image scored as it did
4755
+ */
4756
+ reasons: Array<string>;
4757
+
4758
+ /**
4759
+ * 0–100; higher is better (more compliant / less AI-looking)
4760
+ */
4761
+ score: number;
4762
+
4763
+ /**
4764
+ * Actionable suggestions to improve the score
4765
+ */
4766
+ suggestions: Array<string>;
4767
+ }
4768
+
4769
+ /**
4770
+ * Brief-compliance dimension; omitted when no brief applied
4771
+ */
4772
+ export interface BriefCompliance {
4773
+ /**
4774
+ * Why the image scored as it did
4775
+ */
4776
+ reasons: Array<string>;
4777
+
4778
+ /**
4779
+ * 0–100; higher is better (more compliant / less AI-looking)
4780
+ */
4781
+ score: number;
4782
+
4783
+ /**
4784
+ * Actionable suggestions to improve the score
4785
+ */
4786
+ suggestions: Array<string>;
4787
+ }
4788
+ }
4789
+ }
4790
+
4361
4791
  /**
4362
4792
  * The asset's thumbnail.
4363
4793
  *
@@ -4370,6 +4800,60 @@ export namespace GenerateDetectResponse {
4370
4800
  }
4371
4801
  }
4372
4802
 
4803
+ /**
4804
+ * Compute Units cost per billing action for this request, after discount. Values
4805
+ * sum to `creativeUnitsCost`. Only Compute-Units-consuming actions with a non-zero
4806
+ * charge appear. Lets clients split the total (e.g. generation vs
4807
+ * `slop-detection`) — including on dryRun estimates.
4808
+ */
4809
+ export interface CostDetails {
4810
+ 'assistant-message'?: number;
4811
+
4812
+ caption?: number;
4813
+
4814
+ 'custom-generation'?: number;
4815
+
4816
+ 'describe-style'?: number;
4817
+
4818
+ detection?: number;
4819
+
4820
+ embed?: number;
4821
+
4822
+ 'image-prompt-editing'?: number;
4823
+
4824
+ 'inference-images'?: number;
4825
+
4826
+ 'ip-detection'?: number;
4827
+
4828
+ pixelate?: number;
4829
+
4830
+ prompt?: number;
4831
+
4832
+ 'remove-background'?: number;
4833
+
4834
+ repaint?: number;
4835
+
4836
+ restyle?: number;
4837
+
4838
+ segmentation?: number;
4839
+
4840
+ 'skybox-base-360'?: number;
4841
+
4842
+ 'skybox-upscale-360'?: number;
4843
+
4844
+ 'slop-detection'?: number;
4845
+
4846
+ texture?: number;
4847
+
4848
+ 'train-model'?: number;
4849
+
4850
+ translate?: number;
4851
+
4852
+ upscale?: number;
4853
+
4854
+ vectorization?: number;
4855
+ }
4856
+
4373
4857
  /**
4374
4858
  * IP detection findings, when detection ran for this request.
4375
4859
  */
@@ -4459,6 +4943,14 @@ export interface GenerateEmbedResponse {
4459
4943
 
4460
4944
  job: GenerateEmbedResponse.Job;
4461
4945
 
4946
+ /**
4947
+ * Compute Units cost per billing action for this request, after discount. Values
4948
+ * sum to `creativeUnitsCost`. Only Compute-Units-consuming actions with a non-zero
4949
+ * charge appear. Lets clients split the total (e.g. generation vs
4950
+ * `slop-detection`) — including on dryRun estimates.
4951
+ */
4952
+ costDetails?: GenerateEmbedResponse.CostDetails;
4953
+
4462
4954
  /**
4463
4955
  * The Compute Units cost for the request billed
4464
4956
  */
@@ -5423,6 +5915,27 @@ export namespace GenerateEmbedResponse {
5423
5915
 
5424
5916
  cuDiscount: number;
5425
5917
 
5918
+ /**
5919
+ * Compute Units charged for the ADD-ONS of this job, per action — the fees paid on
5920
+ * top of the generation itself, such as `slop-detection`.
5921
+ *
5922
+ * `cuCost` above is the main action alone, so the job's total is `cuCost` plus the
5923
+ * values here.
5924
+ *
5925
+ * Two caveats when displaying it:
5926
+ *
5927
+ * - These are a remaining refundable balance, not a receipt: a job that failed or
5928
+ * was cancelled has had its add-ons refunded, so they read 0 while `cuCost`
5929
+ * still shows the main action's original charge.
5930
+ * - `ip-detection` is part of the shape but is never populated today: that fee is
5931
+ * charged outside the job and reported once, as
5932
+ * `ipDetection.creativeUnitsCharged`, in the response of the request that ran
5933
+ * it.
5934
+ *
5935
+ * Absent when the job paid for no add-on.
5936
+ */
5937
+ cuCostDetails?: Billing.CuCostDetails;
5938
+
5426
5939
  /**
5427
5940
  * When true, the credits charged for this job are not automatically refunded if
5428
5941
  * the generation fails, because the model used does not support refund-on-failure.
@@ -5430,26 +5943,107 @@ export namespace GenerateEmbedResponse {
5430
5943
  */
5431
5944
  disableRefund?: boolean;
5432
5945
  }
5946
+
5947
+ export namespace Billing {
5948
+ /**
5949
+ * Compute Units charged for the ADD-ONS of this job, per action — the fees paid on
5950
+ * top of the generation itself, such as `slop-detection`.
5951
+ *
5952
+ * `cuCost` above is the main action alone, so the job's total is `cuCost` plus the
5953
+ * values here.
5954
+ *
5955
+ * Two caveats when displaying it:
5956
+ *
5957
+ * - These are a remaining refundable balance, not a receipt: a job that failed or
5958
+ * was cancelled has had its add-ons refunded, so they read 0 while `cuCost`
5959
+ * still shows the main action's original charge.
5960
+ * - `ip-detection` is part of the shape but is never populated today: that fee is
5961
+ * charged outside the job and reported once, as
5962
+ * `ipDetection.creativeUnitsCharged`, in the response of the request that ran
5963
+ * it.
5964
+ *
5965
+ * Absent when the job paid for no add-on.
5966
+ */
5967
+ export interface CuCostDetails {
5968
+ 'ip-detection'?: number;
5969
+
5970
+ 'slop-detection'?: number;
5971
+ }
5972
+ }
5433
5973
  }
5434
5974
 
5435
5975
  /**
5436
- * IP detection findings, when detection ran for this request.
5976
+ * Compute Units cost per billing action for this request, after discount. Values
5977
+ * sum to `creativeUnitsCost`. Only Compute-Units-consuming actions with a non-zero
5978
+ * charge appear. Lets clients split the total (e.g. generation vs
5979
+ * `slop-detection`) — including on dryRun estimates.
5437
5980
  */
5438
- export interface IPDetection {
5439
- /**
5440
- * Whether and how detection affected the request.
5441
- */
5442
- action: 'allowed' | 'blocked' | 'flagged';
5981
+ export interface CostDetails {
5982
+ 'assistant-message'?: number;
5443
5983
 
5444
- /**
5445
- * IP-detection CU fee, separate from creativeUnitsCost: a fixed base fee plus a
5446
- * per-image fee for each analyzed input image.
5447
- */
5448
- creativeUnitsCharged: number;
5984
+ caption?: number;
5449
5985
 
5450
- /**
5451
- * Number of enabled filters evaluated for this request.
5452
- */
5986
+ 'custom-generation'?: number;
5987
+
5988
+ 'describe-style'?: number;
5989
+
5990
+ detection?: number;
5991
+
5992
+ embed?: number;
5993
+
5994
+ 'image-prompt-editing'?: number;
5995
+
5996
+ 'inference-images'?: number;
5997
+
5998
+ 'ip-detection'?: number;
5999
+
6000
+ pixelate?: number;
6001
+
6002
+ prompt?: number;
6003
+
6004
+ 'remove-background'?: number;
6005
+
6006
+ repaint?: number;
6007
+
6008
+ restyle?: number;
6009
+
6010
+ segmentation?: number;
6011
+
6012
+ 'skybox-base-360'?: number;
6013
+
6014
+ 'skybox-upscale-360'?: number;
6015
+
6016
+ 'slop-detection'?: number;
6017
+
6018
+ texture?: number;
6019
+
6020
+ 'train-model'?: number;
6021
+
6022
+ translate?: number;
6023
+
6024
+ upscale?: number;
6025
+
6026
+ vectorization?: number;
6027
+ }
6028
+
6029
+ /**
6030
+ * IP detection findings, when detection ran for this request.
6031
+ */
6032
+ export interface IPDetection {
6033
+ /**
6034
+ * Whether and how detection affected the request.
6035
+ */
6036
+ action: 'allowed' | 'blocked' | 'flagged';
6037
+
6038
+ /**
6039
+ * IP-detection CU fee, separate from creativeUnitsCost: a fixed base fee plus a
6040
+ * per-image fee for each analyzed input image.
6041
+ */
6042
+ creativeUnitsCharged: number;
6043
+
6044
+ /**
6045
+ * Number of enabled filters evaluated for this request.
6046
+ */
5453
6047
  evaluatedFilters: number;
5454
6048
 
5455
6049
  /**
@@ -5516,6 +6110,14 @@ export interface GeneratePatchResponse {
5516
6110
 
5517
6111
  asset?: GeneratePatchResponse.Asset;
5518
6112
 
6113
+ /**
6114
+ * Compute Units cost per billing action for this request, after discount. Values
6115
+ * sum to `creativeUnitsCost`. Only Compute-Units-consuming actions with a non-zero
6116
+ * charge appear. Lets clients split the total (e.g. generation vs
6117
+ * `slop-detection`) — including on dryRun estimates.
6118
+ */
6119
+ costDetails?: GeneratePatchResponse.CostDetails;
6120
+
5519
6121
  /**
5520
6122
  * The Compute Units cost for the request billed
5521
6123
  */
@@ -6480,6 +7082,27 @@ export namespace GeneratePatchResponse {
6480
7082
 
6481
7083
  cuDiscount: number;
6482
7084
 
7085
+ /**
7086
+ * Compute Units charged for the ADD-ONS of this job, per action — the fees paid on
7087
+ * top of the generation itself, such as `slop-detection`.
7088
+ *
7089
+ * `cuCost` above is the main action alone, so the job's total is `cuCost` plus the
7090
+ * values here.
7091
+ *
7092
+ * Two caveats when displaying it:
7093
+ *
7094
+ * - These are a remaining refundable balance, not a receipt: a job that failed or
7095
+ * was cancelled has had its add-ons refunded, so they read 0 while `cuCost`
7096
+ * still shows the main action's original charge.
7097
+ * - `ip-detection` is part of the shape but is never populated today: that fee is
7098
+ * charged outside the job and reported once, as
7099
+ * `ipDetection.creativeUnitsCharged`, in the response of the request that ran
7100
+ * it.
7101
+ *
7102
+ * Absent when the job paid for no add-on.
7103
+ */
7104
+ cuCostDetails?: Billing.CuCostDetails;
7105
+
6483
7106
  /**
6484
7107
  * When true, the credits charged for this job are not automatically refunded if
6485
7108
  * the generation fails, because the model used does not support refund-on-failure.
@@ -6487,6 +7110,33 @@ export namespace GeneratePatchResponse {
6487
7110
  */
6488
7111
  disableRefund?: boolean;
6489
7112
  }
7113
+
7114
+ export namespace Billing {
7115
+ /**
7116
+ * Compute Units charged for the ADD-ONS of this job, per action — the fees paid on
7117
+ * top of the generation itself, such as `slop-detection`.
7118
+ *
7119
+ * `cuCost` above is the main action alone, so the job's total is `cuCost` plus the
7120
+ * values here.
7121
+ *
7122
+ * Two caveats when displaying it:
7123
+ *
7124
+ * - These are a remaining refundable balance, not a receipt: a job that failed or
7125
+ * was cancelled has had its add-ons refunded, so they read 0 while `cuCost`
7126
+ * still shows the main action's original charge.
7127
+ * - `ip-detection` is part of the shape but is never populated today: that fee is
7128
+ * charged outside the job and reported once, as
7129
+ * `ipDetection.creativeUnitsCharged`, in the response of the request that ran
7130
+ * it.
7131
+ *
7132
+ * Absent when the job paid for no add-on.
7133
+ */
7134
+ export interface CuCostDetails {
7135
+ 'ip-detection'?: number;
7136
+
7137
+ 'slop-detection'?: number;
7138
+ }
7139
+ }
6490
7140
  }
6491
7141
 
6492
7142
  export interface Asset {
@@ -6732,6 +7382,14 @@ export namespace GeneratePatchResponse {
6732
7382
  */
6733
7383
  preview?: Asset.Preview;
6734
7384
 
7385
+ /**
7386
+ * SlopGuard detection result, computed asynchronously after generation.
7387
+ *
7388
+ * `details` (the per-dimension reasons and suggestions) is returned only when the
7389
+ * asset is read with `withSlopGuardDetails=true`.
7390
+ */
7391
+ slopGuard?: Asset.SlopGuard;
7392
+
6735
7393
  /**
6736
7394
  * The asset's thumbnail.
6737
7395
  *
@@ -7648,6 +8306,140 @@ export namespace GeneratePatchResponse {
7648
8306
  url: string;
7649
8307
  }
7650
8308
 
8309
+ /**
8310
+ * SlopGuard detection result, computed asynchronously after generation.
8311
+ *
8312
+ * `details` (the per-dimension reasons and suggestions) is returned only when the
8313
+ * asset is read with `withSlopGuardDetails=true`.
8314
+ */
8315
+ export interface SlopGuard {
8316
+ /**
8317
+ * ISO-8601 timestamp of when scoring ran
8318
+ */
8319
+ computedAt: string;
8320
+
8321
+ /**
8322
+ * Whether scoring succeeded or errored
8323
+ */
8324
+ status: 'error' | 'scored';
8325
+
8326
+ /**
8327
+ * Rubric/model version that produced this result
8328
+ */
8329
+ version: string;
8330
+
8331
+ /**
8332
+ * Generic AI-quality sub-score
8333
+ */
8334
+ aiQualityScore?: number;
8335
+
8336
+ /**
8337
+ * Ids of briefs that contributed
8338
+ */
8339
+ appliedBriefIds?: Array<string>;
8340
+
8341
+ /**
8342
+ * Brief-compliance sub-score (omitted when no brief applied)
8343
+ */
8344
+ briefComplianceScore?: number;
8345
+
8346
+ /**
8347
+ * Per-dimension reasons and suggestions, as produced by the detector.
8348
+ *
8349
+ * Returned only when the asset is read with `withSlopGuardDetails=true` by the
8350
+ * project that owns it — the brief-compliance text paraphrases that project's
8351
+ * brief, so a cross-project read of a public asset gets the summary alone. Also
8352
+ * omitted when the archived verdict is unavailable (asset scored by an older
8353
+ * version, or an unreadable archive).
8354
+ */
8355
+ details?: SlopGuard.Details;
8356
+
8357
+ /**
8358
+ * Error message when status is 'error' (truncated)
8359
+ */
8360
+ error?: string;
8361
+
8362
+ /**
8363
+ * 0–100 composite score (present when status is 'scored')
8364
+ */
8365
+ overallScore?: number;
8366
+
8367
+ /**
8368
+ * Sensitivity used for the verdict
8369
+ */
8370
+ sensitivity?: 'high' | 'low' | 'medium';
8371
+
8372
+ /**
8373
+ * pass / warn / fail (present when status is 'scored')
8374
+ */
8375
+ verdict?: 'fail' | 'pass' | 'warn';
8376
+ }
8377
+
8378
+ export namespace SlopGuard {
8379
+ /**
8380
+ * Per-dimension reasons and suggestions, as produced by the detector.
8381
+ *
8382
+ * Returned only when the asset is read with `withSlopGuardDetails=true` by the
8383
+ * project that owns it — the brief-compliance text paraphrases that project's
8384
+ * brief, so a cross-project read of a public asset gets the summary alone. Also
8385
+ * omitted when the archived verdict is unavailable (asset scored by an older
8386
+ * version, or an unreadable archive).
8387
+ */
8388
+ export interface Details {
8389
+ /**
8390
+ * Always-on generic AI-quality dimension
8391
+ */
8392
+ aiQuality: Details.AIQuality;
8393
+
8394
+ /**
8395
+ * Brief-compliance dimension; omitted when no brief applied
8396
+ */
8397
+ briefCompliance?: Details.BriefCompliance;
8398
+ }
8399
+
8400
+ export namespace Details {
8401
+ /**
8402
+ * Always-on generic AI-quality dimension
8403
+ */
8404
+ export interface AIQuality {
8405
+ /**
8406
+ * Why the image scored as it did
8407
+ */
8408
+ reasons: Array<string>;
8409
+
8410
+ /**
8411
+ * 0–100; higher is better (more compliant / less AI-looking)
8412
+ */
8413
+ score: number;
8414
+
8415
+ /**
8416
+ * Actionable suggestions to improve the score
8417
+ */
8418
+ suggestions: Array<string>;
8419
+ }
8420
+
8421
+ /**
8422
+ * Brief-compliance dimension; omitted when no brief applied
8423
+ */
8424
+ export interface BriefCompliance {
8425
+ /**
8426
+ * Why the image scored as it did
8427
+ */
8428
+ reasons: Array<string>;
8429
+
8430
+ /**
8431
+ * 0–100; higher is better (more compliant / less AI-looking)
8432
+ */
8433
+ score: number;
8434
+
8435
+ /**
8436
+ * Actionable suggestions to improve the score
8437
+ */
8438
+ suggestions: Array<string>;
8439
+ }
8440
+ }
8441
+ }
8442
+
7651
8443
  /**
7652
8444
  * The asset's thumbnail.
7653
8445
  *
@@ -7660,6 +8452,60 @@ export namespace GeneratePatchResponse {
7660
8452
  }
7661
8453
  }
7662
8454
 
8455
+ /**
8456
+ * Compute Units cost per billing action for this request, after discount. Values
8457
+ * sum to `creativeUnitsCost`. Only Compute-Units-consuming actions with a non-zero
8458
+ * charge appear. Lets clients split the total (e.g. generation vs
8459
+ * `slop-detection`) — including on dryRun estimates.
8460
+ */
8461
+ export interface CostDetails {
8462
+ 'assistant-message'?: number;
8463
+
8464
+ caption?: number;
8465
+
8466
+ 'custom-generation'?: number;
8467
+
8468
+ 'describe-style'?: number;
8469
+
8470
+ detection?: number;
8471
+
8472
+ embed?: number;
8473
+
8474
+ 'image-prompt-editing'?: number;
8475
+
8476
+ 'inference-images'?: number;
8477
+
8478
+ 'ip-detection'?: number;
8479
+
8480
+ pixelate?: number;
8481
+
8482
+ prompt?: number;
8483
+
8484
+ 'remove-background'?: number;
8485
+
8486
+ repaint?: number;
8487
+
8488
+ restyle?: number;
8489
+
8490
+ segmentation?: number;
8491
+
8492
+ 'skybox-base-360'?: number;
8493
+
8494
+ 'skybox-upscale-360'?: number;
8495
+
8496
+ 'slop-detection'?: number;
8497
+
8498
+ texture?: number;
8499
+
8500
+ 'train-model'?: number;
8501
+
8502
+ translate?: number;
8503
+
8504
+ upscale?: number;
8505
+
8506
+ vectorization?: number;
8507
+ }
8508
+
7663
8509
  /**
7664
8510
  * IP detection findings, when detection ran for this request.
7665
8511
  */
@@ -7753,6 +8599,14 @@ export interface GeneratePromptResponse {
7753
8599
  */
7754
8600
  calls?: Array<GeneratePromptResponse.Call>;
7755
8601
 
8602
+ /**
8603
+ * Compute Units cost per billing action for this request, after discount. Values
8604
+ * sum to `creativeUnitsCost`. Only Compute-Units-consuming actions with a non-zero
8605
+ * charge appear. Lets clients split the total (e.g. generation vs
8606
+ * `slop-detection`) — including on dryRun estimates.
8607
+ */
8608
+ costDetails?: GeneratePromptResponse.CostDetails;
8609
+
7756
8610
  /**
7757
8611
  * The Compute Units cost for the request billed
7758
8612
  */
@@ -8722,6 +9576,27 @@ export namespace GeneratePromptResponse {
8722
9576
 
8723
9577
  cuDiscount: number;
8724
9578
 
9579
+ /**
9580
+ * Compute Units charged for the ADD-ONS of this job, per action — the fees paid on
9581
+ * top of the generation itself, such as `slop-detection`.
9582
+ *
9583
+ * `cuCost` above is the main action alone, so the job's total is `cuCost` plus the
9584
+ * values here.
9585
+ *
9586
+ * Two caveats when displaying it:
9587
+ *
9588
+ * - These are a remaining refundable balance, not a receipt: a job that failed or
9589
+ * was cancelled has had its add-ons refunded, so they read 0 while `cuCost`
9590
+ * still shows the main action's original charge.
9591
+ * - `ip-detection` is part of the shape but is never populated today: that fee is
9592
+ * charged outside the job and reported once, as
9593
+ * `ipDetection.creativeUnitsCharged`, in the response of the request that ran
9594
+ * it.
9595
+ *
9596
+ * Absent when the job paid for no add-on.
9597
+ */
9598
+ cuCostDetails?: Billing.CuCostDetails;
9599
+
8725
9600
  /**
8726
9601
  * When true, the credits charged for this job are not automatically refunded if
8727
9602
  * the generation fails, because the model used does not support refund-on-failure.
@@ -8729,6 +9604,33 @@ export namespace GeneratePromptResponse {
8729
9604
  */
8730
9605
  disableRefund?: boolean;
8731
9606
  }
9607
+
9608
+ export namespace Billing {
9609
+ /**
9610
+ * Compute Units charged for the ADD-ONS of this job, per action — the fees paid on
9611
+ * top of the generation itself, such as `slop-detection`.
9612
+ *
9613
+ * `cuCost` above is the main action alone, so the job's total is `cuCost` plus the
9614
+ * values here.
9615
+ *
9616
+ * Two caveats when displaying it:
9617
+ *
9618
+ * - These are a remaining refundable balance, not a receipt: a job that failed or
9619
+ * was cancelled has had its add-ons refunded, so they read 0 while `cuCost`
9620
+ * still shows the main action's original charge.
9621
+ * - `ip-detection` is part of the shape but is never populated today: that fee is
9622
+ * charged outside the job and reported once, as
9623
+ * `ipDetection.creativeUnitsCharged`, in the response of the request that ran
9624
+ * it.
9625
+ *
9626
+ * Absent when the job paid for no add-on.
9627
+ */
9628
+ export interface CuCostDetails {
9629
+ 'ip-detection'?: number;
9630
+
9631
+ 'slop-detection'?: number;
9632
+ }
9633
+ }
8732
9634
  }
8733
9635
 
8734
9636
  /**
@@ -8755,6 +9657,60 @@ export namespace GeneratePromptResponse {
8755
9657
  rationale?: string;
8756
9658
  }
8757
9659
 
9660
+ /**
9661
+ * Compute Units cost per billing action for this request, after discount. Values
9662
+ * sum to `creativeUnitsCost`. Only Compute-Units-consuming actions with a non-zero
9663
+ * charge appear. Lets clients split the total (e.g. generation vs
9664
+ * `slop-detection`) — including on dryRun estimates.
9665
+ */
9666
+ export interface CostDetails {
9667
+ 'assistant-message'?: number;
9668
+
9669
+ caption?: number;
9670
+
9671
+ 'custom-generation'?: number;
9672
+
9673
+ 'describe-style'?: number;
9674
+
9675
+ detection?: number;
9676
+
9677
+ embed?: number;
9678
+
9679
+ 'image-prompt-editing'?: number;
9680
+
9681
+ 'inference-images'?: number;
9682
+
9683
+ 'ip-detection'?: number;
9684
+
9685
+ pixelate?: number;
9686
+
9687
+ prompt?: number;
9688
+
9689
+ 'remove-background'?: number;
9690
+
9691
+ repaint?: number;
9692
+
9693
+ restyle?: number;
9694
+
9695
+ segmentation?: number;
9696
+
9697
+ 'skybox-base-360'?: number;
9698
+
9699
+ 'skybox-upscale-360'?: number;
9700
+
9701
+ 'slop-detection'?: number;
9702
+
9703
+ texture?: number;
9704
+
9705
+ 'train-model'?: number;
9706
+
9707
+ translate?: number;
9708
+
9709
+ upscale?: number;
9710
+
9711
+ vectorization?: number;
9712
+ }
9713
+
8758
9714
  /**
8759
9715
  * IP detection findings, when detection ran for this request.
8760
9716
  */
@@ -8837,6 +9793,14 @@ export namespace GeneratePromptResponse {
8837
9793
  export interface GenerateRunModelResponse {
8838
9794
  job: GenerateRunModelResponse.Job;
8839
9795
 
9796
+ /**
9797
+ * Compute Units cost per billing action for this request, after discount. Values
9798
+ * sum to `creativeUnitsCost`. Only Compute-Units-consuming actions with a non-zero
9799
+ * charge appear. Lets clients split the total (e.g. generation vs
9800
+ * `slop-detection`) — including on dryRun estimates.
9801
+ */
9802
+ costDetails?: GenerateRunModelResponse.CostDetails;
9803
+
8840
9804
  /**
8841
9805
  * The Compute Units cost for the request billed
8842
9806
  */
@@ -9801,6 +10765,27 @@ export namespace GenerateRunModelResponse {
9801
10765
 
9802
10766
  cuDiscount: number;
9803
10767
 
10768
+ /**
10769
+ * Compute Units charged for the ADD-ONS of this job, per action — the fees paid on
10770
+ * top of the generation itself, such as `slop-detection`.
10771
+ *
10772
+ * `cuCost` above is the main action alone, so the job's total is `cuCost` plus the
10773
+ * values here.
10774
+ *
10775
+ * Two caveats when displaying it:
10776
+ *
10777
+ * - These are a remaining refundable balance, not a receipt: a job that failed or
10778
+ * was cancelled has had its add-ons refunded, so they read 0 while `cuCost`
10779
+ * still shows the main action's original charge.
10780
+ * - `ip-detection` is part of the shape but is never populated today: that fee is
10781
+ * charged outside the job and reported once, as
10782
+ * `ipDetection.creativeUnitsCharged`, in the response of the request that ran
10783
+ * it.
10784
+ *
10785
+ * Absent when the job paid for no add-on.
10786
+ */
10787
+ cuCostDetails?: Billing.CuCostDetails;
10788
+
9804
10789
  /**
9805
10790
  * When true, the credits charged for this job are not automatically refunded if
9806
10791
  * the generation fails, because the model used does not support refund-on-failure.
@@ -9808,6 +10793,87 @@ export namespace GenerateRunModelResponse {
9808
10793
  */
9809
10794
  disableRefund?: boolean;
9810
10795
  }
10796
+
10797
+ export namespace Billing {
10798
+ /**
10799
+ * Compute Units charged for the ADD-ONS of this job, per action — the fees paid on
10800
+ * top of the generation itself, such as `slop-detection`.
10801
+ *
10802
+ * `cuCost` above is the main action alone, so the job's total is `cuCost` plus the
10803
+ * values here.
10804
+ *
10805
+ * Two caveats when displaying it:
10806
+ *
10807
+ * - These are a remaining refundable balance, not a receipt: a job that failed or
10808
+ * was cancelled has had its add-ons refunded, so they read 0 while `cuCost`
10809
+ * still shows the main action's original charge.
10810
+ * - `ip-detection` is part of the shape but is never populated today: that fee is
10811
+ * charged outside the job and reported once, as
10812
+ * `ipDetection.creativeUnitsCharged`, in the response of the request that ran
10813
+ * it.
10814
+ *
10815
+ * Absent when the job paid for no add-on.
10816
+ */
10817
+ export interface CuCostDetails {
10818
+ 'ip-detection'?: number;
10819
+
10820
+ 'slop-detection'?: number;
10821
+ }
10822
+ }
10823
+ }
10824
+
10825
+ /**
10826
+ * Compute Units cost per billing action for this request, after discount. Values
10827
+ * sum to `creativeUnitsCost`. Only Compute-Units-consuming actions with a non-zero
10828
+ * charge appear. Lets clients split the total (e.g. generation vs
10829
+ * `slop-detection`) — including on dryRun estimates.
10830
+ */
10831
+ export interface CostDetails {
10832
+ 'assistant-message'?: number;
10833
+
10834
+ caption?: number;
10835
+
10836
+ 'custom-generation'?: number;
10837
+
10838
+ 'describe-style'?: number;
10839
+
10840
+ detection?: number;
10841
+
10842
+ embed?: number;
10843
+
10844
+ 'image-prompt-editing'?: number;
10845
+
10846
+ 'inference-images'?: number;
10847
+
10848
+ 'ip-detection'?: number;
10849
+
10850
+ pixelate?: number;
10851
+
10852
+ prompt?: number;
10853
+
10854
+ 'remove-background'?: number;
10855
+
10856
+ repaint?: number;
10857
+
10858
+ restyle?: number;
10859
+
10860
+ segmentation?: number;
10861
+
10862
+ 'skybox-base-360'?: number;
10863
+
10864
+ 'skybox-upscale-360'?: number;
10865
+
10866
+ 'slop-detection'?: number;
10867
+
10868
+ texture?: number;
10869
+
10870
+ 'train-model'?: number;
10871
+
10872
+ translate?: number;
10873
+
10874
+ upscale?: number;
10875
+
10876
+ vectorization?: number;
9811
10877
  }
9812
10878
 
9813
10879
  /**
@@ -9902,6 +10968,14 @@ export interface GenerateTranslateResponse {
9902
10968
  */
9903
10969
  translation: string;
9904
10970
 
10971
+ /**
10972
+ * Compute Units cost per billing action for this request, after discount. Values
10973
+ * sum to `creativeUnitsCost`. Only Compute-Units-consuming actions with a non-zero
10974
+ * charge appear. Lets clients split the total (e.g. generation vs
10975
+ * `slop-detection`) — including on dryRun estimates.
10976
+ */
10977
+ costDetails?: GenerateTranslateResponse.CostDetails;
10978
+
9905
10979
  /**
9906
10980
  * The Compute Units cost for the request billed
9907
10981
  */
@@ -10866,6 +11940,27 @@ export namespace GenerateTranslateResponse {
10866
11940
 
10867
11941
  cuDiscount: number;
10868
11942
 
11943
+ /**
11944
+ * Compute Units charged for the ADD-ONS of this job, per action — the fees paid on
11945
+ * top of the generation itself, such as `slop-detection`.
11946
+ *
11947
+ * `cuCost` above is the main action alone, so the job's total is `cuCost` plus the
11948
+ * values here.
11949
+ *
11950
+ * Two caveats when displaying it:
11951
+ *
11952
+ * - These are a remaining refundable balance, not a receipt: a job that failed or
11953
+ * was cancelled has had its add-ons refunded, so they read 0 while `cuCost`
11954
+ * still shows the main action's original charge.
11955
+ * - `ip-detection` is part of the shape but is never populated today: that fee is
11956
+ * charged outside the job and reported once, as
11957
+ * `ipDetection.creativeUnitsCharged`, in the response of the request that ran
11958
+ * it.
11959
+ *
11960
+ * Absent when the job paid for no add-on.
11961
+ */
11962
+ cuCostDetails?: Billing.CuCostDetails;
11963
+
10869
11964
  /**
10870
11965
  * When true, the credits charged for this job are not automatically refunded if
10871
11966
  * the generation fails, because the model used does not support refund-on-failure.
@@ -10873,6 +11968,87 @@ export namespace GenerateTranslateResponse {
10873
11968
  */
10874
11969
  disableRefund?: boolean;
10875
11970
  }
11971
+
11972
+ export namespace Billing {
11973
+ /**
11974
+ * Compute Units charged for the ADD-ONS of this job, per action — the fees paid on
11975
+ * top of the generation itself, such as `slop-detection`.
11976
+ *
11977
+ * `cuCost` above is the main action alone, so the job's total is `cuCost` plus the
11978
+ * values here.
11979
+ *
11980
+ * Two caveats when displaying it:
11981
+ *
11982
+ * - These are a remaining refundable balance, not a receipt: a job that failed or
11983
+ * was cancelled has had its add-ons refunded, so they read 0 while `cuCost`
11984
+ * still shows the main action's original charge.
11985
+ * - `ip-detection` is part of the shape but is never populated today: that fee is
11986
+ * charged outside the job and reported once, as
11987
+ * `ipDetection.creativeUnitsCharged`, in the response of the request that ran
11988
+ * it.
11989
+ *
11990
+ * Absent when the job paid for no add-on.
11991
+ */
11992
+ export interface CuCostDetails {
11993
+ 'ip-detection'?: number;
11994
+
11995
+ 'slop-detection'?: number;
11996
+ }
11997
+ }
11998
+ }
11999
+
12000
+ /**
12001
+ * Compute Units cost per billing action for this request, after discount. Values
12002
+ * sum to `creativeUnitsCost`. Only Compute-Units-consuming actions with a non-zero
12003
+ * charge appear. Lets clients split the total (e.g. generation vs
12004
+ * `slop-detection`) — including on dryRun estimates.
12005
+ */
12006
+ export interface CostDetails {
12007
+ 'assistant-message'?: number;
12008
+
12009
+ caption?: number;
12010
+
12011
+ 'custom-generation'?: number;
12012
+
12013
+ 'describe-style'?: number;
12014
+
12015
+ detection?: number;
12016
+
12017
+ embed?: number;
12018
+
12019
+ 'image-prompt-editing'?: number;
12020
+
12021
+ 'inference-images'?: number;
12022
+
12023
+ 'ip-detection'?: number;
12024
+
12025
+ pixelate?: number;
12026
+
12027
+ prompt?: number;
12028
+
12029
+ 'remove-background'?: number;
12030
+
12031
+ repaint?: number;
12032
+
12033
+ restyle?: number;
12034
+
12035
+ segmentation?: number;
12036
+
12037
+ 'skybox-base-360'?: number;
12038
+
12039
+ 'skybox-upscale-360'?: number;
12040
+
12041
+ 'slop-detection'?: number;
12042
+
12043
+ texture?: number;
12044
+
12045
+ 'train-model'?: number;
12046
+
12047
+ translate?: number;
12048
+
12049
+ upscale?: number;
12050
+
12051
+ vectorization?: number;
10876
12052
  }
10877
12053
 
10878
12054
  /**
@@ -10980,6 +12156,11 @@ export interface GenerateCaptionParams {
10980
12156
  */
10981
12157
  dryRun?: unknown;
10982
12158
 
12159
+ /**
12160
+ * Query param
12161
+ */
12162
+ projectId?: unknown;
12163
+
10983
12164
  /**
10984
12165
  * Body param: The assetIds to generate captions. Results are returned in the same
10985
12166
  * order as the given assetIds. Deprecated, use `images` parameter instead.
@@ -11045,6 +12226,11 @@ export interface GenerateDescribeStyleParams {
11045
12226
  */
11046
12227
  dryRun?: unknown;
11047
12228
 
12229
+ /**
12230
+ * Query param
12231
+ */
12232
+ projectId?: unknown;
12233
+
11048
12234
  /**
11049
12235
  * Body param: The asset ids used to condition the generation.
11050
12236
  */
@@ -11147,6 +12333,11 @@ export interface GenerateDetectParams {
11147
12333
  */
11148
12334
  originalAssets?: boolean;
11149
12335
 
12336
+ /**
12337
+ * Query param
12338
+ */
12339
+ projectId?: unknown;
12340
+
11150
12341
  /**
11151
12342
  * Body param: Contrast factor for Grayscale detector
11152
12343
  */
@@ -11199,6 +12390,11 @@ export interface GenerateEmbedParams {
11199
12390
  * Query param: If set to true, returns the original asset without transformation
11200
12391
  */
11201
12392
  originalAssets?: boolean;
12393
+
12394
+ /**
12395
+ * Query param
12396
+ */
12397
+ projectId?: unknown;
11202
12398
  }
11203
12399
 
11204
12400
  export interface GeneratePatchParams {
@@ -11219,6 +12415,11 @@ export interface GeneratePatchParams {
11219
12415
  */
11220
12416
  originalAssets?: boolean;
11221
12417
 
12418
+ /**
12419
+ * Query param
12420
+ */
12421
+ projectId?: unknown;
12422
+
11222
12423
  /**
11223
12424
  * Body param: Whether to allow the merged image to extend the size of the original
11224
12425
  * (when x or y are negative or merged image is bigger)
@@ -11314,6 +12515,11 @@ export interface GeneratePromptParams {
11314
12515
  */
11315
12516
  dryRun?: unknown;
11316
12517
 
12518
+ /**
12519
+ * Query param
12520
+ */
12521
+ projectId?: unknown;
12522
+
11317
12523
  /**
11318
12524
  * Body param: The asset ids used to condition the generation.
11319
12525
  *
@@ -11428,6 +12634,12 @@ export interface GenerateRunModelParams {
11428
12634
  * generating.
11429
12635
  */
11430
12636
  ipDetection?: boolean;
12637
+
12638
+ /**
12639
+ * Query param: The projectId used for ownership resource management. Either to
12640
+ * assert ownership or to set the owner of the resource(s)
12641
+ */
12642
+ projectId?: string;
11431
12643
  }
11432
12644
 
11433
12645
  export interface GenerateTranslateParams {
@@ -11441,6 +12653,11 @@ export interface GenerateTranslateParams {
11441
12653
  */
11442
12654
  dryRun?: unknown;
11443
12655
 
12656
+ /**
12657
+ * Query param
12658
+ */
12659
+ projectId?: unknown;
12660
+
11444
12661
  /**
11445
12662
  * Body param: Whether we try to ensure IP removal for new prompt generation.
11446
12663
  */