@scenario-labs/sdk 2.6.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.
- package/CHANGELOG.md +49 -0
- package/client.d.mts +10 -10
- package/client.d.mts.map +1 -1
- package/client.d.ts +10 -10
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/lib/job.d.mts +2 -2
- package/lib/job.d.mts.map +1 -1
- package/lib/job.d.ts +2 -2
- package/lib/job.d.ts.map +1 -1
- package/lib/job.js +3 -3
- package/lib/job.js.map +1 -1
- package/lib/job.mjs +3 -3
- package/lib/job.mjs.map +1 -1
- package/lib/upload.d.mts +2 -2
- package/lib/upload.d.mts.map +1 -1
- package/lib/upload.d.ts +2 -2
- package/lib/upload.d.ts.map +1 -1
- package/lib/upload.js +4 -4
- package/lib/upload.js.map +1 -1
- package/lib/upload.mjs +4 -4
- package/lib/upload.mjs.map +1 -1
- package/lib/workflow.d.mts +2 -2
- package/lib/workflow.d.mts.map +1 -1
- package/lib/workflow.d.ts +2 -2
- package/lib/workflow.d.ts.map +1 -1
- package/lib/workflow.js +2 -2
- package/lib/workflow.js.map +1 -1
- package/lib/workflow.mjs +2 -2
- package/lib/workflow.mjs.map +1 -1
- package/lib/workflow_converter.d.mts.map +1 -1
- package/lib/workflow_converter.d.ts.map +1 -1
- package/lib/workflow_converter.js +101 -22
- package/lib/workflow_converter.js.map +1 -1
- package/lib/workflow_converter.mjs +101 -22
- package/lib/workflow_converter.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/assets/assets.d.mts +1091 -8
- package/resources/assets/assets.d.mts.map +1 -1
- package/resources/assets/assets.d.ts +1091 -8
- package/resources/assets/assets.d.ts.map +1 -1
- package/resources/assets/assets.js +34 -16
- package/resources/assets/assets.js.map +1 -1
- package/resources/assets/assets.mjs +34 -16
- package/resources/assets/assets.mjs.map +1 -1
- package/resources/assets/download.d.mts +28 -5
- package/resources/assets/download.d.mts.map +1 -1
- package/resources/assets/download.d.ts +28 -5
- package/resources/assets/download.d.ts.map +1 -1
- package/resources/assets/download.js +8 -6
- package/resources/assets/download.js.map +1 -1
- package/resources/assets/download.mjs +8 -6
- package/resources/assets/download.mjs.map +1 -1
- package/resources/assets/index.d.mts +1 -1
- package/resources/assets/index.d.mts.map +1 -1
- package/resources/assets/index.d.ts +1 -1
- package/resources/assets/index.d.ts.map +1 -1
- package/resources/assets/index.js.map +1 -1
- package/resources/assets/index.mjs.map +1 -1
- package/resources/collections/assets.d.mts +15 -4
- package/resources/collections/assets.d.mts.map +1 -1
- package/resources/collections/assets.d.ts +15 -4
- package/resources/collections/assets.d.ts.map +1 -1
- package/resources/collections/assets.js +14 -4
- package/resources/collections/assets.js.map +1 -1
- package/resources/collections/assets.mjs +14 -4
- package/resources/collections/assets.mjs.map +1 -1
- package/resources/collections/collections.d.mts +38 -9
- package/resources/collections/collections.d.mts.map +1 -1
- package/resources/collections/collections.d.ts +38 -9
- package/resources/collections/collections.d.ts.map +1 -1
- package/resources/collections/collections.js +11 -8
- package/resources/collections/collections.js.map +1 -1
- package/resources/collections/collections.mjs +11 -8
- package/resources/collections/collections.mjs.map +1 -1
- package/resources/collections/index.d.mts +1 -1
- package/resources/collections/index.d.mts.map +1 -1
- package/resources/collections/index.d.ts +1 -1
- package/resources/collections/index.d.ts.map +1 -1
- package/resources/collections/index.js.map +1 -1
- package/resources/collections/index.mjs.map +1 -1
- package/resources/collections/models.d.mts +15 -4
- package/resources/collections/models.d.mts.map +1 -1
- package/resources/collections/models.d.ts +15 -4
- package/resources/collections/models.d.ts.map +1 -1
- package/resources/collections/models.js +14 -4
- package/resources/collections/models.js.map +1 -1
- package/resources/collections/models.mjs +14 -4
- package/resources/collections/models.mjs.map +1 -1
- package/resources/generate.d.mts +941 -0
- package/resources/generate.d.mts.map +1 -1
- package/resources/generate.d.ts +941 -0
- package/resources/generate.d.ts.map +1 -1
- package/resources/generate.js +28 -16
- package/resources/generate.js.map +1 -1
- package/resources/generate.mjs +28 -16
- package/resources/generate.mjs.map +1 -1
- package/resources/index.d.mts +5 -5
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +5 -5
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/jobs.d.mts +146 -2
- package/resources/jobs.d.mts.map +1 -1
- package/resources/jobs.d.ts +146 -2
- package/resources/jobs.d.ts.map +1 -1
- package/resources/jobs.js +8 -4
- package/resources/jobs.js.map +1 -1
- package/resources/jobs.mjs +8 -4
- package/resources/jobs.mjs.map +1 -1
- package/resources/models/description.d.mts +10 -0
- package/resources/models/description.d.mts.map +1 -1
- package/resources/models/description.d.ts +10 -0
- package/resources/models/description.d.ts.map +1 -1
- package/resources/models/description.js +2 -2
- package/resources/models/description.js.map +1 -1
- package/resources/models/description.mjs +2 -2
- package/resources/models/description.mjs.map +1 -1
- package/resources/models/examples.d.mts +346 -1
- package/resources/models/examples.d.mts.map +1 -1
- package/resources/models/examples.d.ts +346 -1
- package/resources/models/examples.d.ts.map +1 -1
- package/resources/models/examples.js +2 -2
- package/resources/models/examples.js.map +1 -1
- package/resources/models/examples.mjs +2 -2
- package/resources/models/examples.mjs.map +1 -1
- package/resources/models/index.d.mts +1 -1
- package/resources/models/index.d.mts.map +1 -1
- package/resources/models/index.d.ts +1 -1
- package/resources/models/index.d.ts.map +1 -1
- package/resources/models/index.js.map +1 -1
- package/resources/models/index.mjs.map +1 -1
- package/resources/models/models.d.mts +71 -13
- package/resources/models/models.d.mts.map +1 -1
- package/resources/models/models.d.ts +71 -13
- package/resources/models/models.d.ts.map +1 -1
- package/resources/models/models.js +30 -18
- package/resources/models/models.js.map +1 -1
- package/resources/models/models.mjs +30 -18
- package/resources/models/models.mjs.map +1 -1
- package/resources/models/train.d.mts +93 -0
- package/resources/models/train.d.mts.map +1 -1
- package/resources/models/train.d.ts +93 -0
- package/resources/models/train.d.ts.map +1 -1
- package/resources/models/train.js +4 -4
- package/resources/models/train.js.map +1 -1
- package/resources/models/train.mjs +4 -4
- package/resources/models/train.mjs.map +1 -1
- package/resources/models/training-images.d.mts +22 -2
- package/resources/models/training-images.d.mts.map +1 -1
- package/resources/models/training-images.d.ts +22 -2
- package/resources/models/training-images.d.ts.map +1 -1
- package/resources/models/training-images.js +15 -8
- package/resources/models/training-images.js.map +1 -1
- package/resources/models/training-images.mjs +15 -8
- package/resources/models/training-images.mjs.map +1 -1
- package/resources/search.d.mts +10 -0
- package/resources/search.d.mts.map +1 -1
- package/resources/search.d.ts +10 -0
- package/resources/search.d.ts.map +1 -1
- package/resources/search.js +4 -4
- package/resources/search.js.map +1 -1
- package/resources/search.mjs +4 -4
- package/resources/search.mjs.map +1 -1
- package/resources/tags.d.mts +5 -0
- package/resources/tags.d.mts.map +1 -1
- package/resources/tags.d.ts +5 -0
- package/resources/tags.d.ts.map +1 -1
- package/resources/uploads.d.mts +35 -20
- package/resources/uploads.d.mts.map +1 -1
- package/resources/uploads.d.ts +35 -20
- package/resources/uploads.d.ts.map +1 -1
- package/resources/uploads.js +8 -6
- package/resources/uploads.js.map +1 -1
- package/resources/uploads.mjs +8 -6
- package/resources/uploads.mjs.map +1 -1
- package/resources/usages.d.mts +53 -10
- package/resources/usages.d.mts.map +1 -1
- package/resources/usages.d.ts +53 -10
- package/resources/usages.d.ts.map +1 -1
- package/resources/workflows.d.mts +446 -266
- package/resources/workflows.d.mts.map +1 -1
- package/resources/workflows.d.ts +446 -266
- package/resources/workflows.d.ts.map +1 -1
- package/resources/workflows.js +20 -12
- package/resources/workflows.js.map +1 -1
- package/resources/workflows.mjs +20 -12
- package/resources/workflows.mjs.map +1 -1
- package/src/client.ts +14 -0
- package/src/lib/job.ts +8 -3
- package/src/lib/upload.ts +5 -3
- package/src/lib/workflow.ts +3 -1
- package/src/lib/workflow_converter.ts +119 -24
- package/src/resources/assets/assets.ts +1310 -32
- package/src/resources/assets/download.ts +40 -7
- package/src/resources/assets/index.ts +1 -0
- package/src/resources/collections/assets.ts +29 -6
- package/src/resources/collections/collections.ts +59 -12
- package/src/resources/collections/index.ts +2 -0
- package/src/resources/collections/models.ts +29 -6
- package/src/resources/generate.ts +1247 -30
- package/src/resources/index.ts +7 -0
- package/src/resources/jobs.ts +169 -4
- package/src/resources/models/description.ts +14 -2
- package/src/resources/models/examples.ts +396 -3
- package/src/resources/models/index.ts +1 -0
- package/src/resources/models/models.ts +112 -26
- package/src/resources/models/train.ts +126 -4
- package/src/resources/models/training-images.ts +41 -10
- package/src/resources/search.ts +16 -4
- package/src/resources/tags.ts +6 -0
- package/src/resources/uploads.ts +47 -22
- package/src/resources/usages.ts +63 -10
- package/src/resources/workflows.ts +783 -563
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -14,9 +14,9 @@ export class Examples extends APIResource {
|
|
|
14
14
|
params: ExampleUpdateParams,
|
|
15
15
|
options?: RequestOptions,
|
|
16
16
|
): APIPromise<ExampleUpdateResponse> {
|
|
17
|
-
const { originalAssets, ...body } = params;
|
|
17
|
+
const { originalAssets, projectId, ...body } = params;
|
|
18
18
|
return this._client.put(path`/models/${modelID}/examples`, {
|
|
19
|
-
query: { originalAssets },
|
|
19
|
+
query: { originalAssets, projectId },
|
|
20
20
|
body,
|
|
21
21
|
...options,
|
|
22
22
|
});
|
|
@@ -313,6 +313,14 @@ export namespace ExampleUpdateResponse {
|
|
|
313
313
|
*/
|
|
314
314
|
preview?: Asset.Preview;
|
|
315
315
|
|
|
316
|
+
/**
|
|
317
|
+
* SlopGuard detection result, computed asynchronously after generation.
|
|
318
|
+
*
|
|
319
|
+
* `details` (the per-dimension reasons and suggestions) is returned only when the
|
|
320
|
+
* asset is read with `withSlopGuardDetails=true`.
|
|
321
|
+
*/
|
|
322
|
+
slopGuard?: Asset.SlopGuard;
|
|
323
|
+
|
|
316
324
|
/**
|
|
317
325
|
* The asset's thumbnail.
|
|
318
326
|
*
|
|
@@ -1229,6 +1237,140 @@ export namespace ExampleUpdateResponse {
|
|
|
1229
1237
|
url: string;
|
|
1230
1238
|
}
|
|
1231
1239
|
|
|
1240
|
+
/**
|
|
1241
|
+
* SlopGuard detection result, computed asynchronously after generation.
|
|
1242
|
+
*
|
|
1243
|
+
* `details` (the per-dimension reasons and suggestions) is returned only when the
|
|
1244
|
+
* asset is read with `withSlopGuardDetails=true`.
|
|
1245
|
+
*/
|
|
1246
|
+
export interface SlopGuard {
|
|
1247
|
+
/**
|
|
1248
|
+
* ISO-8601 timestamp of when scoring ran
|
|
1249
|
+
*/
|
|
1250
|
+
computedAt: string;
|
|
1251
|
+
|
|
1252
|
+
/**
|
|
1253
|
+
* Whether scoring succeeded or errored
|
|
1254
|
+
*/
|
|
1255
|
+
status: 'error' | 'scored';
|
|
1256
|
+
|
|
1257
|
+
/**
|
|
1258
|
+
* Rubric/model version that produced this result
|
|
1259
|
+
*/
|
|
1260
|
+
version: string;
|
|
1261
|
+
|
|
1262
|
+
/**
|
|
1263
|
+
* Generic AI-quality sub-score
|
|
1264
|
+
*/
|
|
1265
|
+
aiQualityScore?: number;
|
|
1266
|
+
|
|
1267
|
+
/**
|
|
1268
|
+
* Ids of briefs that contributed
|
|
1269
|
+
*/
|
|
1270
|
+
appliedBriefIds?: Array<string>;
|
|
1271
|
+
|
|
1272
|
+
/**
|
|
1273
|
+
* Brief-compliance sub-score (omitted when no brief applied)
|
|
1274
|
+
*/
|
|
1275
|
+
briefComplianceScore?: number;
|
|
1276
|
+
|
|
1277
|
+
/**
|
|
1278
|
+
* Per-dimension reasons and suggestions, as produced by the detector.
|
|
1279
|
+
*
|
|
1280
|
+
* Returned only when the asset is read with `withSlopGuardDetails=true` by the
|
|
1281
|
+
* project that owns it — the brief-compliance text paraphrases that project's
|
|
1282
|
+
* brief, so a cross-project read of a public asset gets the summary alone. Also
|
|
1283
|
+
* omitted when the archived verdict is unavailable (asset scored by an older
|
|
1284
|
+
* version, or an unreadable archive).
|
|
1285
|
+
*/
|
|
1286
|
+
details?: SlopGuard.Details;
|
|
1287
|
+
|
|
1288
|
+
/**
|
|
1289
|
+
* Error message when status is 'error' (truncated)
|
|
1290
|
+
*/
|
|
1291
|
+
error?: string;
|
|
1292
|
+
|
|
1293
|
+
/**
|
|
1294
|
+
* 0–100 composite score (present when status is 'scored')
|
|
1295
|
+
*/
|
|
1296
|
+
overallScore?: number;
|
|
1297
|
+
|
|
1298
|
+
/**
|
|
1299
|
+
* Sensitivity used for the verdict
|
|
1300
|
+
*/
|
|
1301
|
+
sensitivity?: 'high' | 'low' | 'medium';
|
|
1302
|
+
|
|
1303
|
+
/**
|
|
1304
|
+
* pass / warn / fail (present when status is 'scored')
|
|
1305
|
+
*/
|
|
1306
|
+
verdict?: 'fail' | 'pass' | 'warn';
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1309
|
+
export namespace SlopGuard {
|
|
1310
|
+
/**
|
|
1311
|
+
* Per-dimension reasons and suggestions, as produced by the detector.
|
|
1312
|
+
*
|
|
1313
|
+
* Returned only when the asset is read with `withSlopGuardDetails=true` by the
|
|
1314
|
+
* project that owns it — the brief-compliance text paraphrases that project's
|
|
1315
|
+
* brief, so a cross-project read of a public asset gets the summary alone. Also
|
|
1316
|
+
* omitted when the archived verdict is unavailable (asset scored by an older
|
|
1317
|
+
* version, or an unreadable archive).
|
|
1318
|
+
*/
|
|
1319
|
+
export interface Details {
|
|
1320
|
+
/**
|
|
1321
|
+
* Always-on generic AI-quality dimension
|
|
1322
|
+
*/
|
|
1323
|
+
aiQuality: Details.AIQuality;
|
|
1324
|
+
|
|
1325
|
+
/**
|
|
1326
|
+
* Brief-compliance dimension; omitted when no brief applied
|
|
1327
|
+
*/
|
|
1328
|
+
briefCompliance?: Details.BriefCompliance;
|
|
1329
|
+
}
|
|
1330
|
+
|
|
1331
|
+
export namespace Details {
|
|
1332
|
+
/**
|
|
1333
|
+
* Always-on generic AI-quality dimension
|
|
1334
|
+
*/
|
|
1335
|
+
export interface AIQuality {
|
|
1336
|
+
/**
|
|
1337
|
+
* Why the image scored as it did
|
|
1338
|
+
*/
|
|
1339
|
+
reasons: Array<string>;
|
|
1340
|
+
|
|
1341
|
+
/**
|
|
1342
|
+
* 0–100; higher is better (more compliant / less AI-looking)
|
|
1343
|
+
*/
|
|
1344
|
+
score: number;
|
|
1345
|
+
|
|
1346
|
+
/**
|
|
1347
|
+
* Actionable suggestions to improve the score
|
|
1348
|
+
*/
|
|
1349
|
+
suggestions: Array<string>;
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1352
|
+
/**
|
|
1353
|
+
* Brief-compliance dimension; omitted when no brief applied
|
|
1354
|
+
*/
|
|
1355
|
+
export interface BriefCompliance {
|
|
1356
|
+
/**
|
|
1357
|
+
* Why the image scored as it did
|
|
1358
|
+
*/
|
|
1359
|
+
reasons: Array<string>;
|
|
1360
|
+
|
|
1361
|
+
/**
|
|
1362
|
+
* 0–100; higher is better (more compliant / less AI-looking)
|
|
1363
|
+
*/
|
|
1364
|
+
score: number;
|
|
1365
|
+
|
|
1366
|
+
/**
|
|
1367
|
+
* Actionable suggestions to improve the score
|
|
1368
|
+
*/
|
|
1369
|
+
suggestions: Array<string>;
|
|
1370
|
+
}
|
|
1371
|
+
}
|
|
1372
|
+
}
|
|
1373
|
+
|
|
1232
1374
|
/**
|
|
1233
1375
|
* The asset's thumbnail.
|
|
1234
1376
|
*
|
|
@@ -2534,6 +2676,27 @@ export namespace ExampleUpdateResponse {
|
|
|
2534
2676
|
|
|
2535
2677
|
cuDiscount: number;
|
|
2536
2678
|
|
|
2679
|
+
/**
|
|
2680
|
+
* Compute Units charged for the ADD-ONS of this job, per action — the fees paid on
|
|
2681
|
+
* top of the generation itself, such as `slop-detection`.
|
|
2682
|
+
*
|
|
2683
|
+
* `cuCost` above is the main action alone, so the job's total is `cuCost` plus the
|
|
2684
|
+
* values here.
|
|
2685
|
+
*
|
|
2686
|
+
* Two caveats when displaying it:
|
|
2687
|
+
*
|
|
2688
|
+
* - These are a remaining refundable balance, not a receipt: a job that failed or
|
|
2689
|
+
* was cancelled has had its add-ons refunded, so they read 0 while `cuCost`
|
|
2690
|
+
* still shows the main action's original charge.
|
|
2691
|
+
* - `ip-detection` is part of the shape but is never populated today: that fee is
|
|
2692
|
+
* charged outside the job and reported once, as
|
|
2693
|
+
* `ipDetection.creativeUnitsCharged`, in the response of the request that ran
|
|
2694
|
+
* it.
|
|
2695
|
+
*
|
|
2696
|
+
* Absent when the job paid for no add-on.
|
|
2697
|
+
*/
|
|
2698
|
+
cuCostDetails?: Billing.CuCostDetails;
|
|
2699
|
+
|
|
2537
2700
|
/**
|
|
2538
2701
|
* When true, the credits charged for this job are not automatically refunded if
|
|
2539
2702
|
* the generation fails, because the model used does not support refund-on-failure.
|
|
@@ -2541,6 +2704,33 @@ export namespace ExampleUpdateResponse {
|
|
|
2541
2704
|
*/
|
|
2542
2705
|
disableRefund?: boolean;
|
|
2543
2706
|
}
|
|
2707
|
+
|
|
2708
|
+
export namespace Billing {
|
|
2709
|
+
/**
|
|
2710
|
+
* Compute Units charged for the ADD-ONS of this job, per action — the fees paid on
|
|
2711
|
+
* top of the generation itself, such as `slop-detection`.
|
|
2712
|
+
*
|
|
2713
|
+
* `cuCost` above is the main action alone, so the job's total is `cuCost` plus the
|
|
2714
|
+
* values here.
|
|
2715
|
+
*
|
|
2716
|
+
* Two caveats when displaying it:
|
|
2717
|
+
*
|
|
2718
|
+
* - These are a remaining refundable balance, not a receipt: a job that failed or
|
|
2719
|
+
* was cancelled has had its add-ons refunded, so they read 0 while `cuCost`
|
|
2720
|
+
* still shows the main action's original charge.
|
|
2721
|
+
* - `ip-detection` is part of the shape but is never populated today: that fee is
|
|
2722
|
+
* charged outside the job and reported once, as
|
|
2723
|
+
* `ipDetection.creativeUnitsCharged`, in the response of the request that ran
|
|
2724
|
+
* it.
|
|
2725
|
+
*
|
|
2726
|
+
* Absent when the job paid for no add-on.
|
|
2727
|
+
*/
|
|
2728
|
+
export interface CuCostDetails {
|
|
2729
|
+
'ip-detection'?: number;
|
|
2730
|
+
|
|
2731
|
+
'slop-detection'?: number;
|
|
2732
|
+
}
|
|
2733
|
+
}
|
|
2544
2734
|
}
|
|
2545
2735
|
}
|
|
2546
2736
|
}
|
|
@@ -2824,6 +3014,14 @@ export namespace ExampleListResponse {
|
|
|
2824
3014
|
*/
|
|
2825
3015
|
preview?: Asset.Preview;
|
|
2826
3016
|
|
|
3017
|
+
/**
|
|
3018
|
+
* SlopGuard detection result, computed asynchronously after generation.
|
|
3019
|
+
*
|
|
3020
|
+
* `details` (the per-dimension reasons and suggestions) is returned only when the
|
|
3021
|
+
* asset is read with `withSlopGuardDetails=true`.
|
|
3022
|
+
*/
|
|
3023
|
+
slopGuard?: Asset.SlopGuard;
|
|
3024
|
+
|
|
2827
3025
|
/**
|
|
2828
3026
|
* The asset's thumbnail.
|
|
2829
3027
|
*
|
|
@@ -3740,6 +3938,140 @@ export namespace ExampleListResponse {
|
|
|
3740
3938
|
url: string;
|
|
3741
3939
|
}
|
|
3742
3940
|
|
|
3941
|
+
/**
|
|
3942
|
+
* SlopGuard detection result, computed asynchronously after generation.
|
|
3943
|
+
*
|
|
3944
|
+
* `details` (the per-dimension reasons and suggestions) is returned only when the
|
|
3945
|
+
* asset is read with `withSlopGuardDetails=true`.
|
|
3946
|
+
*/
|
|
3947
|
+
export interface SlopGuard {
|
|
3948
|
+
/**
|
|
3949
|
+
* ISO-8601 timestamp of when scoring ran
|
|
3950
|
+
*/
|
|
3951
|
+
computedAt: string;
|
|
3952
|
+
|
|
3953
|
+
/**
|
|
3954
|
+
* Whether scoring succeeded or errored
|
|
3955
|
+
*/
|
|
3956
|
+
status: 'error' | 'scored';
|
|
3957
|
+
|
|
3958
|
+
/**
|
|
3959
|
+
* Rubric/model version that produced this result
|
|
3960
|
+
*/
|
|
3961
|
+
version: string;
|
|
3962
|
+
|
|
3963
|
+
/**
|
|
3964
|
+
* Generic AI-quality sub-score
|
|
3965
|
+
*/
|
|
3966
|
+
aiQualityScore?: number;
|
|
3967
|
+
|
|
3968
|
+
/**
|
|
3969
|
+
* Ids of briefs that contributed
|
|
3970
|
+
*/
|
|
3971
|
+
appliedBriefIds?: Array<string>;
|
|
3972
|
+
|
|
3973
|
+
/**
|
|
3974
|
+
* Brief-compliance sub-score (omitted when no brief applied)
|
|
3975
|
+
*/
|
|
3976
|
+
briefComplianceScore?: number;
|
|
3977
|
+
|
|
3978
|
+
/**
|
|
3979
|
+
* Per-dimension reasons and suggestions, as produced by the detector.
|
|
3980
|
+
*
|
|
3981
|
+
* Returned only when the asset is read with `withSlopGuardDetails=true` by the
|
|
3982
|
+
* project that owns it — the brief-compliance text paraphrases that project's
|
|
3983
|
+
* brief, so a cross-project read of a public asset gets the summary alone. Also
|
|
3984
|
+
* omitted when the archived verdict is unavailable (asset scored by an older
|
|
3985
|
+
* version, or an unreadable archive).
|
|
3986
|
+
*/
|
|
3987
|
+
details?: SlopGuard.Details;
|
|
3988
|
+
|
|
3989
|
+
/**
|
|
3990
|
+
* Error message when status is 'error' (truncated)
|
|
3991
|
+
*/
|
|
3992
|
+
error?: string;
|
|
3993
|
+
|
|
3994
|
+
/**
|
|
3995
|
+
* 0–100 composite score (present when status is 'scored')
|
|
3996
|
+
*/
|
|
3997
|
+
overallScore?: number;
|
|
3998
|
+
|
|
3999
|
+
/**
|
|
4000
|
+
* Sensitivity used for the verdict
|
|
4001
|
+
*/
|
|
4002
|
+
sensitivity?: 'high' | 'low' | 'medium';
|
|
4003
|
+
|
|
4004
|
+
/**
|
|
4005
|
+
* pass / warn / fail (present when status is 'scored')
|
|
4006
|
+
*/
|
|
4007
|
+
verdict?: 'fail' | 'pass' | 'warn';
|
|
4008
|
+
}
|
|
4009
|
+
|
|
4010
|
+
export namespace SlopGuard {
|
|
4011
|
+
/**
|
|
4012
|
+
* Per-dimension reasons and suggestions, as produced by the detector.
|
|
4013
|
+
*
|
|
4014
|
+
* Returned only when the asset is read with `withSlopGuardDetails=true` by the
|
|
4015
|
+
* project that owns it — the brief-compliance text paraphrases that project's
|
|
4016
|
+
* brief, so a cross-project read of a public asset gets the summary alone. Also
|
|
4017
|
+
* omitted when the archived verdict is unavailable (asset scored by an older
|
|
4018
|
+
* version, or an unreadable archive).
|
|
4019
|
+
*/
|
|
4020
|
+
export interface Details {
|
|
4021
|
+
/**
|
|
4022
|
+
* Always-on generic AI-quality dimension
|
|
4023
|
+
*/
|
|
4024
|
+
aiQuality: Details.AIQuality;
|
|
4025
|
+
|
|
4026
|
+
/**
|
|
4027
|
+
* Brief-compliance dimension; omitted when no brief applied
|
|
4028
|
+
*/
|
|
4029
|
+
briefCompliance?: Details.BriefCompliance;
|
|
4030
|
+
}
|
|
4031
|
+
|
|
4032
|
+
export namespace Details {
|
|
4033
|
+
/**
|
|
4034
|
+
* Always-on generic AI-quality dimension
|
|
4035
|
+
*/
|
|
4036
|
+
export interface AIQuality {
|
|
4037
|
+
/**
|
|
4038
|
+
* Why the image scored as it did
|
|
4039
|
+
*/
|
|
4040
|
+
reasons: Array<string>;
|
|
4041
|
+
|
|
4042
|
+
/**
|
|
4043
|
+
* 0–100; higher is better (more compliant / less AI-looking)
|
|
4044
|
+
*/
|
|
4045
|
+
score: number;
|
|
4046
|
+
|
|
4047
|
+
/**
|
|
4048
|
+
* Actionable suggestions to improve the score
|
|
4049
|
+
*/
|
|
4050
|
+
suggestions: Array<string>;
|
|
4051
|
+
}
|
|
4052
|
+
|
|
4053
|
+
/**
|
|
4054
|
+
* Brief-compliance dimension; omitted when no brief applied
|
|
4055
|
+
*/
|
|
4056
|
+
export interface BriefCompliance {
|
|
4057
|
+
/**
|
|
4058
|
+
* Why the image scored as it did
|
|
4059
|
+
*/
|
|
4060
|
+
reasons: Array<string>;
|
|
4061
|
+
|
|
4062
|
+
/**
|
|
4063
|
+
* 0–100; higher is better (more compliant / less AI-looking)
|
|
4064
|
+
*/
|
|
4065
|
+
score: number;
|
|
4066
|
+
|
|
4067
|
+
/**
|
|
4068
|
+
* Actionable suggestions to improve the score
|
|
4069
|
+
*/
|
|
4070
|
+
suggestions: Array<string>;
|
|
4071
|
+
}
|
|
4072
|
+
}
|
|
4073
|
+
}
|
|
4074
|
+
|
|
3743
4075
|
/**
|
|
3744
4076
|
* The asset's thumbnail.
|
|
3745
4077
|
*
|
|
@@ -5045,6 +5377,27 @@ export namespace ExampleListResponse {
|
|
|
5045
5377
|
|
|
5046
5378
|
cuDiscount: number;
|
|
5047
5379
|
|
|
5380
|
+
/**
|
|
5381
|
+
* Compute Units charged for the ADD-ONS of this job, per action — the fees paid on
|
|
5382
|
+
* top of the generation itself, such as `slop-detection`.
|
|
5383
|
+
*
|
|
5384
|
+
* `cuCost` above is the main action alone, so the job's total is `cuCost` plus the
|
|
5385
|
+
* values here.
|
|
5386
|
+
*
|
|
5387
|
+
* Two caveats when displaying it:
|
|
5388
|
+
*
|
|
5389
|
+
* - These are a remaining refundable balance, not a receipt: a job that failed or
|
|
5390
|
+
* was cancelled has had its add-ons refunded, so they read 0 while `cuCost`
|
|
5391
|
+
* still shows the main action's original charge.
|
|
5392
|
+
* - `ip-detection` is part of the shape but is never populated today: that fee is
|
|
5393
|
+
* charged outside the job and reported once, as
|
|
5394
|
+
* `ipDetection.creativeUnitsCharged`, in the response of the request that ran
|
|
5395
|
+
* it.
|
|
5396
|
+
*
|
|
5397
|
+
* Absent when the job paid for no add-on.
|
|
5398
|
+
*/
|
|
5399
|
+
cuCostDetails?: Billing.CuCostDetails;
|
|
5400
|
+
|
|
5048
5401
|
/**
|
|
5049
5402
|
* When true, the credits charged for this job are not automatically refunded if
|
|
5050
5403
|
* the generation fails, because the model used does not support refund-on-failure.
|
|
@@ -5052,13 +5405,41 @@ export namespace ExampleListResponse {
|
|
|
5052
5405
|
*/
|
|
5053
5406
|
disableRefund?: boolean;
|
|
5054
5407
|
}
|
|
5408
|
+
|
|
5409
|
+
export namespace Billing {
|
|
5410
|
+
/**
|
|
5411
|
+
* Compute Units charged for the ADD-ONS of this job, per action — the fees paid on
|
|
5412
|
+
* top of the generation itself, such as `slop-detection`.
|
|
5413
|
+
*
|
|
5414
|
+
* `cuCost` above is the main action alone, so the job's total is `cuCost` plus the
|
|
5415
|
+
* values here.
|
|
5416
|
+
*
|
|
5417
|
+
* Two caveats when displaying it:
|
|
5418
|
+
*
|
|
5419
|
+
* - These are a remaining refundable balance, not a receipt: a job that failed or
|
|
5420
|
+
* was cancelled has had its add-ons refunded, so they read 0 while `cuCost`
|
|
5421
|
+
* still shows the main action's original charge.
|
|
5422
|
+
* - `ip-detection` is part of the shape but is never populated today: that fee is
|
|
5423
|
+
* charged outside the job and reported once, as
|
|
5424
|
+
* `ipDetection.creativeUnitsCharged`, in the response of the request that ran
|
|
5425
|
+
* it.
|
|
5426
|
+
*
|
|
5427
|
+
* Absent when the job paid for no add-on.
|
|
5428
|
+
*/
|
|
5429
|
+
export interface CuCostDetails {
|
|
5430
|
+
'ip-detection'?: number;
|
|
5431
|
+
|
|
5432
|
+
'slop-detection'?: number;
|
|
5433
|
+
}
|
|
5434
|
+
}
|
|
5055
5435
|
}
|
|
5056
5436
|
}
|
|
5057
5437
|
}
|
|
5058
5438
|
|
|
5059
5439
|
export interface ExampleUpdateParams {
|
|
5060
5440
|
/**
|
|
5061
|
-
* Body param: The list of asset ids to use as examples of the model
|
|
5441
|
+
* Body param: The list of asset ids to use as examples of the model. Maximum of
|
|
5442
|
+
* 150 asset ids.
|
|
5062
5443
|
*/
|
|
5063
5444
|
assetIds: Array<string>;
|
|
5064
5445
|
|
|
@@ -5066,6 +5447,12 @@ export interface ExampleUpdateParams {
|
|
|
5066
5447
|
* Query param: If set to true, returns the original asset without transformation
|
|
5067
5448
|
*/
|
|
5068
5449
|
originalAssets?: boolean;
|
|
5450
|
+
|
|
5451
|
+
/**
|
|
5452
|
+
* Query param: The projectId used for ownership resource management. Either to
|
|
5453
|
+
* assert ownership or to set the owner of the resource(s)
|
|
5454
|
+
*/
|
|
5455
|
+
projectId?: string;
|
|
5069
5456
|
}
|
|
5070
5457
|
|
|
5071
5458
|
export interface ExampleListParams {
|
|
@@ -5073,6 +5460,12 @@ export interface ExampleListParams {
|
|
|
5073
5460
|
* If set to true, returns the original asset without transformation
|
|
5074
5461
|
*/
|
|
5075
5462
|
originalAssets?: boolean;
|
|
5463
|
+
|
|
5464
|
+
/**
|
|
5465
|
+
* The projectId used for ownership resource management. Either to assert ownership
|
|
5466
|
+
* or to set the owner of the resource(s)
|
|
5467
|
+
*/
|
|
5468
|
+
projectId?: string;
|
|
5076
5469
|
}
|
|
5077
5470
|
|
|
5078
5471
|
export declare namespace Examples {
|