@scenario-labs/sdk 2.3.0 → 2.4.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 +32 -0
- package/README.md +26 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts.map +1 -1
- package/client.js +9 -1
- package/client.js.map +1 -1
- package/client.mjs +9 -1
- package/client.mjs.map +1 -1
- package/lib/cel/environment.d.mts +38 -0
- package/lib/cel/environment.d.mts.map +1 -0
- package/lib/cel/environment.d.ts +38 -0
- package/lib/cel/environment.d.ts.map +1 -0
- package/lib/cel/environment.js +52 -0
- package/lib/cel/environment.js.map +1 -0
- package/lib/cel/environment.mjs +48 -0
- package/lib/cel/environment.mjs.map +1 -0
- package/lib/cel/functions.d.mts +4 -0
- package/lib/cel/functions.d.mts.map +1 -0
- package/lib/cel/functions.d.ts +4 -0
- package/lib/cel/functions.d.ts.map +1 -0
- package/lib/cel/functions.js +67 -0
- package/lib/cel/functions.js.map +1 -0
- package/lib/cel/functions.mjs +64 -0
- package/lib/cel/functions.mjs.map +1 -0
- package/lib/cel/index.d.mts +3 -0
- package/lib/cel/index.d.mts.map +1 -0
- package/lib/cel/index.d.ts +3 -0
- package/lib/cel/index.d.ts.map +1 -0
- package/lib/cel/index.js +9 -0
- package/lib/cel/index.js.map +1 -0
- package/lib/cel/index.mjs +3 -0
- package/lib/cel/index.mjs.map +1 -0
- package/lib/cel/prng.d.mts +28 -0
- package/lib/cel/prng.d.mts.map +1 -0
- package/lib/cel/prng.d.ts +28 -0
- package/lib/cel/prng.d.ts.map +1 -0
- package/lib/cel/prng.js +64 -0
- package/lib/cel/prng.js.map +1 -0
- package/lib/cel/prng.mjs +58 -0
- package/lib/cel/prng.mjs.map +1 -0
- package/lib/workflow_converter.d.mts +9 -0
- package/lib/workflow_converter.d.mts.map +1 -1
- package/lib/workflow_converter.d.ts +9 -0
- package/lib/workflow_converter.d.ts.map +1 -1
- package/lib/workflow_converter.js +64 -18
- package/lib/workflow_converter.js.map +1 -1
- package/lib/workflow_converter.mjs +64 -18
- package/lib/workflow_converter.mjs.map +1 -1
- package/lib/workflow_import_validator.d.mts +1 -1
- package/lib/workflow_import_validator.d.mts.map +1 -1
- package/lib/workflow_import_validator.d.ts +1 -1
- package/lib/workflow_import_validator.d.ts.map +1 -1
- package/lib/workflow_import_validator.js +1 -0
- package/lib/workflow_import_validator.js.map +1 -1
- package/lib/workflow_import_validator.mjs +1 -0
- package/lib/workflow_import_validator.mjs.map +1 -1
- package/package.json +25 -4
- package/resources/generate.d.mts +586 -2
- package/resources/generate.d.mts.map +1 -1
- package/resources/generate.d.ts +586 -2
- package/resources/generate.d.ts.map +1 -1
- package/resources/generate.js +2 -2
- package/resources/generate.js.map +1 -1
- package/resources/generate.mjs +2 -2
- package/resources/generate.mjs.map +1 -1
- package/resources/models/train.d.mts +69 -0
- package/resources/models/train.d.mts.map +1 -1
- package/resources/models/train.d.ts +69 -0
- package/resources/models/train.d.ts.map +1 -1
- package/resources/usages.d.mts +22 -2
- package/resources/usages.d.mts.map +1 -1
- package/resources/usages.d.ts +22 -2
- package/resources/usages.d.ts.map +1 -1
- package/src/client.ts +9 -1
- package/src/lib/cel/environment.ts +81 -0
- package/src/lib/cel/functions.ts +109 -0
- package/src/lib/cel/index.ts +8 -0
- package/src/lib/cel/prng.ts +62 -0
- package/src/lib/workflow_converter.ts +104 -17
- package/src/lib/workflow_import_validator.ts +3 -1
- package/src/resources/generate.ts +705 -4
- package/src/resources/models/train.ts +83 -0
- package/src/resources/usages.ts +26 -0
- package/src/tools/cel.ts +4 -0
- package/src/version.ts +1 -1
- package/tools/cel.d.mts +2 -0
- package/tools/cel.d.mts.map +1 -0
- package/tools/cel.d.ts +2 -0
- package/tools/cel.d.ts.map +1 -0
- package/tools/cel.js +8 -0
- package/tools/cel.js.map +1 -0
- package/tools/cel.mjs +5 -0
- package/tools/cel.mjs.map +1 -0
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -72,9 +72,9 @@ export class Generate extends APIResource {
|
|
|
72
72
|
params: GenerateRunModelParams,
|
|
73
73
|
options?: RequestOptions,
|
|
74
74
|
): APIPromise<GenerateRunModelResponse> {
|
|
75
|
-
const { body, dryRun } = params;
|
|
75
|
+
const { body, dryRun, ipDetection } = params;
|
|
76
76
|
return this._client.post(path`/generate/custom/${modelID}`, {
|
|
77
|
-
query: { dryRun },
|
|
77
|
+
query: { dryRun, ipDetection },
|
|
78
78
|
body: body,
|
|
79
79
|
...options,
|
|
80
80
|
});
|
|
@@ -117,6 +117,11 @@ export interface GenerateCaptionResponse {
|
|
|
117
117
|
* ignored.
|
|
118
118
|
*/
|
|
119
119
|
detailsLevel?: 'action' | 'action+style';
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* IP detection findings, when detection ran for this request.
|
|
123
|
+
*/
|
|
124
|
+
ipDetection?: GenerateCaptionResponse.IPDetection;
|
|
120
125
|
}
|
|
121
126
|
|
|
122
127
|
export namespace GenerateCaptionResponse {
|
|
@@ -1079,6 +1084,84 @@ export namespace GenerateCaptionResponse {
|
|
|
1079
1084
|
cuDiscount: number;
|
|
1080
1085
|
}
|
|
1081
1086
|
}
|
|
1087
|
+
|
|
1088
|
+
/**
|
|
1089
|
+
* IP detection findings, when detection ran for this request.
|
|
1090
|
+
*/
|
|
1091
|
+
export interface IPDetection {
|
|
1092
|
+
/**
|
|
1093
|
+
* Whether and how detection affected the request.
|
|
1094
|
+
*/
|
|
1095
|
+
action: 'allowed' | 'blocked' | 'flagged';
|
|
1096
|
+
|
|
1097
|
+
/**
|
|
1098
|
+
* IP-detection CU fee, separate from creativeUnitsCost: a fixed base fee plus a
|
|
1099
|
+
* per-image fee for each analyzed input image.
|
|
1100
|
+
*/
|
|
1101
|
+
creativeUnitsCharged: number;
|
|
1102
|
+
|
|
1103
|
+
/**
|
|
1104
|
+
* Number of enabled filters evaluated for this request.
|
|
1105
|
+
*/
|
|
1106
|
+
evaluatedFilters: number;
|
|
1107
|
+
|
|
1108
|
+
/**
|
|
1109
|
+
* Per-filter verdicts gathered for this request.
|
|
1110
|
+
*/
|
|
1111
|
+
findings: Array<IPDetection.Finding>;
|
|
1112
|
+
|
|
1113
|
+
/**
|
|
1114
|
+
* Convenience flag; always true when action is not 'allowed'.
|
|
1115
|
+
*/
|
|
1116
|
+
flagged: boolean;
|
|
1117
|
+
|
|
1118
|
+
/**
|
|
1119
|
+
* True if one or more detectors errored while evaluating this request.
|
|
1120
|
+
*/
|
|
1121
|
+
hasDetectorError?: boolean;
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
export namespace IPDetection {
|
|
1125
|
+
/**
|
|
1126
|
+
* A single filter's verdict.
|
|
1127
|
+
*/
|
|
1128
|
+
export interface Finding {
|
|
1129
|
+
/**
|
|
1130
|
+
* Category of the filter that produced this verdict.
|
|
1131
|
+
*/
|
|
1132
|
+
category: 'artist-style' | 'brand-trademark' | 'celebrity-likeness' | 'custom' | 'fictional-character';
|
|
1133
|
+
|
|
1134
|
+
/**
|
|
1135
|
+
* Confidence score from 0 (low) to 1 (high).
|
|
1136
|
+
*/
|
|
1137
|
+
confidence: number;
|
|
1138
|
+
|
|
1139
|
+
/**
|
|
1140
|
+
* Identifier of the filter that produced this verdict.
|
|
1141
|
+
*/
|
|
1142
|
+
filterId: string;
|
|
1143
|
+
|
|
1144
|
+
/**
|
|
1145
|
+
* Display name of the filter that produced this verdict.
|
|
1146
|
+
*/
|
|
1147
|
+
filterName: string;
|
|
1148
|
+
|
|
1149
|
+
/**
|
|
1150
|
+
* Whether this filter considered the request an IP risk.
|
|
1151
|
+
*/
|
|
1152
|
+
flagged: boolean;
|
|
1153
|
+
|
|
1154
|
+
/**
|
|
1155
|
+
* Short, user-facing explanation of the verdict.
|
|
1156
|
+
*/
|
|
1157
|
+
reason: string;
|
|
1158
|
+
|
|
1159
|
+
/**
|
|
1160
|
+
* Named entities the filter recognized (e.g. characters, brands, people).
|
|
1161
|
+
*/
|
|
1162
|
+
entities?: Array<string>;
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
1082
1165
|
}
|
|
1083
1166
|
|
|
1084
1167
|
export interface GenerateDescribeStyleResponse {
|
|
@@ -1103,6 +1186,11 @@ export interface GenerateDescribeStyleResponse {
|
|
|
1103
1186
|
* The Creative Units discount for the request billed
|
|
1104
1187
|
*/
|
|
1105
1188
|
creativeUnitsDiscount?: number;
|
|
1189
|
+
|
|
1190
|
+
/**
|
|
1191
|
+
* IP detection findings, when detection ran for this request.
|
|
1192
|
+
*/
|
|
1193
|
+
ipDetection?: GenerateDescribeStyleResponse.IPDetection;
|
|
1106
1194
|
}
|
|
1107
1195
|
|
|
1108
1196
|
export namespace GenerateDescribeStyleResponse {
|
|
@@ -2065,6 +2153,84 @@ export namespace GenerateDescribeStyleResponse {
|
|
|
2065
2153
|
cuDiscount: number;
|
|
2066
2154
|
}
|
|
2067
2155
|
}
|
|
2156
|
+
|
|
2157
|
+
/**
|
|
2158
|
+
* IP detection findings, when detection ran for this request.
|
|
2159
|
+
*/
|
|
2160
|
+
export interface IPDetection {
|
|
2161
|
+
/**
|
|
2162
|
+
* Whether and how detection affected the request.
|
|
2163
|
+
*/
|
|
2164
|
+
action: 'allowed' | 'blocked' | 'flagged';
|
|
2165
|
+
|
|
2166
|
+
/**
|
|
2167
|
+
* IP-detection CU fee, separate from creativeUnitsCost: a fixed base fee plus a
|
|
2168
|
+
* per-image fee for each analyzed input image.
|
|
2169
|
+
*/
|
|
2170
|
+
creativeUnitsCharged: number;
|
|
2171
|
+
|
|
2172
|
+
/**
|
|
2173
|
+
* Number of enabled filters evaluated for this request.
|
|
2174
|
+
*/
|
|
2175
|
+
evaluatedFilters: number;
|
|
2176
|
+
|
|
2177
|
+
/**
|
|
2178
|
+
* Per-filter verdicts gathered for this request.
|
|
2179
|
+
*/
|
|
2180
|
+
findings: Array<IPDetection.Finding>;
|
|
2181
|
+
|
|
2182
|
+
/**
|
|
2183
|
+
* Convenience flag; always true when action is not 'allowed'.
|
|
2184
|
+
*/
|
|
2185
|
+
flagged: boolean;
|
|
2186
|
+
|
|
2187
|
+
/**
|
|
2188
|
+
* True if one or more detectors errored while evaluating this request.
|
|
2189
|
+
*/
|
|
2190
|
+
hasDetectorError?: boolean;
|
|
2191
|
+
}
|
|
2192
|
+
|
|
2193
|
+
export namespace IPDetection {
|
|
2194
|
+
/**
|
|
2195
|
+
* A single filter's verdict.
|
|
2196
|
+
*/
|
|
2197
|
+
export interface Finding {
|
|
2198
|
+
/**
|
|
2199
|
+
* Category of the filter that produced this verdict.
|
|
2200
|
+
*/
|
|
2201
|
+
category: 'artist-style' | 'brand-trademark' | 'celebrity-likeness' | 'custom' | 'fictional-character';
|
|
2202
|
+
|
|
2203
|
+
/**
|
|
2204
|
+
* Confidence score from 0 (low) to 1 (high).
|
|
2205
|
+
*/
|
|
2206
|
+
confidence: number;
|
|
2207
|
+
|
|
2208
|
+
/**
|
|
2209
|
+
* Identifier of the filter that produced this verdict.
|
|
2210
|
+
*/
|
|
2211
|
+
filterId: string;
|
|
2212
|
+
|
|
2213
|
+
/**
|
|
2214
|
+
* Display name of the filter that produced this verdict.
|
|
2215
|
+
*/
|
|
2216
|
+
filterName: string;
|
|
2217
|
+
|
|
2218
|
+
/**
|
|
2219
|
+
* Whether this filter considered the request an IP risk.
|
|
2220
|
+
*/
|
|
2221
|
+
flagged: boolean;
|
|
2222
|
+
|
|
2223
|
+
/**
|
|
2224
|
+
* Short, user-facing explanation of the verdict.
|
|
2225
|
+
*/
|
|
2226
|
+
reason: string;
|
|
2227
|
+
|
|
2228
|
+
/**
|
|
2229
|
+
* Named entities the filter recognized (e.g. characters, brands, people).
|
|
2230
|
+
*/
|
|
2231
|
+
entities?: Array<string>;
|
|
2232
|
+
}
|
|
2233
|
+
}
|
|
2068
2234
|
}
|
|
2069
2235
|
|
|
2070
2236
|
export interface GenerateDetectResponse {
|
|
@@ -2081,6 +2247,11 @@ export interface GenerateDetectResponse {
|
|
|
2081
2247
|
* The Creative Units discount for the request billed
|
|
2082
2248
|
*/
|
|
2083
2249
|
creativeUnitsDiscount?: number;
|
|
2250
|
+
|
|
2251
|
+
/**
|
|
2252
|
+
* IP detection findings, when detection ran for this request.
|
|
2253
|
+
*/
|
|
2254
|
+
ipDetection?: GenerateDetectResponse.IPDetection;
|
|
2084
2255
|
}
|
|
2085
2256
|
|
|
2086
2257
|
export namespace GenerateDetectResponse {
|
|
@@ -4184,6 +4355,84 @@ export namespace GenerateDetectResponse {
|
|
|
4184
4355
|
url: string;
|
|
4185
4356
|
}
|
|
4186
4357
|
}
|
|
4358
|
+
|
|
4359
|
+
/**
|
|
4360
|
+
* IP detection findings, when detection ran for this request.
|
|
4361
|
+
*/
|
|
4362
|
+
export interface IPDetection {
|
|
4363
|
+
/**
|
|
4364
|
+
* Whether and how detection affected the request.
|
|
4365
|
+
*/
|
|
4366
|
+
action: 'allowed' | 'blocked' | 'flagged';
|
|
4367
|
+
|
|
4368
|
+
/**
|
|
4369
|
+
* IP-detection CU fee, separate from creativeUnitsCost: a fixed base fee plus a
|
|
4370
|
+
* per-image fee for each analyzed input image.
|
|
4371
|
+
*/
|
|
4372
|
+
creativeUnitsCharged: number;
|
|
4373
|
+
|
|
4374
|
+
/**
|
|
4375
|
+
* Number of enabled filters evaluated for this request.
|
|
4376
|
+
*/
|
|
4377
|
+
evaluatedFilters: number;
|
|
4378
|
+
|
|
4379
|
+
/**
|
|
4380
|
+
* Per-filter verdicts gathered for this request.
|
|
4381
|
+
*/
|
|
4382
|
+
findings: Array<IPDetection.Finding>;
|
|
4383
|
+
|
|
4384
|
+
/**
|
|
4385
|
+
* Convenience flag; always true when action is not 'allowed'.
|
|
4386
|
+
*/
|
|
4387
|
+
flagged: boolean;
|
|
4388
|
+
|
|
4389
|
+
/**
|
|
4390
|
+
* True if one or more detectors errored while evaluating this request.
|
|
4391
|
+
*/
|
|
4392
|
+
hasDetectorError?: boolean;
|
|
4393
|
+
}
|
|
4394
|
+
|
|
4395
|
+
export namespace IPDetection {
|
|
4396
|
+
/**
|
|
4397
|
+
* A single filter's verdict.
|
|
4398
|
+
*/
|
|
4399
|
+
export interface Finding {
|
|
4400
|
+
/**
|
|
4401
|
+
* Category of the filter that produced this verdict.
|
|
4402
|
+
*/
|
|
4403
|
+
category: 'artist-style' | 'brand-trademark' | 'celebrity-likeness' | 'custom' | 'fictional-character';
|
|
4404
|
+
|
|
4405
|
+
/**
|
|
4406
|
+
* Confidence score from 0 (low) to 1 (high).
|
|
4407
|
+
*/
|
|
4408
|
+
confidence: number;
|
|
4409
|
+
|
|
4410
|
+
/**
|
|
4411
|
+
* Identifier of the filter that produced this verdict.
|
|
4412
|
+
*/
|
|
4413
|
+
filterId: string;
|
|
4414
|
+
|
|
4415
|
+
/**
|
|
4416
|
+
* Display name of the filter that produced this verdict.
|
|
4417
|
+
*/
|
|
4418
|
+
filterName: string;
|
|
4419
|
+
|
|
4420
|
+
/**
|
|
4421
|
+
* Whether this filter considered the request an IP risk.
|
|
4422
|
+
*/
|
|
4423
|
+
flagged: boolean;
|
|
4424
|
+
|
|
4425
|
+
/**
|
|
4426
|
+
* Short, user-facing explanation of the verdict.
|
|
4427
|
+
*/
|
|
4428
|
+
reason: string;
|
|
4429
|
+
|
|
4430
|
+
/**
|
|
4431
|
+
* Named entities the filter recognized (e.g. characters, brands, people).
|
|
4432
|
+
*/
|
|
4433
|
+
entities?: Array<string>;
|
|
4434
|
+
}
|
|
4435
|
+
}
|
|
4187
4436
|
}
|
|
4188
4437
|
|
|
4189
4438
|
export interface GenerateEmbedResponse {
|
|
@@ -4205,6 +4454,11 @@ export interface GenerateEmbedResponse {
|
|
|
4205
4454
|
* The Creative Units discount for the request billed
|
|
4206
4455
|
*/
|
|
4207
4456
|
creativeUnitsDiscount?: number;
|
|
4457
|
+
|
|
4458
|
+
/**
|
|
4459
|
+
* IP detection findings, when detection ran for this request.
|
|
4460
|
+
*/
|
|
4461
|
+
ipDetection?: GenerateEmbedResponse.IPDetection;
|
|
4208
4462
|
}
|
|
4209
4463
|
|
|
4210
4464
|
export namespace GenerateEmbedResponse {
|
|
@@ -5167,6 +5421,84 @@ export namespace GenerateEmbedResponse {
|
|
|
5167
5421
|
cuDiscount: number;
|
|
5168
5422
|
}
|
|
5169
5423
|
}
|
|
5424
|
+
|
|
5425
|
+
/**
|
|
5426
|
+
* IP detection findings, when detection ran for this request.
|
|
5427
|
+
*/
|
|
5428
|
+
export interface IPDetection {
|
|
5429
|
+
/**
|
|
5430
|
+
* Whether and how detection affected the request.
|
|
5431
|
+
*/
|
|
5432
|
+
action: 'allowed' | 'blocked' | 'flagged';
|
|
5433
|
+
|
|
5434
|
+
/**
|
|
5435
|
+
* IP-detection CU fee, separate from creativeUnitsCost: a fixed base fee plus a
|
|
5436
|
+
* per-image fee for each analyzed input image.
|
|
5437
|
+
*/
|
|
5438
|
+
creativeUnitsCharged: number;
|
|
5439
|
+
|
|
5440
|
+
/**
|
|
5441
|
+
* Number of enabled filters evaluated for this request.
|
|
5442
|
+
*/
|
|
5443
|
+
evaluatedFilters: number;
|
|
5444
|
+
|
|
5445
|
+
/**
|
|
5446
|
+
* Per-filter verdicts gathered for this request.
|
|
5447
|
+
*/
|
|
5448
|
+
findings: Array<IPDetection.Finding>;
|
|
5449
|
+
|
|
5450
|
+
/**
|
|
5451
|
+
* Convenience flag; always true when action is not 'allowed'.
|
|
5452
|
+
*/
|
|
5453
|
+
flagged: boolean;
|
|
5454
|
+
|
|
5455
|
+
/**
|
|
5456
|
+
* True if one or more detectors errored while evaluating this request.
|
|
5457
|
+
*/
|
|
5458
|
+
hasDetectorError?: boolean;
|
|
5459
|
+
}
|
|
5460
|
+
|
|
5461
|
+
export namespace IPDetection {
|
|
5462
|
+
/**
|
|
5463
|
+
* A single filter's verdict.
|
|
5464
|
+
*/
|
|
5465
|
+
export interface Finding {
|
|
5466
|
+
/**
|
|
5467
|
+
* Category of the filter that produced this verdict.
|
|
5468
|
+
*/
|
|
5469
|
+
category: 'artist-style' | 'brand-trademark' | 'celebrity-likeness' | 'custom' | 'fictional-character';
|
|
5470
|
+
|
|
5471
|
+
/**
|
|
5472
|
+
* Confidence score from 0 (low) to 1 (high).
|
|
5473
|
+
*/
|
|
5474
|
+
confidence: number;
|
|
5475
|
+
|
|
5476
|
+
/**
|
|
5477
|
+
* Identifier of the filter that produced this verdict.
|
|
5478
|
+
*/
|
|
5479
|
+
filterId: string;
|
|
5480
|
+
|
|
5481
|
+
/**
|
|
5482
|
+
* Display name of the filter that produced this verdict.
|
|
5483
|
+
*/
|
|
5484
|
+
filterName: string;
|
|
5485
|
+
|
|
5486
|
+
/**
|
|
5487
|
+
* Whether this filter considered the request an IP risk.
|
|
5488
|
+
*/
|
|
5489
|
+
flagged: boolean;
|
|
5490
|
+
|
|
5491
|
+
/**
|
|
5492
|
+
* Short, user-facing explanation of the verdict.
|
|
5493
|
+
*/
|
|
5494
|
+
reason: string;
|
|
5495
|
+
|
|
5496
|
+
/**
|
|
5497
|
+
* Named entities the filter recognized (e.g. characters, brands, people).
|
|
5498
|
+
*/
|
|
5499
|
+
entities?: Array<string>;
|
|
5500
|
+
}
|
|
5501
|
+
}
|
|
5170
5502
|
}
|
|
5171
5503
|
|
|
5172
5504
|
export interface GeneratePatchResponse {
|
|
@@ -5183,6 +5515,11 @@ export interface GeneratePatchResponse {
|
|
|
5183
5515
|
* The Creative Units discount for the request billed
|
|
5184
5516
|
*/
|
|
5185
5517
|
creativeUnitsDiscount?: number;
|
|
5518
|
+
|
|
5519
|
+
/**
|
|
5520
|
+
* IP detection findings, when detection ran for this request.
|
|
5521
|
+
*/
|
|
5522
|
+
ipDetection?: GeneratePatchResponse.IPDetection;
|
|
5186
5523
|
}
|
|
5187
5524
|
|
|
5188
5525
|
export namespace GeneratePatchResponse {
|
|
@@ -7286,6 +7623,84 @@ export namespace GeneratePatchResponse {
|
|
|
7286
7623
|
url: string;
|
|
7287
7624
|
}
|
|
7288
7625
|
}
|
|
7626
|
+
|
|
7627
|
+
/**
|
|
7628
|
+
* IP detection findings, when detection ran for this request.
|
|
7629
|
+
*/
|
|
7630
|
+
export interface IPDetection {
|
|
7631
|
+
/**
|
|
7632
|
+
* Whether and how detection affected the request.
|
|
7633
|
+
*/
|
|
7634
|
+
action: 'allowed' | 'blocked' | 'flagged';
|
|
7635
|
+
|
|
7636
|
+
/**
|
|
7637
|
+
* IP-detection CU fee, separate from creativeUnitsCost: a fixed base fee plus a
|
|
7638
|
+
* per-image fee for each analyzed input image.
|
|
7639
|
+
*/
|
|
7640
|
+
creativeUnitsCharged: number;
|
|
7641
|
+
|
|
7642
|
+
/**
|
|
7643
|
+
* Number of enabled filters evaluated for this request.
|
|
7644
|
+
*/
|
|
7645
|
+
evaluatedFilters: number;
|
|
7646
|
+
|
|
7647
|
+
/**
|
|
7648
|
+
* Per-filter verdicts gathered for this request.
|
|
7649
|
+
*/
|
|
7650
|
+
findings: Array<IPDetection.Finding>;
|
|
7651
|
+
|
|
7652
|
+
/**
|
|
7653
|
+
* Convenience flag; always true when action is not 'allowed'.
|
|
7654
|
+
*/
|
|
7655
|
+
flagged: boolean;
|
|
7656
|
+
|
|
7657
|
+
/**
|
|
7658
|
+
* True if one or more detectors errored while evaluating this request.
|
|
7659
|
+
*/
|
|
7660
|
+
hasDetectorError?: boolean;
|
|
7661
|
+
}
|
|
7662
|
+
|
|
7663
|
+
export namespace IPDetection {
|
|
7664
|
+
/**
|
|
7665
|
+
* A single filter's verdict.
|
|
7666
|
+
*/
|
|
7667
|
+
export interface Finding {
|
|
7668
|
+
/**
|
|
7669
|
+
* Category of the filter that produced this verdict.
|
|
7670
|
+
*/
|
|
7671
|
+
category: 'artist-style' | 'brand-trademark' | 'celebrity-likeness' | 'custom' | 'fictional-character';
|
|
7672
|
+
|
|
7673
|
+
/**
|
|
7674
|
+
* Confidence score from 0 (low) to 1 (high).
|
|
7675
|
+
*/
|
|
7676
|
+
confidence: number;
|
|
7677
|
+
|
|
7678
|
+
/**
|
|
7679
|
+
* Identifier of the filter that produced this verdict.
|
|
7680
|
+
*/
|
|
7681
|
+
filterId: string;
|
|
7682
|
+
|
|
7683
|
+
/**
|
|
7684
|
+
* Display name of the filter that produced this verdict.
|
|
7685
|
+
*/
|
|
7686
|
+
filterName: string;
|
|
7687
|
+
|
|
7688
|
+
/**
|
|
7689
|
+
* Whether this filter considered the request an IP risk.
|
|
7690
|
+
*/
|
|
7691
|
+
flagged: boolean;
|
|
7692
|
+
|
|
7693
|
+
/**
|
|
7694
|
+
* Short, user-facing explanation of the verdict.
|
|
7695
|
+
*/
|
|
7696
|
+
reason: string;
|
|
7697
|
+
|
|
7698
|
+
/**
|
|
7699
|
+
* Named entities the filter recognized (e.g. characters, brands, people).
|
|
7700
|
+
*/
|
|
7701
|
+
entities?: Array<string>;
|
|
7702
|
+
}
|
|
7703
|
+
}
|
|
7289
7704
|
}
|
|
7290
7705
|
|
|
7291
7706
|
export interface GeneratePromptResponse {
|
|
@@ -7296,6 +7711,12 @@ export interface GeneratePromptResponse {
|
|
|
7296
7711
|
*/
|
|
7297
7712
|
prompts: Array<string>;
|
|
7298
7713
|
|
|
7714
|
+
/**
|
|
7715
|
+
* The full ready-to-run model calls, index-aligned with `prompts`: `prompts[i]` is
|
|
7716
|
+
* the prompt text of `calls[i]`.
|
|
7717
|
+
*/
|
|
7718
|
+
calls?: Array<GeneratePromptResponse.Call>;
|
|
7719
|
+
|
|
7299
7720
|
/**
|
|
7300
7721
|
* The Creative Units cost for the request billed
|
|
7301
7722
|
*/
|
|
@@ -7306,10 +7727,15 @@ export interface GeneratePromptResponse {
|
|
|
7306
7727
|
*/
|
|
7307
7728
|
creativeUnitsDiscount?: number;
|
|
7308
7729
|
|
|
7730
|
+
/**
|
|
7731
|
+
* IP detection findings, when detection ran for this request.
|
|
7732
|
+
*/
|
|
7733
|
+
ipDetection?: GeneratePromptResponse.IPDetection;
|
|
7734
|
+
|
|
7309
7735
|
/**
|
|
7310
7736
|
* The mode used to generate new prompt(s).
|
|
7311
7737
|
*/
|
|
7312
|
-
mode?: 'completion' | 'contextual' | 'image-editing' | 'inventive' | 'structured';
|
|
7738
|
+
mode?: 'completion' | 'contextual' | 'contextual-v2' | 'image-editing' | 'inventive' | 'structured';
|
|
7313
7739
|
}
|
|
7314
7740
|
|
|
7315
7741
|
export namespace GeneratePromptResponse {
|
|
@@ -8272,6 +8698,108 @@ export namespace GeneratePromptResponse {
|
|
|
8272
8698
|
cuDiscount: number;
|
|
8273
8699
|
}
|
|
8274
8700
|
}
|
|
8701
|
+
|
|
8702
|
+
/**
|
|
8703
|
+
* A complete, ready-to-run model call proposed by Prompt Spark v3.
|
|
8704
|
+
*
|
|
8705
|
+
* The prompt text is carried inside `parameters` under the target model's prompt
|
|
8706
|
+
* input (when the model defines one). For models without a prompt input, the text
|
|
8707
|
+
* is only available in the index-aligned `prompts` array.
|
|
8708
|
+
*/
|
|
8709
|
+
export interface Call {
|
|
8710
|
+
/**
|
|
8711
|
+
* The target model the call is for.
|
|
8712
|
+
*/
|
|
8713
|
+
modelId: string;
|
|
8714
|
+
|
|
8715
|
+
/**
|
|
8716
|
+
* Schema-valid dynamic parameters for the target model, prompt included.
|
|
8717
|
+
*/
|
|
8718
|
+
parameters: unknown;
|
|
8719
|
+
|
|
8720
|
+
/**
|
|
8721
|
+
* Optional rationale for the proposed call.
|
|
8722
|
+
*/
|
|
8723
|
+
rationale?: string;
|
|
8724
|
+
}
|
|
8725
|
+
|
|
8726
|
+
/**
|
|
8727
|
+
* IP detection findings, when detection ran for this request.
|
|
8728
|
+
*/
|
|
8729
|
+
export interface IPDetection {
|
|
8730
|
+
/**
|
|
8731
|
+
* Whether and how detection affected the request.
|
|
8732
|
+
*/
|
|
8733
|
+
action: 'allowed' | 'blocked' | 'flagged';
|
|
8734
|
+
|
|
8735
|
+
/**
|
|
8736
|
+
* IP-detection CU fee, separate from creativeUnitsCost: a fixed base fee plus a
|
|
8737
|
+
* per-image fee for each analyzed input image.
|
|
8738
|
+
*/
|
|
8739
|
+
creativeUnitsCharged: number;
|
|
8740
|
+
|
|
8741
|
+
/**
|
|
8742
|
+
* Number of enabled filters evaluated for this request.
|
|
8743
|
+
*/
|
|
8744
|
+
evaluatedFilters: number;
|
|
8745
|
+
|
|
8746
|
+
/**
|
|
8747
|
+
* Per-filter verdicts gathered for this request.
|
|
8748
|
+
*/
|
|
8749
|
+
findings: Array<IPDetection.Finding>;
|
|
8750
|
+
|
|
8751
|
+
/**
|
|
8752
|
+
* Convenience flag; always true when action is not 'allowed'.
|
|
8753
|
+
*/
|
|
8754
|
+
flagged: boolean;
|
|
8755
|
+
|
|
8756
|
+
/**
|
|
8757
|
+
* True if one or more detectors errored while evaluating this request.
|
|
8758
|
+
*/
|
|
8759
|
+
hasDetectorError?: boolean;
|
|
8760
|
+
}
|
|
8761
|
+
|
|
8762
|
+
export namespace IPDetection {
|
|
8763
|
+
/**
|
|
8764
|
+
* A single filter's verdict.
|
|
8765
|
+
*/
|
|
8766
|
+
export interface Finding {
|
|
8767
|
+
/**
|
|
8768
|
+
* Category of the filter that produced this verdict.
|
|
8769
|
+
*/
|
|
8770
|
+
category: 'artist-style' | 'brand-trademark' | 'celebrity-likeness' | 'custom' | 'fictional-character';
|
|
8771
|
+
|
|
8772
|
+
/**
|
|
8773
|
+
* Confidence score from 0 (low) to 1 (high).
|
|
8774
|
+
*/
|
|
8775
|
+
confidence: number;
|
|
8776
|
+
|
|
8777
|
+
/**
|
|
8778
|
+
* Identifier of the filter that produced this verdict.
|
|
8779
|
+
*/
|
|
8780
|
+
filterId: string;
|
|
8781
|
+
|
|
8782
|
+
/**
|
|
8783
|
+
* Display name of the filter that produced this verdict.
|
|
8784
|
+
*/
|
|
8785
|
+
filterName: string;
|
|
8786
|
+
|
|
8787
|
+
/**
|
|
8788
|
+
* Whether this filter considered the request an IP risk.
|
|
8789
|
+
*/
|
|
8790
|
+
flagged: boolean;
|
|
8791
|
+
|
|
8792
|
+
/**
|
|
8793
|
+
* Short, user-facing explanation of the verdict.
|
|
8794
|
+
*/
|
|
8795
|
+
reason: string;
|
|
8796
|
+
|
|
8797
|
+
/**
|
|
8798
|
+
* Named entities the filter recognized (e.g. characters, brands, people).
|
|
8799
|
+
*/
|
|
8800
|
+
entities?: Array<string>;
|
|
8801
|
+
}
|
|
8802
|
+
}
|
|
8275
8803
|
}
|
|
8276
8804
|
|
|
8277
8805
|
export interface GenerateRunModelResponse {
|
|
@@ -8286,6 +8814,11 @@ export interface GenerateRunModelResponse {
|
|
|
8286
8814
|
* The Creative Units discount for the request billed
|
|
8287
8815
|
*/
|
|
8288
8816
|
creativeUnitsDiscount?: number;
|
|
8817
|
+
|
|
8818
|
+
/**
|
|
8819
|
+
* IP detection findings, when detection ran for this request.
|
|
8820
|
+
*/
|
|
8821
|
+
ipDetection?: GenerateRunModelResponse.IPDetection;
|
|
8289
8822
|
}
|
|
8290
8823
|
|
|
8291
8824
|
export namespace GenerateRunModelResponse {
|
|
@@ -9248,6 +9781,84 @@ export namespace GenerateRunModelResponse {
|
|
|
9248
9781
|
cuDiscount: number;
|
|
9249
9782
|
}
|
|
9250
9783
|
}
|
|
9784
|
+
|
|
9785
|
+
/**
|
|
9786
|
+
* IP detection findings, when detection ran for this request.
|
|
9787
|
+
*/
|
|
9788
|
+
export interface IPDetection {
|
|
9789
|
+
/**
|
|
9790
|
+
* Whether and how detection affected the request.
|
|
9791
|
+
*/
|
|
9792
|
+
action: 'allowed' | 'blocked' | 'flagged';
|
|
9793
|
+
|
|
9794
|
+
/**
|
|
9795
|
+
* IP-detection CU fee, separate from creativeUnitsCost: a fixed base fee plus a
|
|
9796
|
+
* per-image fee for each analyzed input image.
|
|
9797
|
+
*/
|
|
9798
|
+
creativeUnitsCharged: number;
|
|
9799
|
+
|
|
9800
|
+
/**
|
|
9801
|
+
* Number of enabled filters evaluated for this request.
|
|
9802
|
+
*/
|
|
9803
|
+
evaluatedFilters: number;
|
|
9804
|
+
|
|
9805
|
+
/**
|
|
9806
|
+
* Per-filter verdicts gathered for this request.
|
|
9807
|
+
*/
|
|
9808
|
+
findings: Array<IPDetection.Finding>;
|
|
9809
|
+
|
|
9810
|
+
/**
|
|
9811
|
+
* Convenience flag; always true when action is not 'allowed'.
|
|
9812
|
+
*/
|
|
9813
|
+
flagged: boolean;
|
|
9814
|
+
|
|
9815
|
+
/**
|
|
9816
|
+
* True if one or more detectors errored while evaluating this request.
|
|
9817
|
+
*/
|
|
9818
|
+
hasDetectorError?: boolean;
|
|
9819
|
+
}
|
|
9820
|
+
|
|
9821
|
+
export namespace IPDetection {
|
|
9822
|
+
/**
|
|
9823
|
+
* A single filter's verdict.
|
|
9824
|
+
*/
|
|
9825
|
+
export interface Finding {
|
|
9826
|
+
/**
|
|
9827
|
+
* Category of the filter that produced this verdict.
|
|
9828
|
+
*/
|
|
9829
|
+
category: 'artist-style' | 'brand-trademark' | 'celebrity-likeness' | 'custom' | 'fictional-character';
|
|
9830
|
+
|
|
9831
|
+
/**
|
|
9832
|
+
* Confidence score from 0 (low) to 1 (high).
|
|
9833
|
+
*/
|
|
9834
|
+
confidence: number;
|
|
9835
|
+
|
|
9836
|
+
/**
|
|
9837
|
+
* Identifier of the filter that produced this verdict.
|
|
9838
|
+
*/
|
|
9839
|
+
filterId: string;
|
|
9840
|
+
|
|
9841
|
+
/**
|
|
9842
|
+
* Display name of the filter that produced this verdict.
|
|
9843
|
+
*/
|
|
9844
|
+
filterName: string;
|
|
9845
|
+
|
|
9846
|
+
/**
|
|
9847
|
+
* Whether this filter considered the request an IP risk.
|
|
9848
|
+
*/
|
|
9849
|
+
flagged: boolean;
|
|
9850
|
+
|
|
9851
|
+
/**
|
|
9852
|
+
* Short, user-facing explanation of the verdict.
|
|
9853
|
+
*/
|
|
9854
|
+
reason: string;
|
|
9855
|
+
|
|
9856
|
+
/**
|
|
9857
|
+
* Named entities the filter recognized (e.g. characters, brands, people).
|
|
9858
|
+
*/
|
|
9859
|
+
entities?: Array<string>;
|
|
9860
|
+
}
|
|
9861
|
+
}
|
|
9251
9862
|
}
|
|
9252
9863
|
|
|
9253
9864
|
export interface GenerateTranslateResponse {
|
|
@@ -9272,6 +9883,11 @@ export interface GenerateTranslateResponse {
|
|
|
9272
9883
|
* The Creative Units discount for the request billed
|
|
9273
9884
|
*/
|
|
9274
9885
|
creativeUnitsDiscount?: number;
|
|
9886
|
+
|
|
9887
|
+
/**
|
|
9888
|
+
* IP detection findings, when detection ran for this request.
|
|
9889
|
+
*/
|
|
9890
|
+
ipDetection?: GenerateTranslateResponse.IPDetection;
|
|
9275
9891
|
}
|
|
9276
9892
|
|
|
9277
9893
|
export namespace GenerateTranslateResponse {
|
|
@@ -10234,6 +10850,84 @@ export namespace GenerateTranslateResponse {
|
|
|
10234
10850
|
cuDiscount: number;
|
|
10235
10851
|
}
|
|
10236
10852
|
}
|
|
10853
|
+
|
|
10854
|
+
/**
|
|
10855
|
+
* IP detection findings, when detection ran for this request.
|
|
10856
|
+
*/
|
|
10857
|
+
export interface IPDetection {
|
|
10858
|
+
/**
|
|
10859
|
+
* Whether and how detection affected the request.
|
|
10860
|
+
*/
|
|
10861
|
+
action: 'allowed' | 'blocked' | 'flagged';
|
|
10862
|
+
|
|
10863
|
+
/**
|
|
10864
|
+
* IP-detection CU fee, separate from creativeUnitsCost: a fixed base fee plus a
|
|
10865
|
+
* per-image fee for each analyzed input image.
|
|
10866
|
+
*/
|
|
10867
|
+
creativeUnitsCharged: number;
|
|
10868
|
+
|
|
10869
|
+
/**
|
|
10870
|
+
* Number of enabled filters evaluated for this request.
|
|
10871
|
+
*/
|
|
10872
|
+
evaluatedFilters: number;
|
|
10873
|
+
|
|
10874
|
+
/**
|
|
10875
|
+
* Per-filter verdicts gathered for this request.
|
|
10876
|
+
*/
|
|
10877
|
+
findings: Array<IPDetection.Finding>;
|
|
10878
|
+
|
|
10879
|
+
/**
|
|
10880
|
+
* Convenience flag; always true when action is not 'allowed'.
|
|
10881
|
+
*/
|
|
10882
|
+
flagged: boolean;
|
|
10883
|
+
|
|
10884
|
+
/**
|
|
10885
|
+
* True if one or more detectors errored while evaluating this request.
|
|
10886
|
+
*/
|
|
10887
|
+
hasDetectorError?: boolean;
|
|
10888
|
+
}
|
|
10889
|
+
|
|
10890
|
+
export namespace IPDetection {
|
|
10891
|
+
/**
|
|
10892
|
+
* A single filter's verdict.
|
|
10893
|
+
*/
|
|
10894
|
+
export interface Finding {
|
|
10895
|
+
/**
|
|
10896
|
+
* Category of the filter that produced this verdict.
|
|
10897
|
+
*/
|
|
10898
|
+
category: 'artist-style' | 'brand-trademark' | 'celebrity-likeness' | 'custom' | 'fictional-character';
|
|
10899
|
+
|
|
10900
|
+
/**
|
|
10901
|
+
* Confidence score from 0 (low) to 1 (high).
|
|
10902
|
+
*/
|
|
10903
|
+
confidence: number;
|
|
10904
|
+
|
|
10905
|
+
/**
|
|
10906
|
+
* Identifier of the filter that produced this verdict.
|
|
10907
|
+
*/
|
|
10908
|
+
filterId: string;
|
|
10909
|
+
|
|
10910
|
+
/**
|
|
10911
|
+
* Display name of the filter that produced this verdict.
|
|
10912
|
+
*/
|
|
10913
|
+
filterName: string;
|
|
10914
|
+
|
|
10915
|
+
/**
|
|
10916
|
+
* Whether this filter considered the request an IP risk.
|
|
10917
|
+
*/
|
|
10918
|
+
flagged: boolean;
|
|
10919
|
+
|
|
10920
|
+
/**
|
|
10921
|
+
* Short, user-facing explanation of the verdict.
|
|
10922
|
+
*/
|
|
10923
|
+
reason: string;
|
|
10924
|
+
|
|
10925
|
+
/**
|
|
10926
|
+
* Named entities the filter recognized (e.g. characters, brands, people).
|
|
10927
|
+
*/
|
|
10928
|
+
entities?: Array<string>;
|
|
10929
|
+
}
|
|
10930
|
+
}
|
|
10237
10931
|
}
|
|
10238
10932
|
|
|
10239
10933
|
export interface GenerateCaptionParams {
|
|
@@ -10589,7 +11283,7 @@ export interface GeneratePromptParams {
|
|
|
10589
11283
|
/**
|
|
10590
11284
|
* Body param: The mode used to generate new prompt(s).
|
|
10591
11285
|
*/
|
|
10592
|
-
mode: 'completion' | 'contextual' | 'image-editing' | 'inventive' | 'structured';
|
|
11286
|
+
mode: 'completion' | 'contextual' | 'contextual-v2' | 'image-editing' | 'inventive' | 'structured';
|
|
10593
11287
|
|
|
10594
11288
|
/**
|
|
10595
11289
|
* Query param
|
|
@@ -10697,6 +11391,13 @@ export interface GenerateRunModelParams {
|
|
|
10697
11391
|
* Query param
|
|
10698
11392
|
*/
|
|
10699
11393
|
dryRun?: unknown;
|
|
11394
|
+
|
|
11395
|
+
/**
|
|
11396
|
+
* Query param: Set to "true" to run an IP-detection preflight on this request.
|
|
11397
|
+
* Combine with ?dryRun=true for an advisory check that returns findings without
|
|
11398
|
+
* generating.
|
|
11399
|
+
*/
|
|
11400
|
+
ipDetection?: boolean;
|
|
10700
11401
|
}
|
|
10701
11402
|
|
|
10702
11403
|
export interface GenerateTranslateParams {
|