@scenario-labs/sdk 2.3.0 → 2.4.0-alpha.1
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 +24 -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/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 +9 -3
- 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/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/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
package/resources/generate.d.mts
CHANGED
|
@@ -63,6 +63,10 @@ export interface GenerateCaptionResponse {
|
|
|
63
63
|
* ignored.
|
|
64
64
|
*/
|
|
65
65
|
detailsLevel?: 'action' | 'action+style';
|
|
66
|
+
/**
|
|
67
|
+
* IP detection findings, when detection ran for this request.
|
|
68
|
+
*/
|
|
69
|
+
ipDetection?: GenerateCaptionResponse.IPDetection;
|
|
66
70
|
}
|
|
67
71
|
export declare namespace GenerateCaptionResponse {
|
|
68
72
|
interface Job {
|
|
@@ -748,6 +752,71 @@ export declare namespace GenerateCaptionResponse {
|
|
|
748
752
|
cuDiscount: number;
|
|
749
753
|
}
|
|
750
754
|
}
|
|
755
|
+
/**
|
|
756
|
+
* IP detection findings, when detection ran for this request.
|
|
757
|
+
*/
|
|
758
|
+
interface IPDetection {
|
|
759
|
+
/**
|
|
760
|
+
* Whether and how detection affected the request.
|
|
761
|
+
*/
|
|
762
|
+
action: 'allowed' | 'blocked' | 'flagged';
|
|
763
|
+
/**
|
|
764
|
+
* IP-detection CU fee, separate from creativeUnitsCost: a fixed base fee plus a
|
|
765
|
+
* per-image fee for each analyzed input image.
|
|
766
|
+
*/
|
|
767
|
+
creativeUnitsCharged: number;
|
|
768
|
+
/**
|
|
769
|
+
* Number of enabled filters evaluated for this request.
|
|
770
|
+
*/
|
|
771
|
+
evaluatedFilters: number;
|
|
772
|
+
/**
|
|
773
|
+
* Per-filter verdicts gathered for this request.
|
|
774
|
+
*/
|
|
775
|
+
findings: Array<IPDetection.Finding>;
|
|
776
|
+
/**
|
|
777
|
+
* Convenience flag; always true when action is not 'allowed'.
|
|
778
|
+
*/
|
|
779
|
+
flagged: boolean;
|
|
780
|
+
/**
|
|
781
|
+
* True if one or more detectors errored while evaluating this request.
|
|
782
|
+
*/
|
|
783
|
+
hasDetectorError?: boolean;
|
|
784
|
+
}
|
|
785
|
+
namespace IPDetection {
|
|
786
|
+
/**
|
|
787
|
+
* A single filter's verdict.
|
|
788
|
+
*/
|
|
789
|
+
interface Finding {
|
|
790
|
+
/**
|
|
791
|
+
* Category of the filter that produced this verdict.
|
|
792
|
+
*/
|
|
793
|
+
category: 'artist-style' | 'brand-trademark' | 'celebrity-likeness' | 'custom' | 'fictional-character';
|
|
794
|
+
/**
|
|
795
|
+
* Confidence score from 0 (low) to 1 (high).
|
|
796
|
+
*/
|
|
797
|
+
confidence: number;
|
|
798
|
+
/**
|
|
799
|
+
* Identifier of the filter that produced this verdict.
|
|
800
|
+
*/
|
|
801
|
+
filterId: string;
|
|
802
|
+
/**
|
|
803
|
+
* Display name of the filter that produced this verdict.
|
|
804
|
+
*/
|
|
805
|
+
filterName: string;
|
|
806
|
+
/**
|
|
807
|
+
* Whether this filter considered the request an IP risk.
|
|
808
|
+
*/
|
|
809
|
+
flagged: boolean;
|
|
810
|
+
/**
|
|
811
|
+
* Short, user-facing explanation of the verdict.
|
|
812
|
+
*/
|
|
813
|
+
reason: string;
|
|
814
|
+
/**
|
|
815
|
+
* Named entities the filter recognized (e.g. characters, brands, people).
|
|
816
|
+
*/
|
|
817
|
+
entities?: Array<string>;
|
|
818
|
+
}
|
|
819
|
+
}
|
|
751
820
|
}
|
|
752
821
|
export interface GenerateDescribeStyleResponse {
|
|
753
822
|
/**
|
|
@@ -767,6 +836,10 @@ export interface GenerateDescribeStyleResponse {
|
|
|
767
836
|
* The Creative Units discount for the request billed
|
|
768
837
|
*/
|
|
769
838
|
creativeUnitsDiscount?: number;
|
|
839
|
+
/**
|
|
840
|
+
* IP detection findings, when detection ran for this request.
|
|
841
|
+
*/
|
|
842
|
+
ipDetection?: GenerateDescribeStyleResponse.IPDetection;
|
|
770
843
|
}
|
|
771
844
|
export declare namespace GenerateDescribeStyleResponse {
|
|
772
845
|
interface Job {
|
|
@@ -1452,6 +1525,71 @@ export declare namespace GenerateDescribeStyleResponse {
|
|
|
1452
1525
|
cuDiscount: number;
|
|
1453
1526
|
}
|
|
1454
1527
|
}
|
|
1528
|
+
/**
|
|
1529
|
+
* IP detection findings, when detection ran for this request.
|
|
1530
|
+
*/
|
|
1531
|
+
interface IPDetection {
|
|
1532
|
+
/**
|
|
1533
|
+
* Whether and how detection affected the request.
|
|
1534
|
+
*/
|
|
1535
|
+
action: 'allowed' | 'blocked' | 'flagged';
|
|
1536
|
+
/**
|
|
1537
|
+
* IP-detection CU fee, separate from creativeUnitsCost: a fixed base fee plus a
|
|
1538
|
+
* per-image fee for each analyzed input image.
|
|
1539
|
+
*/
|
|
1540
|
+
creativeUnitsCharged: number;
|
|
1541
|
+
/**
|
|
1542
|
+
* Number of enabled filters evaluated for this request.
|
|
1543
|
+
*/
|
|
1544
|
+
evaluatedFilters: number;
|
|
1545
|
+
/**
|
|
1546
|
+
* Per-filter verdicts gathered for this request.
|
|
1547
|
+
*/
|
|
1548
|
+
findings: Array<IPDetection.Finding>;
|
|
1549
|
+
/**
|
|
1550
|
+
* Convenience flag; always true when action is not 'allowed'.
|
|
1551
|
+
*/
|
|
1552
|
+
flagged: boolean;
|
|
1553
|
+
/**
|
|
1554
|
+
* True if one or more detectors errored while evaluating this request.
|
|
1555
|
+
*/
|
|
1556
|
+
hasDetectorError?: boolean;
|
|
1557
|
+
}
|
|
1558
|
+
namespace IPDetection {
|
|
1559
|
+
/**
|
|
1560
|
+
* A single filter's verdict.
|
|
1561
|
+
*/
|
|
1562
|
+
interface Finding {
|
|
1563
|
+
/**
|
|
1564
|
+
* Category of the filter that produced this verdict.
|
|
1565
|
+
*/
|
|
1566
|
+
category: 'artist-style' | 'brand-trademark' | 'celebrity-likeness' | 'custom' | 'fictional-character';
|
|
1567
|
+
/**
|
|
1568
|
+
* Confidence score from 0 (low) to 1 (high).
|
|
1569
|
+
*/
|
|
1570
|
+
confidence: number;
|
|
1571
|
+
/**
|
|
1572
|
+
* Identifier of the filter that produced this verdict.
|
|
1573
|
+
*/
|
|
1574
|
+
filterId: string;
|
|
1575
|
+
/**
|
|
1576
|
+
* Display name of the filter that produced this verdict.
|
|
1577
|
+
*/
|
|
1578
|
+
filterName: string;
|
|
1579
|
+
/**
|
|
1580
|
+
* Whether this filter considered the request an IP risk.
|
|
1581
|
+
*/
|
|
1582
|
+
flagged: boolean;
|
|
1583
|
+
/**
|
|
1584
|
+
* Short, user-facing explanation of the verdict.
|
|
1585
|
+
*/
|
|
1586
|
+
reason: string;
|
|
1587
|
+
/**
|
|
1588
|
+
* Named entities the filter recognized (e.g. characters, brands, people).
|
|
1589
|
+
*/
|
|
1590
|
+
entities?: Array<string>;
|
|
1591
|
+
}
|
|
1592
|
+
}
|
|
1455
1593
|
}
|
|
1456
1594
|
export interface GenerateDetectResponse {
|
|
1457
1595
|
job: GenerateDetectResponse.Job;
|
|
@@ -1464,6 +1602,10 @@ export interface GenerateDetectResponse {
|
|
|
1464
1602
|
* The Creative Units discount for the request billed
|
|
1465
1603
|
*/
|
|
1466
1604
|
creativeUnitsDiscount?: number;
|
|
1605
|
+
/**
|
|
1606
|
+
* IP detection findings, when detection ran for this request.
|
|
1607
|
+
*/
|
|
1608
|
+
ipDetection?: GenerateDetectResponse.IPDetection;
|
|
1467
1609
|
}
|
|
1468
1610
|
export declare namespace GenerateDetectResponse {
|
|
1469
1611
|
interface Job {
|
|
@@ -2870,6 +3012,71 @@ export declare namespace GenerateDetectResponse {
|
|
|
2870
3012
|
url: string;
|
|
2871
3013
|
}
|
|
2872
3014
|
}
|
|
3015
|
+
/**
|
|
3016
|
+
* IP detection findings, when detection ran for this request.
|
|
3017
|
+
*/
|
|
3018
|
+
interface IPDetection {
|
|
3019
|
+
/**
|
|
3020
|
+
* Whether and how detection affected the request.
|
|
3021
|
+
*/
|
|
3022
|
+
action: 'allowed' | 'blocked' | 'flagged';
|
|
3023
|
+
/**
|
|
3024
|
+
* IP-detection CU fee, separate from creativeUnitsCost: a fixed base fee plus a
|
|
3025
|
+
* per-image fee for each analyzed input image.
|
|
3026
|
+
*/
|
|
3027
|
+
creativeUnitsCharged: number;
|
|
3028
|
+
/**
|
|
3029
|
+
* Number of enabled filters evaluated for this request.
|
|
3030
|
+
*/
|
|
3031
|
+
evaluatedFilters: number;
|
|
3032
|
+
/**
|
|
3033
|
+
* Per-filter verdicts gathered for this request.
|
|
3034
|
+
*/
|
|
3035
|
+
findings: Array<IPDetection.Finding>;
|
|
3036
|
+
/**
|
|
3037
|
+
* Convenience flag; always true when action is not 'allowed'.
|
|
3038
|
+
*/
|
|
3039
|
+
flagged: boolean;
|
|
3040
|
+
/**
|
|
3041
|
+
* True if one or more detectors errored while evaluating this request.
|
|
3042
|
+
*/
|
|
3043
|
+
hasDetectorError?: boolean;
|
|
3044
|
+
}
|
|
3045
|
+
namespace IPDetection {
|
|
3046
|
+
/**
|
|
3047
|
+
* A single filter's verdict.
|
|
3048
|
+
*/
|
|
3049
|
+
interface Finding {
|
|
3050
|
+
/**
|
|
3051
|
+
* Category of the filter that produced this verdict.
|
|
3052
|
+
*/
|
|
3053
|
+
category: 'artist-style' | 'brand-trademark' | 'celebrity-likeness' | 'custom' | 'fictional-character';
|
|
3054
|
+
/**
|
|
3055
|
+
* Confidence score from 0 (low) to 1 (high).
|
|
3056
|
+
*/
|
|
3057
|
+
confidence: number;
|
|
3058
|
+
/**
|
|
3059
|
+
* Identifier of the filter that produced this verdict.
|
|
3060
|
+
*/
|
|
3061
|
+
filterId: string;
|
|
3062
|
+
/**
|
|
3063
|
+
* Display name of the filter that produced this verdict.
|
|
3064
|
+
*/
|
|
3065
|
+
filterName: string;
|
|
3066
|
+
/**
|
|
3067
|
+
* Whether this filter considered the request an IP risk.
|
|
3068
|
+
*/
|
|
3069
|
+
flagged: boolean;
|
|
3070
|
+
/**
|
|
3071
|
+
* Short, user-facing explanation of the verdict.
|
|
3072
|
+
*/
|
|
3073
|
+
reason: string;
|
|
3074
|
+
/**
|
|
3075
|
+
* Named entities the filter recognized (e.g. characters, brands, people).
|
|
3076
|
+
*/
|
|
3077
|
+
entities?: Array<string>;
|
|
3078
|
+
}
|
|
3079
|
+
}
|
|
2873
3080
|
}
|
|
2874
3081
|
export interface GenerateEmbedResponse {
|
|
2875
3082
|
/**
|
|
@@ -2887,6 +3094,10 @@ export interface GenerateEmbedResponse {
|
|
|
2887
3094
|
* The Creative Units discount for the request billed
|
|
2888
3095
|
*/
|
|
2889
3096
|
creativeUnitsDiscount?: number;
|
|
3097
|
+
/**
|
|
3098
|
+
* IP detection findings, when detection ran for this request.
|
|
3099
|
+
*/
|
|
3100
|
+
ipDetection?: GenerateEmbedResponse.IPDetection;
|
|
2890
3101
|
}
|
|
2891
3102
|
export declare namespace GenerateEmbedResponse {
|
|
2892
3103
|
interface Job {
|
|
@@ -3572,6 +3783,71 @@ export declare namespace GenerateEmbedResponse {
|
|
|
3572
3783
|
cuDiscount: number;
|
|
3573
3784
|
}
|
|
3574
3785
|
}
|
|
3786
|
+
/**
|
|
3787
|
+
* IP detection findings, when detection ran for this request.
|
|
3788
|
+
*/
|
|
3789
|
+
interface IPDetection {
|
|
3790
|
+
/**
|
|
3791
|
+
* Whether and how detection affected the request.
|
|
3792
|
+
*/
|
|
3793
|
+
action: 'allowed' | 'blocked' | 'flagged';
|
|
3794
|
+
/**
|
|
3795
|
+
* IP-detection CU fee, separate from creativeUnitsCost: a fixed base fee plus a
|
|
3796
|
+
* per-image fee for each analyzed input image.
|
|
3797
|
+
*/
|
|
3798
|
+
creativeUnitsCharged: number;
|
|
3799
|
+
/**
|
|
3800
|
+
* Number of enabled filters evaluated for this request.
|
|
3801
|
+
*/
|
|
3802
|
+
evaluatedFilters: number;
|
|
3803
|
+
/**
|
|
3804
|
+
* Per-filter verdicts gathered for this request.
|
|
3805
|
+
*/
|
|
3806
|
+
findings: Array<IPDetection.Finding>;
|
|
3807
|
+
/**
|
|
3808
|
+
* Convenience flag; always true when action is not 'allowed'.
|
|
3809
|
+
*/
|
|
3810
|
+
flagged: boolean;
|
|
3811
|
+
/**
|
|
3812
|
+
* True if one or more detectors errored while evaluating this request.
|
|
3813
|
+
*/
|
|
3814
|
+
hasDetectorError?: boolean;
|
|
3815
|
+
}
|
|
3816
|
+
namespace IPDetection {
|
|
3817
|
+
/**
|
|
3818
|
+
* A single filter's verdict.
|
|
3819
|
+
*/
|
|
3820
|
+
interface Finding {
|
|
3821
|
+
/**
|
|
3822
|
+
* Category of the filter that produced this verdict.
|
|
3823
|
+
*/
|
|
3824
|
+
category: 'artist-style' | 'brand-trademark' | 'celebrity-likeness' | 'custom' | 'fictional-character';
|
|
3825
|
+
/**
|
|
3826
|
+
* Confidence score from 0 (low) to 1 (high).
|
|
3827
|
+
*/
|
|
3828
|
+
confidence: number;
|
|
3829
|
+
/**
|
|
3830
|
+
* Identifier of the filter that produced this verdict.
|
|
3831
|
+
*/
|
|
3832
|
+
filterId: string;
|
|
3833
|
+
/**
|
|
3834
|
+
* Display name of the filter that produced this verdict.
|
|
3835
|
+
*/
|
|
3836
|
+
filterName: string;
|
|
3837
|
+
/**
|
|
3838
|
+
* Whether this filter considered the request an IP risk.
|
|
3839
|
+
*/
|
|
3840
|
+
flagged: boolean;
|
|
3841
|
+
/**
|
|
3842
|
+
* Short, user-facing explanation of the verdict.
|
|
3843
|
+
*/
|
|
3844
|
+
reason: string;
|
|
3845
|
+
/**
|
|
3846
|
+
* Named entities the filter recognized (e.g. characters, brands, people).
|
|
3847
|
+
*/
|
|
3848
|
+
entities?: Array<string>;
|
|
3849
|
+
}
|
|
3850
|
+
}
|
|
3575
3851
|
}
|
|
3576
3852
|
export interface GeneratePatchResponse {
|
|
3577
3853
|
job: GeneratePatchResponse.Job;
|
|
@@ -3584,6 +3860,10 @@ export interface GeneratePatchResponse {
|
|
|
3584
3860
|
* The Creative Units discount for the request billed
|
|
3585
3861
|
*/
|
|
3586
3862
|
creativeUnitsDiscount?: number;
|
|
3863
|
+
/**
|
|
3864
|
+
* IP detection findings, when detection ran for this request.
|
|
3865
|
+
*/
|
|
3866
|
+
ipDetection?: GeneratePatchResponse.IPDetection;
|
|
3587
3867
|
}
|
|
3588
3868
|
export declare namespace GeneratePatchResponse {
|
|
3589
3869
|
interface Job {
|
|
@@ -4990,6 +5270,71 @@ export declare namespace GeneratePatchResponse {
|
|
|
4990
5270
|
url: string;
|
|
4991
5271
|
}
|
|
4992
5272
|
}
|
|
5273
|
+
/**
|
|
5274
|
+
* IP detection findings, when detection ran for this request.
|
|
5275
|
+
*/
|
|
5276
|
+
interface IPDetection {
|
|
5277
|
+
/**
|
|
5278
|
+
* Whether and how detection affected the request.
|
|
5279
|
+
*/
|
|
5280
|
+
action: 'allowed' | 'blocked' | 'flagged';
|
|
5281
|
+
/**
|
|
5282
|
+
* IP-detection CU fee, separate from creativeUnitsCost: a fixed base fee plus a
|
|
5283
|
+
* per-image fee for each analyzed input image.
|
|
5284
|
+
*/
|
|
5285
|
+
creativeUnitsCharged: number;
|
|
5286
|
+
/**
|
|
5287
|
+
* Number of enabled filters evaluated for this request.
|
|
5288
|
+
*/
|
|
5289
|
+
evaluatedFilters: number;
|
|
5290
|
+
/**
|
|
5291
|
+
* Per-filter verdicts gathered for this request.
|
|
5292
|
+
*/
|
|
5293
|
+
findings: Array<IPDetection.Finding>;
|
|
5294
|
+
/**
|
|
5295
|
+
* Convenience flag; always true when action is not 'allowed'.
|
|
5296
|
+
*/
|
|
5297
|
+
flagged: boolean;
|
|
5298
|
+
/**
|
|
5299
|
+
* True if one or more detectors errored while evaluating this request.
|
|
5300
|
+
*/
|
|
5301
|
+
hasDetectorError?: boolean;
|
|
5302
|
+
}
|
|
5303
|
+
namespace IPDetection {
|
|
5304
|
+
/**
|
|
5305
|
+
* A single filter's verdict.
|
|
5306
|
+
*/
|
|
5307
|
+
interface Finding {
|
|
5308
|
+
/**
|
|
5309
|
+
* Category of the filter that produced this verdict.
|
|
5310
|
+
*/
|
|
5311
|
+
category: 'artist-style' | 'brand-trademark' | 'celebrity-likeness' | 'custom' | 'fictional-character';
|
|
5312
|
+
/**
|
|
5313
|
+
* Confidence score from 0 (low) to 1 (high).
|
|
5314
|
+
*/
|
|
5315
|
+
confidence: number;
|
|
5316
|
+
/**
|
|
5317
|
+
* Identifier of the filter that produced this verdict.
|
|
5318
|
+
*/
|
|
5319
|
+
filterId: string;
|
|
5320
|
+
/**
|
|
5321
|
+
* Display name of the filter that produced this verdict.
|
|
5322
|
+
*/
|
|
5323
|
+
filterName: string;
|
|
5324
|
+
/**
|
|
5325
|
+
* Whether this filter considered the request an IP risk.
|
|
5326
|
+
*/
|
|
5327
|
+
flagged: boolean;
|
|
5328
|
+
/**
|
|
5329
|
+
* Short, user-facing explanation of the verdict.
|
|
5330
|
+
*/
|
|
5331
|
+
reason: string;
|
|
5332
|
+
/**
|
|
5333
|
+
* Named entities the filter recognized (e.g. characters, brands, people).
|
|
5334
|
+
*/
|
|
5335
|
+
entities?: Array<string>;
|
|
5336
|
+
}
|
|
5337
|
+
}
|
|
4993
5338
|
}
|
|
4994
5339
|
export interface GeneratePromptResponse {
|
|
4995
5340
|
job: GeneratePromptResponse.Job;
|
|
@@ -4997,6 +5342,11 @@ export interface GeneratePromptResponse {
|
|
|
4997
5342
|
* The generated prompts.
|
|
4998
5343
|
*/
|
|
4999
5344
|
prompts: Array<string>;
|
|
5345
|
+
/**
|
|
5346
|
+
* The full ready-to-run model calls, index-aligned with `prompts`: `prompts[i]` is
|
|
5347
|
+
* the prompt text of `calls[i]`.
|
|
5348
|
+
*/
|
|
5349
|
+
calls?: Array<GeneratePromptResponse.Call>;
|
|
5000
5350
|
/**
|
|
5001
5351
|
* The Creative Units cost for the request billed
|
|
5002
5352
|
*/
|
|
@@ -5005,10 +5355,14 @@ export interface GeneratePromptResponse {
|
|
|
5005
5355
|
* The Creative Units discount for the request billed
|
|
5006
5356
|
*/
|
|
5007
5357
|
creativeUnitsDiscount?: number;
|
|
5358
|
+
/**
|
|
5359
|
+
* IP detection findings, when detection ran for this request.
|
|
5360
|
+
*/
|
|
5361
|
+
ipDetection?: GeneratePromptResponse.IPDetection;
|
|
5008
5362
|
/**
|
|
5009
5363
|
* The mode used to generate new prompt(s).
|
|
5010
5364
|
*/
|
|
5011
|
-
mode?: 'completion' | 'contextual' | 'image-editing' | 'inventive' | 'structured';
|
|
5365
|
+
mode?: 'completion' | 'contextual' | 'contextual-v2' | 'image-editing' | 'inventive' | 'structured';
|
|
5012
5366
|
}
|
|
5013
5367
|
export declare namespace GeneratePromptResponse {
|
|
5014
5368
|
interface Job {
|
|
@@ -5694,6 +6048,92 @@ export declare namespace GeneratePromptResponse {
|
|
|
5694
6048
|
cuDiscount: number;
|
|
5695
6049
|
}
|
|
5696
6050
|
}
|
|
6051
|
+
/**
|
|
6052
|
+
* A complete, ready-to-run model call proposed by Prompt Spark v3.
|
|
6053
|
+
*
|
|
6054
|
+
* The prompt text is carried inside `parameters` under the target model's prompt
|
|
6055
|
+
* input (when the model defines one). For models without a prompt input, the text
|
|
6056
|
+
* is only available in the index-aligned `prompts` array.
|
|
6057
|
+
*/
|
|
6058
|
+
interface Call {
|
|
6059
|
+
/**
|
|
6060
|
+
* The target model the call is for.
|
|
6061
|
+
*/
|
|
6062
|
+
modelId: string;
|
|
6063
|
+
/**
|
|
6064
|
+
* Schema-valid dynamic parameters for the target model, prompt included.
|
|
6065
|
+
*/
|
|
6066
|
+
parameters: unknown;
|
|
6067
|
+
/**
|
|
6068
|
+
* Optional rationale for the proposed call.
|
|
6069
|
+
*/
|
|
6070
|
+
rationale?: string;
|
|
6071
|
+
}
|
|
6072
|
+
/**
|
|
6073
|
+
* IP detection findings, when detection ran for this request.
|
|
6074
|
+
*/
|
|
6075
|
+
interface IPDetection {
|
|
6076
|
+
/**
|
|
6077
|
+
* Whether and how detection affected the request.
|
|
6078
|
+
*/
|
|
6079
|
+
action: 'allowed' | 'blocked' | 'flagged';
|
|
6080
|
+
/**
|
|
6081
|
+
* IP-detection CU fee, separate from creativeUnitsCost: a fixed base fee plus a
|
|
6082
|
+
* per-image fee for each analyzed input image.
|
|
6083
|
+
*/
|
|
6084
|
+
creativeUnitsCharged: number;
|
|
6085
|
+
/**
|
|
6086
|
+
* Number of enabled filters evaluated for this request.
|
|
6087
|
+
*/
|
|
6088
|
+
evaluatedFilters: number;
|
|
6089
|
+
/**
|
|
6090
|
+
* Per-filter verdicts gathered for this request.
|
|
6091
|
+
*/
|
|
6092
|
+
findings: Array<IPDetection.Finding>;
|
|
6093
|
+
/**
|
|
6094
|
+
* Convenience flag; always true when action is not 'allowed'.
|
|
6095
|
+
*/
|
|
6096
|
+
flagged: boolean;
|
|
6097
|
+
/**
|
|
6098
|
+
* True if one or more detectors errored while evaluating this request.
|
|
6099
|
+
*/
|
|
6100
|
+
hasDetectorError?: boolean;
|
|
6101
|
+
}
|
|
6102
|
+
namespace IPDetection {
|
|
6103
|
+
/**
|
|
6104
|
+
* A single filter's verdict.
|
|
6105
|
+
*/
|
|
6106
|
+
interface Finding {
|
|
6107
|
+
/**
|
|
6108
|
+
* Category of the filter that produced this verdict.
|
|
6109
|
+
*/
|
|
6110
|
+
category: 'artist-style' | 'brand-trademark' | 'celebrity-likeness' | 'custom' | 'fictional-character';
|
|
6111
|
+
/**
|
|
6112
|
+
* Confidence score from 0 (low) to 1 (high).
|
|
6113
|
+
*/
|
|
6114
|
+
confidence: number;
|
|
6115
|
+
/**
|
|
6116
|
+
* Identifier of the filter that produced this verdict.
|
|
6117
|
+
*/
|
|
6118
|
+
filterId: string;
|
|
6119
|
+
/**
|
|
6120
|
+
* Display name of the filter that produced this verdict.
|
|
6121
|
+
*/
|
|
6122
|
+
filterName: string;
|
|
6123
|
+
/**
|
|
6124
|
+
* Whether this filter considered the request an IP risk.
|
|
6125
|
+
*/
|
|
6126
|
+
flagged: boolean;
|
|
6127
|
+
/**
|
|
6128
|
+
* Short, user-facing explanation of the verdict.
|
|
6129
|
+
*/
|
|
6130
|
+
reason: string;
|
|
6131
|
+
/**
|
|
6132
|
+
* Named entities the filter recognized (e.g. characters, brands, people).
|
|
6133
|
+
*/
|
|
6134
|
+
entities?: Array<string>;
|
|
6135
|
+
}
|
|
6136
|
+
}
|
|
5697
6137
|
}
|
|
5698
6138
|
export interface GenerateRunModelResponse {
|
|
5699
6139
|
job: GenerateRunModelResponse.Job;
|
|
@@ -5705,6 +6145,10 @@ export interface GenerateRunModelResponse {
|
|
|
5705
6145
|
* The Creative Units discount for the request billed
|
|
5706
6146
|
*/
|
|
5707
6147
|
creativeUnitsDiscount?: number;
|
|
6148
|
+
/**
|
|
6149
|
+
* IP detection findings, when detection ran for this request.
|
|
6150
|
+
*/
|
|
6151
|
+
ipDetection?: GenerateRunModelResponse.IPDetection;
|
|
5708
6152
|
}
|
|
5709
6153
|
export declare namespace GenerateRunModelResponse {
|
|
5710
6154
|
interface Job {
|
|
@@ -6390,6 +6834,71 @@ export declare namespace GenerateRunModelResponse {
|
|
|
6390
6834
|
cuDiscount: number;
|
|
6391
6835
|
}
|
|
6392
6836
|
}
|
|
6837
|
+
/**
|
|
6838
|
+
* IP detection findings, when detection ran for this request.
|
|
6839
|
+
*/
|
|
6840
|
+
interface IPDetection {
|
|
6841
|
+
/**
|
|
6842
|
+
* Whether and how detection affected the request.
|
|
6843
|
+
*/
|
|
6844
|
+
action: 'allowed' | 'blocked' | 'flagged';
|
|
6845
|
+
/**
|
|
6846
|
+
* IP-detection CU fee, separate from creativeUnitsCost: a fixed base fee plus a
|
|
6847
|
+
* per-image fee for each analyzed input image.
|
|
6848
|
+
*/
|
|
6849
|
+
creativeUnitsCharged: number;
|
|
6850
|
+
/**
|
|
6851
|
+
* Number of enabled filters evaluated for this request.
|
|
6852
|
+
*/
|
|
6853
|
+
evaluatedFilters: number;
|
|
6854
|
+
/**
|
|
6855
|
+
* Per-filter verdicts gathered for this request.
|
|
6856
|
+
*/
|
|
6857
|
+
findings: Array<IPDetection.Finding>;
|
|
6858
|
+
/**
|
|
6859
|
+
* Convenience flag; always true when action is not 'allowed'.
|
|
6860
|
+
*/
|
|
6861
|
+
flagged: boolean;
|
|
6862
|
+
/**
|
|
6863
|
+
* True if one or more detectors errored while evaluating this request.
|
|
6864
|
+
*/
|
|
6865
|
+
hasDetectorError?: boolean;
|
|
6866
|
+
}
|
|
6867
|
+
namespace IPDetection {
|
|
6868
|
+
/**
|
|
6869
|
+
* A single filter's verdict.
|
|
6870
|
+
*/
|
|
6871
|
+
interface Finding {
|
|
6872
|
+
/**
|
|
6873
|
+
* Category of the filter that produced this verdict.
|
|
6874
|
+
*/
|
|
6875
|
+
category: 'artist-style' | 'brand-trademark' | 'celebrity-likeness' | 'custom' | 'fictional-character';
|
|
6876
|
+
/**
|
|
6877
|
+
* Confidence score from 0 (low) to 1 (high).
|
|
6878
|
+
*/
|
|
6879
|
+
confidence: number;
|
|
6880
|
+
/**
|
|
6881
|
+
* Identifier of the filter that produced this verdict.
|
|
6882
|
+
*/
|
|
6883
|
+
filterId: string;
|
|
6884
|
+
/**
|
|
6885
|
+
* Display name of the filter that produced this verdict.
|
|
6886
|
+
*/
|
|
6887
|
+
filterName: string;
|
|
6888
|
+
/**
|
|
6889
|
+
* Whether this filter considered the request an IP risk.
|
|
6890
|
+
*/
|
|
6891
|
+
flagged: boolean;
|
|
6892
|
+
/**
|
|
6893
|
+
* Short, user-facing explanation of the verdict.
|
|
6894
|
+
*/
|
|
6895
|
+
reason: string;
|
|
6896
|
+
/**
|
|
6897
|
+
* Named entities the filter recognized (e.g. characters, brands, people).
|
|
6898
|
+
*/
|
|
6899
|
+
entities?: Array<string>;
|
|
6900
|
+
}
|
|
6901
|
+
}
|
|
6393
6902
|
}
|
|
6394
6903
|
export interface GenerateTranslateResponse {
|
|
6395
6904
|
/**
|
|
@@ -6409,6 +6918,10 @@ export interface GenerateTranslateResponse {
|
|
|
6409
6918
|
* The Creative Units discount for the request billed
|
|
6410
6919
|
*/
|
|
6411
6920
|
creativeUnitsDiscount?: number;
|
|
6921
|
+
/**
|
|
6922
|
+
* IP detection findings, when detection ran for this request.
|
|
6923
|
+
*/
|
|
6924
|
+
ipDetection?: GenerateTranslateResponse.IPDetection;
|
|
6412
6925
|
}
|
|
6413
6926
|
export declare namespace GenerateTranslateResponse {
|
|
6414
6927
|
interface Job {
|
|
@@ -7094,6 +7607,71 @@ export declare namespace GenerateTranslateResponse {
|
|
|
7094
7607
|
cuDiscount: number;
|
|
7095
7608
|
}
|
|
7096
7609
|
}
|
|
7610
|
+
/**
|
|
7611
|
+
* IP detection findings, when detection ran for this request.
|
|
7612
|
+
*/
|
|
7613
|
+
interface IPDetection {
|
|
7614
|
+
/**
|
|
7615
|
+
* Whether and how detection affected the request.
|
|
7616
|
+
*/
|
|
7617
|
+
action: 'allowed' | 'blocked' | 'flagged';
|
|
7618
|
+
/**
|
|
7619
|
+
* IP-detection CU fee, separate from creativeUnitsCost: a fixed base fee plus a
|
|
7620
|
+
* per-image fee for each analyzed input image.
|
|
7621
|
+
*/
|
|
7622
|
+
creativeUnitsCharged: number;
|
|
7623
|
+
/**
|
|
7624
|
+
* Number of enabled filters evaluated for this request.
|
|
7625
|
+
*/
|
|
7626
|
+
evaluatedFilters: number;
|
|
7627
|
+
/**
|
|
7628
|
+
* Per-filter verdicts gathered for this request.
|
|
7629
|
+
*/
|
|
7630
|
+
findings: Array<IPDetection.Finding>;
|
|
7631
|
+
/**
|
|
7632
|
+
* Convenience flag; always true when action is not 'allowed'.
|
|
7633
|
+
*/
|
|
7634
|
+
flagged: boolean;
|
|
7635
|
+
/**
|
|
7636
|
+
* True if one or more detectors errored while evaluating this request.
|
|
7637
|
+
*/
|
|
7638
|
+
hasDetectorError?: boolean;
|
|
7639
|
+
}
|
|
7640
|
+
namespace IPDetection {
|
|
7641
|
+
/**
|
|
7642
|
+
* A single filter's verdict.
|
|
7643
|
+
*/
|
|
7644
|
+
interface Finding {
|
|
7645
|
+
/**
|
|
7646
|
+
* Category of the filter that produced this verdict.
|
|
7647
|
+
*/
|
|
7648
|
+
category: 'artist-style' | 'brand-trademark' | 'celebrity-likeness' | 'custom' | 'fictional-character';
|
|
7649
|
+
/**
|
|
7650
|
+
* Confidence score from 0 (low) to 1 (high).
|
|
7651
|
+
*/
|
|
7652
|
+
confidence: number;
|
|
7653
|
+
/**
|
|
7654
|
+
* Identifier of the filter that produced this verdict.
|
|
7655
|
+
*/
|
|
7656
|
+
filterId: string;
|
|
7657
|
+
/**
|
|
7658
|
+
* Display name of the filter that produced this verdict.
|
|
7659
|
+
*/
|
|
7660
|
+
filterName: string;
|
|
7661
|
+
/**
|
|
7662
|
+
* Whether this filter considered the request an IP risk.
|
|
7663
|
+
*/
|
|
7664
|
+
flagged: boolean;
|
|
7665
|
+
/**
|
|
7666
|
+
* Short, user-facing explanation of the verdict.
|
|
7667
|
+
*/
|
|
7668
|
+
reason: string;
|
|
7669
|
+
/**
|
|
7670
|
+
* Named entities the filter recognized (e.g. characters, brands, people).
|
|
7671
|
+
*/
|
|
7672
|
+
entities?: Array<string>;
|
|
7673
|
+
}
|
|
7674
|
+
}
|
|
7097
7675
|
}
|
|
7098
7676
|
export interface GenerateCaptionParams {
|
|
7099
7677
|
/**
|
|
@@ -7387,7 +7965,7 @@ export interface GeneratePromptParams {
|
|
|
7387
7965
|
/**
|
|
7388
7966
|
* Body param: The mode used to generate new prompt(s).
|
|
7389
7967
|
*/
|
|
7390
|
-
mode: 'completion' | 'contextual' | 'image-editing' | 'inventive' | 'structured';
|
|
7968
|
+
mode: 'completion' | 'contextual' | 'contextual-v2' | 'image-editing' | 'inventive' | 'structured';
|
|
7391
7969
|
/**
|
|
7392
7970
|
* Query param
|
|
7393
7971
|
*/
|
|
@@ -7482,6 +8060,12 @@ export interface GenerateRunModelParams {
|
|
|
7482
8060
|
* Query param
|
|
7483
8061
|
*/
|
|
7484
8062
|
dryRun?: unknown;
|
|
8063
|
+
/**
|
|
8064
|
+
* Query param: Set to "true" to run an IP-detection preflight on this request.
|
|
8065
|
+
* Combine with ?dryRun=true for an advisory check that returns findings without
|
|
8066
|
+
* generating.
|
|
8067
|
+
*/
|
|
8068
|
+
ipDetection?: boolean;
|
|
7485
8069
|
}
|
|
7486
8070
|
export interface GenerateTranslateParams {
|
|
7487
8071
|
/**
|