@scenario-labs/sdk 0.3.0 → 1.1.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 +30 -0
- package/README.md +40 -8
- package/client.d.mts +36 -16
- package/client.d.mts.map +1 -1
- package/client.d.ts +36 -16
- package/client.d.ts.map +1 -1
- package/client.js +10 -0
- package/client.js.map +1 -1
- package/client.mjs +10 -0
- package/client.mjs.map +1 -1
- package/core/pagination.d.mts +153 -0
- package/core/pagination.d.mts.map +1 -0
- package/core/pagination.d.ts +153 -0
- package/core/pagination.d.ts.map +1 -0
- package/core/pagination.js +276 -0
- package/core/pagination.js.map +1 -0
- package/core/pagination.mjs +263 -0
- package/core/pagination.mjs.map +1 -0
- package/index.d.mts +5 -1
- package/index.d.mts.map +1 -1
- package/index.d.ts +5 -1
- package/index.d.ts.map +1 -1
- package/index.js +14 -1
- package/index.js.map +1 -1
- package/index.mjs +5 -1
- package/index.mjs.map +1 -1
- package/lib/asset.d.mts +55 -0
- package/lib/asset.d.mts.map +1 -0
- package/lib/asset.d.ts +55 -0
- package/lib/asset.d.ts.map +1 -0
- package/lib/asset.js +60 -0
- package/lib/asset.js.map +1 -0
- package/lib/asset.mjs +54 -0
- package/lib/asset.mjs.map +1 -0
- package/lib/job.d.mts +13 -1
- package/lib/job.d.mts.map +1 -1
- package/lib/job.d.ts +13 -1
- package/lib/job.d.ts.map +1 -1
- package/lib/job.js +18 -1
- package/lib/job.js.map +1 -1
- package/lib/job.mjs +16 -0
- package/lib/job.mjs.map +1 -1
- package/lib/models.d.mts +34 -2
- package/lib/models.d.mts.map +1 -1
- package/lib/models.d.ts +34 -2
- package/lib/models.d.ts.map +1 -1
- package/lib/models.js +39 -2
- package/lib/models.js.map +1 -1
- package/lib/models.mjs +37 -1
- package/lib/models.mjs.map +1 -1
- package/lib/scenario.d.mts +14 -0
- package/lib/scenario.d.mts.map +1 -1
- package/lib/scenario.d.ts +14 -0
- package/lib/scenario.d.ts.map +1 -1
- package/lib/scenario.js +14 -0
- package/lib/scenario.js.map +1 -1
- package/lib/scenario.mjs +14 -0
- package/lib/scenario.mjs.map +1 -1
- package/lib/upload.d.mts +143 -0
- package/lib/upload.d.mts.map +1 -0
- package/lib/upload.d.ts +143 -0
- package/lib/upload.d.ts.map +1 -0
- package/lib/upload.js +242 -0
- package/lib/upload.js.map +1 -0
- package/lib/upload.mjs +203 -0
- package/lib/upload.mjs.map +1 -0
- package/lib/workflow.d.mts +13 -2
- package/lib/workflow.d.mts.map +1 -1
- package/lib/workflow.d.ts +13 -2
- package/lib/workflow.d.ts.map +1 -1
- package/lib/workflow.js +17 -4
- package/lib/workflow.js.map +1 -1
- package/lib/workflow.mjs +17 -4
- package/lib/workflow.mjs.map +1 -1
- package/lib/workflow_import_validator.d.mts +40 -0
- package/lib/workflow_import_validator.d.mts.map +1 -0
- package/lib/workflow_import_validator.d.ts +40 -0
- package/lib/workflow_import_validator.d.ts.map +1 -0
- package/lib/workflow_import_validator.js +69 -0
- package/lib/workflow_import_validator.js.map +1 -0
- package/lib/workflow_import_validator.mjs +64 -0
- package/lib/workflow_import_validator.mjs.map +1 -0
- package/package.json +11 -1
- package/pagination.d.mts +2 -0
- package/pagination.d.mts.map +1 -0
- package/pagination.d.ts +2 -0
- package/pagination.d.ts.map +1 -0
- package/pagination.js +6 -0
- package/pagination.js.map +1 -0
- package/pagination.mjs +2 -0
- package/pagination.mjs.map +1 -0
- package/resources/assets/assets.d.mts +646 -669
- package/resources/assets/assets.d.mts.map +1 -1
- package/resources/assets/assets.d.ts +646 -669
- package/resources/assets/assets.d.ts.map +1 -1
- package/resources/assets/assets.js +3 -2
- package/resources/assets/assets.js.map +1 -1
- package/resources/assets/assets.mjs +3 -2
- package/resources/assets/assets.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/assets/public.d.mts +12 -12
- package/resources/assets/public.d.mts.map +1 -1
- package/resources/assets/public.d.ts +12 -12
- package/resources/assets/public.d.ts.map +1 -1
- package/resources/collections/collections.d.mts +38 -49
- package/resources/collections/collections.d.mts.map +1 -1
- package/resources/collections/collections.d.ts +38 -49
- package/resources/collections/collections.d.ts.map +1 -1
- package/resources/collections/collections.js +5 -1
- package/resources/collections/collections.js.map +1 -1
- package/resources/collections/collections.mjs +5 -1
- 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/generate.d.mts +1027 -242
- package/resources/generate.d.mts.map +1 -1
- package/resources/generate.d.ts +1027 -242
- package/resources/generate.d.ts.map +1 -1
- package/resources/generate.js +7 -0
- package/resources/generate.js.map +1 -1
- package/resources/generate.mjs +7 -0
- package/resources/generate.mjs.map +1 -1
- package/resources/index.d.mts +8 -8
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +8 -8
- 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 +369 -380
- package/resources/jobs.d.mts.map +1 -1
- package/resources/jobs.d.ts +369 -380
- package/resources/jobs.d.ts.map +1 -1
- package/resources/jobs.js +2 -1
- package/resources/jobs.js.map +1 -1
- package/resources/jobs.mjs +2 -1
- package/resources/jobs.mjs.map +1 -1
- package/resources/models/description.d.mts +2 -2
- package/resources/models/description.d.mts.map +1 -1
- package/resources/models/description.d.ts +2 -2
- package/resources/models/description.d.ts.map +1 -1
- package/resources/models/examples.d.mts +4 -4
- package/resources/models/examples.d.mts.map +1 -1
- package/resources/models/examples.d.ts +4 -4
- package/resources/models/examples.d.ts.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 +845 -856
- package/resources/models/models.d.mts.map +1 -1
- package/resources/models/models.d.ts +845 -856
- package/resources/models/models.d.ts.map +1 -1
- package/resources/models/models.js +2 -1
- package/resources/models/models.js.map +1 -1
- package/resources/models/models.mjs +2 -1
- package/resources/models/models.mjs.map +1 -1
- package/resources/models/train.d.mts +2 -2
- package/resources/models/train.d.mts.map +1 -1
- package/resources/models/train.d.ts +2 -2
- package/resources/models/train.d.ts.map +1 -1
- package/resources/search.d.mts +215 -295
- package/resources/search.d.mts.map +1 -1
- package/resources/search.d.ts +215 -295
- package/resources/search.d.ts.map +1 -1
- package/resources/search.js +9 -2
- package/resources/search.js.map +1 -1
- package/resources/search.mjs +9 -2
- package/resources/search.mjs.map +1 -1
- package/resources/tags.d.mts +23 -35
- package/resources/tags.d.mts.map +1 -1
- package/resources/tags.d.ts +23 -35
- package/resources/tags.d.ts.map +1 -1
- package/resources/tags.js +2 -1
- package/resources/tags.js.map +1 -1
- package/resources/tags.mjs +2 -1
- package/resources/tags.mjs.map +1 -1
- package/resources/usages.d.mts +3 -3
- package/resources/usages.d.mts.map +1 -1
- package/resources/usages.d.ts +3 -3
- package/resources/usages.d.ts.map +1 -1
- package/resources/workflows.d.mts +688 -704
- package/resources/workflows.d.mts.map +1 -1
- package/resources/workflows.d.ts +688 -704
- package/resources/workflows.d.ts.map +1 -1
- package/resources/workflows.js +5 -1
- package/resources/workflows.js.map +1 -1
- package/resources/workflows.mjs +5 -1
- package/resources/workflows.mjs.map +1 -1
- package/src/client.ts +107 -2
- package/src/core/pagination.ts +497 -0
- package/src/index.ts +11 -1
- package/src/lib/asset.ts +85 -0
- package/src/lib/job.ts +28 -1
- package/src/lib/models.ts +62 -2
- package/src/lib/scenario.ts +14 -0
- package/src/lib/upload.ts +344 -0
- package/src/lib/workflow.ts +29 -4
- package/src/lib/workflow_import_validator.ts +104 -0
- package/src/pagination.ts +2 -0
- package/src/resources/assets/assets.ts +930 -909
- package/src/resources/assets/index.ts +2 -0
- package/src/resources/assets/public.ts +17 -7
- package/src/resources/collections/collections.ts +45 -54
- package/src/resources/collections/index.ts +1 -0
- package/src/resources/generate.ts +1227 -136
- package/src/resources/index.ts +11 -1
- package/src/resources/jobs.ts +613 -622
- package/src/resources/models/description.ts +4 -0
- package/src/resources/models/examples.ts +8 -0
- package/src/resources/models/index.ts +1 -0
- package/src/resources/models/models.ts +1066 -1064
- package/src/resources/models/train.ts +4 -0
- package/src/resources/search.ts +239 -327
- package/src/resources/tags.ts +32 -39
- package/src/resources/usages.ts +5 -0
- package/src/resources/workflows.ts +850 -864
- 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
package/src/resources/search.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../core/resource';
|
|
4
|
-
import {
|
|
4
|
+
import { PagePromise, SearchHitsOffset, type SearchHitsOffsetParams } from '../core/pagination';
|
|
5
5
|
import { RequestOptions } from '../internal/request-options';
|
|
6
6
|
|
|
7
7
|
export class Search extends APIResource {
|
|
@@ -14,9 +14,14 @@ export class Search extends APIResource {
|
|
|
14
14
|
assetSearch(
|
|
15
15
|
params: SearchAssetSearchParams,
|
|
16
16
|
options?: RequestOptions,
|
|
17
|
-
):
|
|
17
|
+
): PagePromise<SearchAssetSearchResponsesSearchHitsOffset, SearchAssetSearchResponse> {
|
|
18
18
|
const { originalAssets, ...body } = params;
|
|
19
|
-
return this._client.
|
|
19
|
+
return this._client.getAPIList('/search/assets', SearchHitsOffset<SearchAssetSearchResponse>, {
|
|
20
|
+
query: { originalAssets },
|
|
21
|
+
body,
|
|
22
|
+
method: 'post',
|
|
23
|
+
...options,
|
|
24
|
+
});
|
|
20
25
|
}
|
|
21
26
|
|
|
22
27
|
/**
|
|
@@ -28,463 +33,380 @@ export class Search extends APIResource {
|
|
|
28
33
|
modelSearch(
|
|
29
34
|
params: SearchModelSearchParams,
|
|
30
35
|
options?: RequestOptions,
|
|
31
|
-
):
|
|
36
|
+
): PagePromise<SearchModelSearchResponsesSearchHitsOffset, SearchModelSearchResponse> {
|
|
32
37
|
const { originalAssets, originalModels, ...body } = params;
|
|
33
|
-
return this._client.
|
|
38
|
+
return this._client.getAPIList('/search/models', SearchHitsOffset<SearchModelSearchResponse>, {
|
|
34
39
|
query: { originalAssets, originalModels },
|
|
35
40
|
body,
|
|
41
|
+
method: 'post',
|
|
36
42
|
...options,
|
|
37
43
|
});
|
|
38
44
|
}
|
|
39
45
|
}
|
|
40
46
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
47
|
+
export type SearchAssetSearchResponsesSearchHitsOffset = SearchHitsOffset<SearchAssetSearchResponse>;
|
|
48
|
+
|
|
49
|
+
export type SearchModelSearchResponsesSearchHitsOffset = SearchHitsOffset<SearchModelSearchResponse>;
|
|
50
|
+
|
|
44
51
|
export interface SearchAssetSearchResponse {
|
|
45
|
-
|
|
52
|
+
/**
|
|
53
|
+
* Unique identifier for the asset (e.g., "asset_GTrL3mq4SXWyMxkOHRxlpw")
|
|
54
|
+
*/
|
|
55
|
+
id: string;
|
|
46
56
|
|
|
47
57
|
/**
|
|
48
|
-
*
|
|
58
|
+
* User ID of the asset creator/author
|
|
49
59
|
*/
|
|
50
|
-
|
|
60
|
+
authorId: string;
|
|
51
61
|
|
|
52
62
|
/**
|
|
53
|
-
*
|
|
63
|
+
* Array of collection IDs this asset belongs to
|
|
54
64
|
*/
|
|
55
|
-
|
|
65
|
+
collectionIds: Array<string>;
|
|
56
66
|
|
|
57
67
|
/**
|
|
58
|
-
*
|
|
68
|
+
* Creation timestamp in ISO 8601 format (e.g., "2025-01-16T11:19:41.579Z")
|
|
59
69
|
*/
|
|
60
|
-
|
|
70
|
+
createdAt: string;
|
|
61
71
|
|
|
62
72
|
/**
|
|
63
|
-
*
|
|
73
|
+
* Metadata containing detailed information about the asset's properties and
|
|
74
|
+
* generation parameters
|
|
64
75
|
*/
|
|
65
|
-
|
|
76
|
+
metadata: SearchAssetSearchResponse.Metadata;
|
|
66
77
|
|
|
67
78
|
/**
|
|
68
|
-
*
|
|
79
|
+
* MIME type of the asset (e.g., "image/png", "image/jpeg")
|
|
69
80
|
*/
|
|
70
|
-
|
|
81
|
+
mimeType: string;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Array of detected NSFW categories
|
|
85
|
+
*/
|
|
86
|
+
nsfw: Array<string>;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Project ID of the asset owner
|
|
90
|
+
*/
|
|
91
|
+
ownerId: string;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Privacy setting of the asset ("public", "private", or "unlisted")
|
|
95
|
+
*/
|
|
96
|
+
privacy: string;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Array of user-assigned tags for categorization
|
|
100
|
+
*/
|
|
101
|
+
tags: Array<string>;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Team ID of the asset owner
|
|
105
|
+
*/
|
|
106
|
+
teamId: string;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Last modification timestamp in ISO 8601 format (e.g.,
|
|
110
|
+
* "2025-01-16T11:19:41.579Z")
|
|
111
|
+
*/
|
|
112
|
+
updatedAt: string;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Signed URL of the asset
|
|
116
|
+
*/
|
|
117
|
+
url: string;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Textual description of the asset. Can be either:
|
|
121
|
+
*
|
|
122
|
+
* - User-provided description for training images
|
|
123
|
+
* - Automatically generated caption for images and videos assets
|
|
124
|
+
* - Automatically generated description for audio assets
|
|
125
|
+
*/
|
|
126
|
+
description?: string;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Score assigned to the asset based on usage and popularity
|
|
130
|
+
*/
|
|
131
|
+
score?: number;
|
|
71
132
|
|
|
72
133
|
/**
|
|
73
|
-
*
|
|
134
|
+
* Thumbnail preview of the asset 3D, video...
|
|
74
135
|
*/
|
|
75
|
-
|
|
136
|
+
thumbnail?: SearchAssetSearchResponse.Thumbnail;
|
|
76
137
|
|
|
77
138
|
/**
|
|
78
|
-
*
|
|
139
|
+
* Transcription of the asset. Can be either:
|
|
140
|
+
*
|
|
141
|
+
* - Automatically generated transcription for audio assets with speech
|
|
79
142
|
*/
|
|
80
|
-
|
|
143
|
+
transcription?: string;
|
|
81
144
|
}
|
|
82
145
|
|
|
83
146
|
export namespace SearchAssetSearchResponse {
|
|
84
|
-
|
|
147
|
+
/**
|
|
148
|
+
* Metadata containing detailed information about the asset's properties and
|
|
149
|
+
* generation parameters
|
|
150
|
+
*/
|
|
151
|
+
export interface Metadata {
|
|
85
152
|
/**
|
|
86
|
-
*
|
|
153
|
+
* Aspect ratio of the asset (e.g., "1:1", "16:9")
|
|
87
154
|
*/
|
|
88
|
-
|
|
155
|
+
aspectRatio?: string;
|
|
89
156
|
|
|
90
157
|
/**
|
|
91
|
-
*
|
|
158
|
+
* ID of the base model used for generation
|
|
92
159
|
*/
|
|
93
|
-
|
|
160
|
+
baseModelId?: string;
|
|
94
161
|
|
|
95
162
|
/**
|
|
96
|
-
*
|
|
163
|
+
* Guidance scale used for diffusion models to control prompt adherence
|
|
97
164
|
*/
|
|
98
|
-
|
|
165
|
+
guidance?: number;
|
|
99
166
|
|
|
100
167
|
/**
|
|
101
|
-
*
|
|
168
|
+
* Height of the asset in pixels
|
|
102
169
|
*/
|
|
103
|
-
|
|
170
|
+
height?: number;
|
|
104
171
|
|
|
105
172
|
/**
|
|
106
|
-
*
|
|
107
|
-
* generation parameters
|
|
173
|
+
* Classification of the asset (e.g., "image", "video")
|
|
108
174
|
*/
|
|
109
|
-
|
|
175
|
+
kind?: string;
|
|
110
176
|
|
|
111
177
|
/**
|
|
112
|
-
*
|
|
178
|
+
* ID of the specific model used if asset is model-based
|
|
113
179
|
*/
|
|
114
|
-
|
|
180
|
+
modelId?: string;
|
|
115
181
|
|
|
116
182
|
/**
|
|
117
|
-
*
|
|
183
|
+
* Type of model used for generation (e.g., "sd-1_5", "flux.1")
|
|
118
184
|
*/
|
|
119
|
-
|
|
185
|
+
modelType?: string;
|
|
120
186
|
|
|
121
187
|
/**
|
|
122
|
-
*
|
|
188
|
+
* Custom name given to the asset
|
|
123
189
|
*/
|
|
124
|
-
|
|
190
|
+
name?: string;
|
|
125
191
|
|
|
126
192
|
/**
|
|
127
|
-
*
|
|
193
|
+
* Negative prompt used during generation to specify what to avoid
|
|
128
194
|
*/
|
|
129
|
-
|
|
195
|
+
negativePrompt?: string;
|
|
130
196
|
|
|
131
197
|
/**
|
|
132
|
-
*
|
|
198
|
+
* For Flux models: controls the influence of the negative prompt
|
|
133
199
|
*/
|
|
134
|
-
|
|
200
|
+
negativePromptStrength?: number;
|
|
135
201
|
|
|
136
202
|
/**
|
|
137
|
-
*
|
|
203
|
+
* Number of inference steps used during generation
|
|
138
204
|
*/
|
|
139
|
-
|
|
205
|
+
numInferenceSteps?: number;
|
|
140
206
|
|
|
141
207
|
/**
|
|
142
|
-
*
|
|
143
|
-
* "2025-01-16T11:19:41.579Z")
|
|
208
|
+
* ID of the parent job that created this asset
|
|
144
209
|
*/
|
|
145
|
-
|
|
210
|
+
parentJobId?: string;
|
|
146
211
|
|
|
147
212
|
/**
|
|
148
|
-
*
|
|
213
|
+
* Text prompt used to generate the asset
|
|
149
214
|
*/
|
|
150
|
-
|
|
215
|
+
prompt?: string;
|
|
151
216
|
|
|
152
217
|
/**
|
|
153
|
-
*
|
|
154
|
-
*
|
|
155
|
-
* - User-provided description for training images
|
|
156
|
-
* - Automatically generated caption for images and videos assets
|
|
157
|
-
* - Automatically generated description for audio assets
|
|
218
|
+
* Scheduler algorithm used during generation
|
|
158
219
|
*/
|
|
159
|
-
|
|
220
|
+
scheduler?: string;
|
|
160
221
|
|
|
161
222
|
/**
|
|
162
|
-
*
|
|
223
|
+
* Random seed used for generation, enables reproducibility
|
|
163
224
|
*/
|
|
164
|
-
|
|
225
|
+
seed?: string;
|
|
165
226
|
|
|
166
227
|
/**
|
|
167
|
-
*
|
|
228
|
+
* File size of the asset in bytes
|
|
168
229
|
*/
|
|
169
|
-
|
|
230
|
+
size?: number;
|
|
170
231
|
|
|
171
232
|
/**
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
* - Automatically generated transcription for audio assets with speech
|
|
233
|
+
* Text used to generate the asset: mainly for speech to text
|
|
175
234
|
*/
|
|
176
|
-
|
|
177
|
-
}
|
|
235
|
+
text?: string;
|
|
178
236
|
|
|
179
|
-
export namespace Hit {
|
|
180
237
|
/**
|
|
181
|
-
*
|
|
182
|
-
* generation parameters
|
|
238
|
+
* Thumbnail image information for the asset. Ex. Canvas thumbnail
|
|
183
239
|
*/
|
|
184
|
-
|
|
185
|
-
/**
|
|
186
|
-
* Aspect ratio of the asset (e.g., "1:1", "16:9")
|
|
187
|
-
*/
|
|
188
|
-
aspectRatio?: string;
|
|
189
|
-
|
|
190
|
-
/**
|
|
191
|
-
* ID of the base model used for generation
|
|
192
|
-
*/
|
|
193
|
-
baseModelId?: string;
|
|
240
|
+
thumbnail?: Metadata.Thumbnail;
|
|
194
241
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
/**
|
|
201
|
-
* Height of the asset in pixels
|
|
202
|
-
*/
|
|
203
|
-
height?: number;
|
|
204
|
-
|
|
205
|
-
/**
|
|
206
|
-
* Classification of the asset (e.g., "image", "video")
|
|
207
|
-
*/
|
|
208
|
-
kind?: string;
|
|
209
|
-
|
|
210
|
-
/**
|
|
211
|
-
* ID of the specific model used if asset is model-based
|
|
212
|
-
*/
|
|
213
|
-
modelId?: string;
|
|
214
|
-
|
|
215
|
-
/**
|
|
216
|
-
* Type of model used for generation (e.g., "sd-1_5", "flux.1")
|
|
217
|
-
*/
|
|
218
|
-
modelType?: string;
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
* Custom name given to the asset
|
|
222
|
-
*/
|
|
223
|
-
name?: string;
|
|
224
|
-
|
|
225
|
-
/**
|
|
226
|
-
* Negative prompt used during generation to specify what to avoid
|
|
227
|
-
*/
|
|
228
|
-
negativePrompt?: string;
|
|
229
|
-
|
|
230
|
-
/**
|
|
231
|
-
* For Flux models: controls the influence of the negative prompt
|
|
232
|
-
*/
|
|
233
|
-
negativePromptStrength?: number;
|
|
234
|
-
|
|
235
|
-
/**
|
|
236
|
-
* Number of inference steps used during generation
|
|
237
|
-
*/
|
|
238
|
-
numInferenceSteps?: number;
|
|
239
|
-
|
|
240
|
-
/**
|
|
241
|
-
* ID of the parent job that created this asset
|
|
242
|
-
*/
|
|
243
|
-
parentJobId?: string;
|
|
244
|
-
|
|
245
|
-
/**
|
|
246
|
-
* Text prompt used to generate the asset
|
|
247
|
-
*/
|
|
248
|
-
prompt?: string;
|
|
249
|
-
|
|
250
|
-
/**
|
|
251
|
-
* Scheduler algorithm used during generation
|
|
252
|
-
*/
|
|
253
|
-
scheduler?: string;
|
|
254
|
-
|
|
255
|
-
/**
|
|
256
|
-
* Random seed used for generation, enables reproducibility
|
|
257
|
-
*/
|
|
258
|
-
seed?: string;
|
|
259
|
-
|
|
260
|
-
/**
|
|
261
|
-
* File size of the asset in bytes
|
|
262
|
-
*/
|
|
263
|
-
size?: number;
|
|
264
|
-
|
|
265
|
-
/**
|
|
266
|
-
* Text used to generate the asset: mainly for speech to text
|
|
267
|
-
*/
|
|
268
|
-
text?: string;
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* Thumbnail image information for the asset. Ex. Canvas thumbnail
|
|
272
|
-
*/
|
|
273
|
-
thumbnail?: Metadata.Thumbnail;
|
|
274
|
-
|
|
275
|
-
/**
|
|
276
|
-
* Specific type/category of the asset (e.g., "canvas", "inference-txt")
|
|
277
|
-
*/
|
|
278
|
-
type?: string;
|
|
279
|
-
|
|
280
|
-
/**
|
|
281
|
-
* Width of the asset in pixels
|
|
282
|
-
*/
|
|
283
|
-
width?: number;
|
|
284
|
-
}
|
|
242
|
+
/**
|
|
243
|
+
* Specific type/category of the asset (e.g., "canvas", "inference-txt")
|
|
244
|
+
*/
|
|
245
|
+
type?: string;
|
|
285
246
|
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
/**
|
|
292
|
-
* ID of the asset used as thumbnail
|
|
293
|
-
*/
|
|
294
|
-
assetId: string;
|
|
295
|
-
}
|
|
296
|
-
}
|
|
247
|
+
/**
|
|
248
|
+
* Width of the asset in pixels
|
|
249
|
+
*/
|
|
250
|
+
width?: number;
|
|
251
|
+
}
|
|
297
252
|
|
|
253
|
+
export namespace Metadata {
|
|
298
254
|
/**
|
|
299
|
-
* Thumbnail
|
|
255
|
+
* Thumbnail image information for the asset. Ex. Canvas thumbnail
|
|
300
256
|
*/
|
|
301
257
|
export interface Thumbnail {
|
|
302
258
|
/**
|
|
303
259
|
* ID of the asset used as thumbnail
|
|
304
260
|
*/
|
|
305
261
|
assetId: string;
|
|
306
|
-
|
|
307
|
-
/**
|
|
308
|
-
* Signed URL of the thumbnail
|
|
309
|
-
*/
|
|
310
|
-
url: string;
|
|
311
262
|
}
|
|
312
263
|
}
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* Thumbnail preview of the asset 3D, video...
|
|
267
|
+
*/
|
|
268
|
+
export interface Thumbnail {
|
|
269
|
+
/**
|
|
270
|
+
* ID of the asset used as thumbnail
|
|
271
|
+
*/
|
|
272
|
+
assetId: string;
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Signed URL of the thumbnail
|
|
276
|
+
*/
|
|
277
|
+
url: string;
|
|
278
|
+
}
|
|
313
279
|
}
|
|
314
280
|
|
|
315
|
-
/**
|
|
316
|
-
* Search result for model search
|
|
317
|
-
*/
|
|
318
281
|
export interface SearchModelSearchResponse {
|
|
319
|
-
hits: Array<SearchModelSearchResponse.Hit>;
|
|
320
|
-
|
|
321
282
|
/**
|
|
322
|
-
*
|
|
283
|
+
* Unique identifier for the model (e.g., "model_GTrL3mq4SXWyMxkOHRxlpw")
|
|
323
284
|
*/
|
|
324
|
-
|
|
285
|
+
id: string;
|
|
325
286
|
|
|
326
287
|
/**
|
|
327
|
-
*
|
|
288
|
+
* User ID of the model creator/author
|
|
328
289
|
*/
|
|
329
|
-
|
|
290
|
+
authorId: string;
|
|
330
291
|
|
|
331
292
|
/**
|
|
332
|
-
*
|
|
293
|
+
* Array of model capabilities
|
|
333
294
|
*/
|
|
334
|
-
|
|
295
|
+
capabilities: Array<string>;
|
|
335
296
|
|
|
336
297
|
/**
|
|
337
|
-
*
|
|
298
|
+
* Array of collection IDs this model belongs to
|
|
338
299
|
*/
|
|
339
|
-
|
|
300
|
+
collectionIds: Array<string>;
|
|
340
301
|
|
|
341
302
|
/**
|
|
342
|
-
*
|
|
303
|
+
* Array of concept models associated with this model Each concept contains a
|
|
304
|
+
* reference to its source model
|
|
343
305
|
*/
|
|
344
|
-
|
|
306
|
+
concepts: Array<SearchModelSearchResponse.Concept>;
|
|
345
307
|
|
|
346
308
|
/**
|
|
347
|
-
*
|
|
309
|
+
* Creation timestamp in ISO 8601 format (e.g., "2025-01-16T11:19:41.579Z")
|
|
348
310
|
*/
|
|
349
|
-
|
|
311
|
+
createdAt: string;
|
|
350
312
|
|
|
351
313
|
/**
|
|
352
|
-
*
|
|
314
|
+
* Array of example asset IDs associated with this model
|
|
353
315
|
*/
|
|
354
|
-
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
export namespace SearchModelSearchResponse {
|
|
358
|
-
export interface Hit {
|
|
359
|
-
/**
|
|
360
|
-
* Unique identifier for the model (e.g., "model_GTrL3mq4SXWyMxkOHRxlpw")
|
|
361
|
-
*/
|
|
362
|
-
id: string;
|
|
363
|
-
|
|
364
|
-
/**
|
|
365
|
-
* User ID of the model creator/author
|
|
366
|
-
*/
|
|
367
|
-
authorId: string;
|
|
368
|
-
|
|
369
|
-
/**
|
|
370
|
-
* Array of model capabilities
|
|
371
|
-
*/
|
|
372
|
-
capabilities: Array<string>;
|
|
373
|
-
|
|
374
|
-
/**
|
|
375
|
-
* Array of collection IDs this model belongs to
|
|
376
|
-
*/
|
|
377
|
-
collectionIds: Array<string>;
|
|
316
|
+
exampleAssetIds: Array<string>;
|
|
378
317
|
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
concepts: Array<Hit.Concept>;
|
|
384
|
-
|
|
385
|
-
/**
|
|
386
|
-
* Creation timestamp in ISO 8601 format (e.g., "2025-01-16T11:19:41.579Z")
|
|
387
|
-
*/
|
|
388
|
-
createdAt: string;
|
|
318
|
+
/**
|
|
319
|
+
* Display name of the model
|
|
320
|
+
*/
|
|
321
|
+
name: string;
|
|
389
322
|
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
323
|
+
/**
|
|
324
|
+
* Project ID of the model owner
|
|
325
|
+
*/
|
|
326
|
+
ownerId: string;
|
|
394
327
|
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
328
|
+
/**
|
|
329
|
+
* Privacy setting of the model ("public", "private", or "unlisted")
|
|
330
|
+
*/
|
|
331
|
+
privacy: string;
|
|
399
332
|
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
333
|
+
/**
|
|
334
|
+
* Short description of the model
|
|
335
|
+
*/
|
|
336
|
+
shortDescription: string;
|
|
404
337
|
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
338
|
+
/**
|
|
339
|
+
* Source/origin of the model (e.g., "training", "import")
|
|
340
|
+
*/
|
|
341
|
+
source: string;
|
|
409
342
|
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
343
|
+
/**
|
|
344
|
+
* Array of user-assigned tags for categorization
|
|
345
|
+
*/
|
|
346
|
+
tags: Array<string>;
|
|
414
347
|
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
348
|
+
/**
|
|
349
|
+
* Team ID of the model owner
|
|
350
|
+
*/
|
|
351
|
+
teamId: string;
|
|
419
352
|
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
353
|
+
/**
|
|
354
|
+
* Number of images used to train this model
|
|
355
|
+
*/
|
|
356
|
+
trainingImagesNumber: number;
|
|
424
357
|
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
358
|
+
/**
|
|
359
|
+
* Type of the model (e.g., "sd-1_5", "flux.1")
|
|
360
|
+
*/
|
|
361
|
+
type: string;
|
|
429
362
|
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
363
|
+
/**
|
|
364
|
+
* Last modification timestamp in ISO 8601 format (e.g.,
|
|
365
|
+
* "2025-01-16T11:19:41.579Z")
|
|
366
|
+
*/
|
|
367
|
+
updatedAt: string;
|
|
434
368
|
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
369
|
+
/**
|
|
370
|
+
* ID of the parent model this model was derived from
|
|
371
|
+
*/
|
|
372
|
+
parentModelId?: string;
|
|
439
373
|
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
updatedAt: string;
|
|
374
|
+
/**
|
|
375
|
+
* Score assigned to the model based on usage and popularity
|
|
376
|
+
*/
|
|
377
|
+
score?: number;
|
|
445
378
|
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
379
|
+
/**
|
|
380
|
+
* Thumbnail image information for the model
|
|
381
|
+
*/
|
|
382
|
+
thumbnail?: SearchModelSearchResponse.Thumbnail;
|
|
383
|
+
}
|
|
450
384
|
|
|
385
|
+
export namespace SearchModelSearchResponse {
|
|
386
|
+
export interface Concept {
|
|
451
387
|
/**
|
|
452
|
-
*
|
|
388
|
+
* ID of the concept's source model
|
|
453
389
|
*/
|
|
454
|
-
|
|
390
|
+
modelId: string;
|
|
391
|
+
}
|
|
455
392
|
|
|
393
|
+
/**
|
|
394
|
+
* Thumbnail image information for the model
|
|
395
|
+
*/
|
|
396
|
+
export interface Thumbnail {
|
|
456
397
|
/**
|
|
457
|
-
*
|
|
398
|
+
* ID of the asset used as thumbnail
|
|
458
399
|
*/
|
|
459
|
-
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
export namespace Hit {
|
|
463
|
-
export interface Concept {
|
|
464
|
-
/**
|
|
465
|
-
* ID of the concept's source model
|
|
466
|
-
*/
|
|
467
|
-
modelId: string;
|
|
468
|
-
}
|
|
400
|
+
assetId: string;
|
|
469
401
|
|
|
470
402
|
/**
|
|
471
|
-
*
|
|
403
|
+
* Signed URL of the thumbnail
|
|
472
404
|
*/
|
|
473
|
-
|
|
474
|
-
/**
|
|
475
|
-
* ID of the asset used as thumbnail
|
|
476
|
-
*/
|
|
477
|
-
assetId: string;
|
|
478
|
-
|
|
479
|
-
/**
|
|
480
|
-
* Signed URL of the thumbnail
|
|
481
|
-
*/
|
|
482
|
-
url: string;
|
|
483
|
-
}
|
|
405
|
+
url: string;
|
|
484
406
|
}
|
|
485
407
|
}
|
|
486
408
|
|
|
487
|
-
export interface SearchAssetSearchParams {
|
|
409
|
+
export interface SearchAssetSearchParams extends SearchHitsOffsetParams {
|
|
488
410
|
/**
|
|
489
411
|
* Query param: If set to true, returns the original asset without transformation
|
|
490
412
|
*/
|
|
@@ -527,12 +449,6 @@ export interface SearchAssetSearchParams {
|
|
|
527
449
|
*/
|
|
528
450
|
limit?: number;
|
|
529
451
|
|
|
530
|
-
/**
|
|
531
|
-
* Body param: Number of documents to skip. Must be used with `limit`. Starts
|
|
532
|
-
* from 0.
|
|
533
|
-
*/
|
|
534
|
-
offset?: number;
|
|
535
|
-
|
|
536
452
|
/**
|
|
537
453
|
* Body param: Request a specific page of results. Must be used with `hitsPerPage`.
|
|
538
454
|
*/
|
|
@@ -587,7 +503,7 @@ export namespace SearchAssetSearchParams {
|
|
|
587
503
|
}
|
|
588
504
|
}
|
|
589
505
|
|
|
590
|
-
export interface SearchModelSearchParams {
|
|
506
|
+
export interface SearchModelSearchParams extends SearchHitsOffsetParams {
|
|
591
507
|
/**
|
|
592
508
|
* Query param: If set to true, returns the original asset without transformation
|
|
593
509
|
*/
|
|
@@ -635,12 +551,6 @@ export interface SearchModelSearchParams {
|
|
|
635
551
|
*/
|
|
636
552
|
limit?: number;
|
|
637
553
|
|
|
638
|
-
/**
|
|
639
|
-
* Body param: Number of documents to skip. Must be used with `limit`. Starts
|
|
640
|
-
* from 0.
|
|
641
|
-
*/
|
|
642
|
-
offset?: number;
|
|
643
|
-
|
|
644
554
|
/**
|
|
645
555
|
* Body param: Request a specific page of results. Must be used with `hitsPerPage`.
|
|
646
556
|
*/
|
|
@@ -699,6 +609,8 @@ export declare namespace Search {
|
|
|
699
609
|
export {
|
|
700
610
|
type SearchAssetSearchResponse as SearchAssetSearchResponse,
|
|
701
611
|
type SearchModelSearchResponse as SearchModelSearchResponse,
|
|
612
|
+
type SearchAssetSearchResponsesSearchHitsOffset as SearchAssetSearchResponsesSearchHitsOffset,
|
|
613
|
+
type SearchModelSearchResponsesSearchHitsOffset as SearchModelSearchResponsesSearchHitsOffset,
|
|
702
614
|
type SearchAssetSearchParams as SearchAssetSearchParams,
|
|
703
615
|
type SearchModelSearchParams as SearchModelSearchParams,
|
|
704
616
|
};
|