@byte_fluffy/nexra-sdk 0.1.0-alpha.43 → 0.1.0-alpha.45
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/README.md +32 -0
- package/dist/catalog.d.ts +2 -2
- package/dist/catalog.js +2 -2
- package/dist/{chunk-ESPUF2D4.js → chunk-FEACXUHZ.js} +20 -2
- package/dist/{chunk-TV6MEAZC.js → chunk-OX5GFYVN.js} +175 -46
- package/dist/index.d.ts +5 -5
- package/dist/index.js +2 -2
- package/dist/language.d.ts +1 -1
- package/dist/language.js +2 -2
- package/dist/media-CwGmG5qB.d.ts +299 -0
- package/dist/{media-geometry-YD9Y_CFw.d.ts → media-geometry-KwQh1O8Y.d.ts} +1 -1
- package/dist/media.d.ts +2 -222
- package/dist/media.js +1 -1
- package/dist/types.d.ts +3 -3
- package/dist/{voices-BHzDQ5xH.d.ts → voices-B09HqQJJ.d.ts} +11 -7
- package/package.json +1 -1
- package/dist/assets-Cusrjj7_.d.ts +0 -61
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
import { a as JsonObject } from './json-Cz0MkWQn.js';
|
|
2
|
+
|
|
3
|
+
declare const MEDIA_KINDS: readonly ["image", "video", "audio", "document", "archive", "other"];
|
|
4
|
+
type MediaKind = (typeof MEDIA_KINDS)[number];
|
|
5
|
+
type MediaAssetStatus = "pending" | "ready" | "failed" | "deleted";
|
|
6
|
+
interface MediaAsset {
|
|
7
|
+
id: string;
|
|
8
|
+
kind: MediaKind;
|
|
9
|
+
status: MediaAssetStatus;
|
|
10
|
+
source: "upload" | "generated" | "provider" | "imported";
|
|
11
|
+
name?: string;
|
|
12
|
+
mimeType?: string;
|
|
13
|
+
sizeBytes?: number;
|
|
14
|
+
width?: number;
|
|
15
|
+
height?: number;
|
|
16
|
+
durationMs?: number;
|
|
17
|
+
checksumSha256?: string;
|
|
18
|
+
url?: string;
|
|
19
|
+
downloadUrl?: string;
|
|
20
|
+
expiresAt?: string;
|
|
21
|
+
metadata?: JsonObject;
|
|
22
|
+
createdAt: string;
|
|
23
|
+
}
|
|
24
|
+
interface AssetReference {
|
|
25
|
+
assetId: string;
|
|
26
|
+
}
|
|
27
|
+
type AssetInput = AssetReference | Blob | File | MediaAsset | string | URL;
|
|
28
|
+
interface AssetUploadOptions {
|
|
29
|
+
kind?: MediaKind;
|
|
30
|
+
name?: string;
|
|
31
|
+
signal?: AbortSignal;
|
|
32
|
+
}
|
|
33
|
+
interface AssetImportRequest {
|
|
34
|
+
url: string;
|
|
35
|
+
kind?: MediaKind;
|
|
36
|
+
name?: string;
|
|
37
|
+
}
|
|
38
|
+
type AssetCertificationProvider = "seedance";
|
|
39
|
+
type AssetCertificationStatus = "processing" | "ready" | "failed";
|
|
40
|
+
interface AssetCertification {
|
|
41
|
+
assetId: string;
|
|
42
|
+
provider: AssetCertificationProvider;
|
|
43
|
+
status: AssetCertificationStatus;
|
|
44
|
+
providerAssetId?: string;
|
|
45
|
+
assetUri?: string;
|
|
46
|
+
groupId?: string;
|
|
47
|
+
library: "general" | "liveness";
|
|
48
|
+
error?: string;
|
|
49
|
+
createdAt: string;
|
|
50
|
+
updatedAt: string;
|
|
51
|
+
}
|
|
52
|
+
interface AssetCertificationRequest {
|
|
53
|
+
library?: "general" | "liveness";
|
|
54
|
+
}
|
|
55
|
+
interface AssetCertificationWaitOptions {
|
|
56
|
+
pollIntervalMs?: number;
|
|
57
|
+
timeoutMs?: number;
|
|
58
|
+
signal?: AbortSignal;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
declare const NEXRA_MEDIA_API_VERSION: 1;
|
|
62
|
+
/** Catalog-level generation taxonomy. Text keeps its native endpoint protocols. */
|
|
63
|
+
declare const NEXRA_GENERATION_OPERATIONS: readonly ["text.generate", "image.generate", "video.generate", "audio.generate", "image.upscale", "video.upscale"];
|
|
64
|
+
type NexraGenerationOperation = (typeof NEXRA_GENERATION_OPERATIONS)[number];
|
|
65
|
+
declare const NEXRA_MEDIA_OPERATIONS: readonly ["image.generate", "video.generate", "audio.generate", "image.upscale", "video.upscale"];
|
|
66
|
+
type NexraMediaOperation = (typeof NEXRA_MEDIA_OPERATIONS)[number];
|
|
67
|
+
declare const NEXRA_PUBLISHED_MEDIA_OPERATIONS: readonly ["image.generate", "video.generate", "audio.generate", "image.upscale", "video.upscale"];
|
|
68
|
+
type NexraPublishedMediaOperation = (typeof NEXRA_PUBLISHED_MEDIA_OPERATIONS)[number];
|
|
69
|
+
declare const NEXRA_MEDIA_FEATURES: readonly ["text-to-image", "image-to-image", "image-reference", "image-edit", "image-inpaint", "image-control", "text-to-video", "first-frame", "first-last-frame", "image-to-video", "video-to-video", "audio-to-video", "avatar-video", "reference-image", "reference-video", "reference-audio", "omni-reference", "tts", "music", "sfx", "voice-reference", "voice-design", "scale-factor", "target-resolution"];
|
|
70
|
+
type NexraMediaFeature = (typeof NEXRA_MEDIA_FEATURES)[number];
|
|
71
|
+
/** JSON wire locator. SDK-only Blob/File support is normalized into one of these forms. */
|
|
72
|
+
type NexraMediaSource = string | AssetReference;
|
|
73
|
+
type NexraTextRole = "prompt" | "negative_prompt" | "script" | "lyrics";
|
|
74
|
+
type NexraImageRole = "source" | "reference" | "first_frame" | "last_frame" | "mask" | "control" | "subject" | "background";
|
|
75
|
+
type NexraVideoRole = "source" | "reference" | "edit" | "extend";
|
|
76
|
+
type NexraAudioRole = "source" | "reference" | "voice_reference";
|
|
77
|
+
type NexraTextContentPart = Readonly<{
|
|
78
|
+
type: "text";
|
|
79
|
+
text: string;
|
|
80
|
+
role?: NexraTextRole;
|
|
81
|
+
}>;
|
|
82
|
+
type NexraImageContentPart = Readonly<{
|
|
83
|
+
type: "image";
|
|
84
|
+
source: NexraMediaSource;
|
|
85
|
+
role?: NexraImageRole;
|
|
86
|
+
/** Stable prompt reference name for models that address media as `@name`. */
|
|
87
|
+
name?: string;
|
|
88
|
+
}>;
|
|
89
|
+
/** An image pinned inside a generated video; only models declaring this role accept it. */
|
|
90
|
+
type NexraVideoKeyframeContentPart = Readonly<{
|
|
91
|
+
type: "image";
|
|
92
|
+
source: NexraMediaSource;
|
|
93
|
+
role: "keyframe";
|
|
94
|
+
/** Position in seconds, strictly inside the generated clip. */
|
|
95
|
+
timestamp: number;
|
|
96
|
+
}>;
|
|
97
|
+
type NexraVideoContentPart = Readonly<{
|
|
98
|
+
type: "video";
|
|
99
|
+
source: NexraMediaSource;
|
|
100
|
+
role?: NexraVideoRole;
|
|
101
|
+
}>;
|
|
102
|
+
type NexraAudioContentPart = Readonly<{
|
|
103
|
+
type: "audio";
|
|
104
|
+
source: NexraMediaSource;
|
|
105
|
+
role?: NexraAudioRole;
|
|
106
|
+
}>;
|
|
107
|
+
type NexraMediaContentPart = NexraTextContentPart | NexraImageContentPart | NexraVideoContentPart | NexraAudioContentPart;
|
|
108
|
+
type NexraDraftContentPart = Readonly<{
|
|
109
|
+
type: "draft_task";
|
|
110
|
+
draft_task: Readonly<{
|
|
111
|
+
id: string;
|
|
112
|
+
}>;
|
|
113
|
+
}>;
|
|
114
|
+
type NexraImageGenerateInput = Readonly<{
|
|
115
|
+
content: readonly (NexraTextContentPart | NexraImageContentPart)[];
|
|
116
|
+
output_mode?: "image" | "layers";
|
|
117
|
+
prompt_optimization?: "standard" | "fast";
|
|
118
|
+
aspect_ratio?: string;
|
|
119
|
+
resolution?: string;
|
|
120
|
+
quality?: string;
|
|
121
|
+
count?: number;
|
|
122
|
+
output_format?: string;
|
|
123
|
+
seed?: number;
|
|
124
|
+
}>;
|
|
125
|
+
type NexraImageLayer = Readonly<{
|
|
126
|
+
image_index: number;
|
|
127
|
+
z_index: number;
|
|
128
|
+
size: string;
|
|
129
|
+
name?: string;
|
|
130
|
+
description?: string;
|
|
131
|
+
output_format?: string;
|
|
132
|
+
bounding_box?: Readonly<{
|
|
133
|
+
absolute: readonly [number, number, number, number];
|
|
134
|
+
normalized: readonly [number, number, number, number];
|
|
135
|
+
}>;
|
|
136
|
+
}>;
|
|
137
|
+
type NexraImageLayerDecompositionOutput = Readonly<{
|
|
138
|
+
images: readonly string[];
|
|
139
|
+
layer_decomposition: Readonly<{
|
|
140
|
+
layers: readonly NexraImageLayer[];
|
|
141
|
+
}>;
|
|
142
|
+
}>;
|
|
143
|
+
type NexraVideoGenerateInput = Readonly<{
|
|
144
|
+
content: readonly (NexraMediaContentPart | NexraDraftContentPart | NexraVideoKeyframeContentPart)[];
|
|
145
|
+
task_type?: string;
|
|
146
|
+
draft?: boolean;
|
|
147
|
+
/** Explicit no-watermark value, only on models whose contract declares it. */
|
|
148
|
+
watermark?: false;
|
|
149
|
+
/** Optional preset or cloned voice used by talking-avatar video models. */
|
|
150
|
+
voice?: string;
|
|
151
|
+
aspect_ratio?: string;
|
|
152
|
+
resolution?: string;
|
|
153
|
+
quality?: string;
|
|
154
|
+
duration?: number;
|
|
155
|
+
fit?: "contain" | "cover";
|
|
156
|
+
title?: string;
|
|
157
|
+
generate_audio?: boolean;
|
|
158
|
+
output_format?: string;
|
|
159
|
+
seed?: number;
|
|
160
|
+
}>;
|
|
161
|
+
type NexraAudioGenerateInput = Readonly<{
|
|
162
|
+
content: readonly (NexraTextContentPart | NexraAudioContentPart)[];
|
|
163
|
+
voice?: string;
|
|
164
|
+
language?: string;
|
|
165
|
+
duration?: number;
|
|
166
|
+
output_format?: string;
|
|
167
|
+
sample_rate?: number;
|
|
168
|
+
speed?: number;
|
|
169
|
+
volume?: number;
|
|
170
|
+
pitch?: number;
|
|
171
|
+
emotion?: string;
|
|
172
|
+
instrumental?: boolean;
|
|
173
|
+
loop?: boolean;
|
|
174
|
+
prompt_influence?: number;
|
|
175
|
+
seed?: number;
|
|
176
|
+
}>;
|
|
177
|
+
type NexraImageUpscaleInput = Readonly<{
|
|
178
|
+
content: readonly [NexraImageContentPart];
|
|
179
|
+
enable_hdr?: boolean;
|
|
180
|
+
enable_wb?: boolean;
|
|
181
|
+
scale?: number;
|
|
182
|
+
resolution?: string;
|
|
183
|
+
output_format?: string;
|
|
184
|
+
preserve_details?: boolean;
|
|
185
|
+
}>;
|
|
186
|
+
type NexraVideoUpscaleInput = Readonly<{
|
|
187
|
+
source_duration: number;
|
|
188
|
+
config?: string;
|
|
189
|
+
scale?: number;
|
|
190
|
+
resolution?: string;
|
|
191
|
+
output_format?: string;
|
|
192
|
+
preserve_details?: boolean;
|
|
193
|
+
}> & (Readonly<{
|
|
194
|
+
content: readonly [NexraVideoContentPart];
|
|
195
|
+
vid?: never;
|
|
196
|
+
}> | Readonly<{
|
|
197
|
+
vid: string;
|
|
198
|
+
content?: never;
|
|
199
|
+
}>);
|
|
200
|
+
type NexraMediaInputByOperation = Readonly<{
|
|
201
|
+
"image.generate": NexraImageGenerateInput;
|
|
202
|
+
"video.generate": NexraVideoGenerateInput;
|
|
203
|
+
"audio.generate": NexraAudioGenerateInput;
|
|
204
|
+
"image.upscale": NexraImageUpscaleInput;
|
|
205
|
+
"video.upscale": NexraVideoUpscaleInput;
|
|
206
|
+
}>;
|
|
207
|
+
type NexraMediaKind = "image" | "video" | "audio";
|
|
208
|
+
type NexraMediaInputSlot = Readonly<{
|
|
209
|
+
mediaKind: NexraMediaKind;
|
|
210
|
+
role: string;
|
|
211
|
+
min?: number;
|
|
212
|
+
max: number;
|
|
213
|
+
maxBytes?: number;
|
|
214
|
+
minDurationSeconds?: number;
|
|
215
|
+
maxDurationSeconds?: number;
|
|
216
|
+
}>;
|
|
217
|
+
type NexraMediaInputMode = Readonly<{
|
|
218
|
+
id: string;
|
|
219
|
+
slots: readonly NexraMediaInputSlot[];
|
|
220
|
+
}>;
|
|
221
|
+
type NexraMediaParameterValue = string | number | boolean;
|
|
222
|
+
type NexraMediaParameter = Readonly<{
|
|
223
|
+
key: string;
|
|
224
|
+
label?: string;
|
|
225
|
+
}> & (Readonly<{
|
|
226
|
+
kind: "enum";
|
|
227
|
+
options: readonly NexraMediaParameterValue[];
|
|
228
|
+
default: NexraMediaParameterValue;
|
|
229
|
+
allowCustom?: boolean;
|
|
230
|
+
}> | Readonly<{
|
|
231
|
+
kind: "range";
|
|
232
|
+
min: number;
|
|
233
|
+
max: number;
|
|
234
|
+
step: number;
|
|
235
|
+
default: number;
|
|
236
|
+
autoValue?: number;
|
|
237
|
+
unit?: string;
|
|
238
|
+
}> | Readonly<{
|
|
239
|
+
kind: "toggle";
|
|
240
|
+
default: boolean;
|
|
241
|
+
}> | Readonly<{
|
|
242
|
+
kind: "resource";
|
|
243
|
+
resource: "voice";
|
|
244
|
+
default?: string;
|
|
245
|
+
allowCustom?: boolean;
|
|
246
|
+
}>);
|
|
247
|
+
type NexraMediaParameterConstraint = Readonly<{
|
|
248
|
+
when: Readonly<Record<string, NexraMediaParameterValue | readonly NexraMediaParameterValue[]>>;
|
|
249
|
+
parameter: string;
|
|
250
|
+
allowedValues?: readonly NexraMediaParameterValue[];
|
|
251
|
+
fixedValue?: NexraMediaParameterValue;
|
|
252
|
+
disabled?: boolean;
|
|
253
|
+
}>;
|
|
254
|
+
type NexraMediaOperationDefinition = Readonly<{
|
|
255
|
+
operation: NexraMediaOperation;
|
|
256
|
+
status: "active" | "hold";
|
|
257
|
+
outputKind: NexraMediaKind;
|
|
258
|
+
features: readonly NexraMediaFeature[];
|
|
259
|
+
parameterKeys: readonly string[];
|
|
260
|
+
}>;
|
|
261
|
+
declare const NEXRA_MEDIA_OPERATION_DEFINITIONS: readonly [{
|
|
262
|
+
readonly operation: "image.generate";
|
|
263
|
+
readonly status: "active";
|
|
264
|
+
readonly outputKind: "image";
|
|
265
|
+
readonly features: readonly ["text-to-image", "image-to-image", "image-reference", "image-edit", "image-inpaint", "image-control"];
|
|
266
|
+
readonly parameterKeys: readonly ["aspect_ratio", "resolution", "quality", "count", "output_format", "seed", "output_mode", "prompt_optimization"];
|
|
267
|
+
}, {
|
|
268
|
+
readonly operation: "video.generate";
|
|
269
|
+
readonly status: "active";
|
|
270
|
+
readonly outputKind: "video";
|
|
271
|
+
readonly features: readonly ["text-to-video", "first-frame", "first-last-frame", "image-to-video", "video-to-video", "audio-to-video", "avatar-video", "reference-image", "reference-video", "reference-audio", "omni-reference"];
|
|
272
|
+
readonly parameterKeys: readonly ["voice", "aspect_ratio", "resolution", "quality", "duration", "fit", "title", "generate_audio", "output_format", "seed", "watermark"];
|
|
273
|
+
}, {
|
|
274
|
+
readonly operation: "audio.generate";
|
|
275
|
+
readonly status: "active";
|
|
276
|
+
readonly outputKind: "audio";
|
|
277
|
+
readonly features: readonly ["tts", "music", "sfx", "voice-reference", "voice-design"];
|
|
278
|
+
readonly parameterKeys: readonly ["voice", "language", "duration", "output_format", "sample_rate", "speed", "volume", "pitch", "emotion", "instrumental", "loop", "prompt_influence", "seed"];
|
|
279
|
+
}, {
|
|
280
|
+
readonly operation: "image.upscale";
|
|
281
|
+
readonly status: "active";
|
|
282
|
+
readonly outputKind: "image";
|
|
283
|
+
readonly features: readonly ["scale-factor", "target-resolution"];
|
|
284
|
+
readonly parameterKeys: readonly ["scale", "resolution", "output_format", "preserve_details"];
|
|
285
|
+
}, {
|
|
286
|
+
readonly operation: "video.upscale";
|
|
287
|
+
readonly status: "active";
|
|
288
|
+
readonly outputKind: "video";
|
|
289
|
+
readonly features: readonly ["scale-factor", "target-resolution"];
|
|
290
|
+
readonly parameterKeys: readonly ["scale", "resolution", "output_format", "preserve_details"];
|
|
291
|
+
}];
|
|
292
|
+
declare const NEXRA_MEDIA_INPUT_SCHEMAS: Readonly<Record<NexraPublishedMediaOperation, JsonObject>>;
|
|
293
|
+
declare function nexraMediaInputSchema(operation: NexraMediaOperation): JsonObject | undefined;
|
|
294
|
+
declare function isNexraMediaInput(value: unknown): value is JsonObject;
|
|
295
|
+
declare function nexraMediaOperationForMode(mode: string): NexraPublishedMediaOperation | undefined;
|
|
296
|
+
/** Narrow the shared category vocabulary for one Experience Center input mode. */
|
|
297
|
+
declare function nexraMediaInputSchemaForMode(mode: string): JsonObject | undefined;
|
|
298
|
+
|
|
299
|
+
export { type AssetImportRequest as A, type NexraMediaInputMode as B, type NexraMediaInputSlot as C, type NexraMediaKind as D, type NexraMediaOperation as E, type NexraMediaOperationDefinition as F, type NexraMediaParameter as G, type NexraMediaParameterConstraint as H, type NexraMediaSource as I, type NexraPublishedMediaOperation as J, type NexraTextContentPart as K, type NexraVideoContentPart as L, MEDIA_KINDS as M, type NexraImageLayer as N, type NexraVideoGenerateInput as O, type NexraVideoKeyframeContentPart as P, type NexraVideoUpscaleInput as Q, isNexraMediaInput as R, nexraMediaInputSchema as S, nexraMediaInputSchemaForMode as T, nexraMediaOperationForMode as U, type AssetInput as a, type AssetReference as b, type AssetUploadOptions as c, type MediaAsset as d, type MediaAssetStatus as e, type MediaKind as f, type NexraImageLayerDecompositionOutput as g, type AssetCertificationRequest as h, type AssetCertification as i, type AssetCertificationWaitOptions as j, NEXRA_GENERATION_OPERATIONS as k, NEXRA_MEDIA_API_VERSION as l, NEXRA_MEDIA_FEATURES as m, NEXRA_MEDIA_INPUT_SCHEMAS as n, NEXRA_MEDIA_OPERATIONS as o, NEXRA_MEDIA_OPERATION_DEFINITIONS as p, NEXRA_PUBLISHED_MEDIA_OPERATIONS as q, type NexraAudioContentPart as r, type NexraAudioGenerateInput as s, type NexraGenerationOperation as t, type NexraImageContentPart as u, type NexraImageGenerateInput as v, type NexraImageUpscaleInput as w, type NexraMediaContentPart as x, type NexraMediaFeature as y, type NexraMediaInputByOperation as z };
|
|
@@ -361,4 +361,4 @@ declare function decodeMediaGeometry(_inputSchema: JsonObject, input: JsonObject
|
|
|
361
361
|
/** Normalize the SDK convenience alias `ratio` without producing Native fields. */
|
|
362
362
|
declare function applyMediaGeometry(inputSchema: JsonObject, input: JsonObject): JsonObject;
|
|
363
363
|
|
|
364
|
-
export { type
|
|
364
|
+
export { type ModelDateVersion as A, type ModelEndpointSummary as B, type CreateNexraQuoteRequest as C, type ModelModality as D, type ModelResourceOption as E, type FetchLike as F, type NexraDisplayQuoteBatchEntry as G, HttpTransport as H, type MediaGeometryField as M, type NexraCatalogChangeParams as N, type TaskModelSummary as T, type UnifiedMediaGeometry as U, type NexraCatalogChangePage as a, type NexraCatalogModelState as b, type NexraSalePriceList as c, type NexraQuote as d, type CreateNexraDisplayQuoteBatchRequest as e, type NexraDisplayQuoteBatch as f, type NexraCatalogRevision as g, type NexraModelSpec as h, type NexraModelEndpointSpec as i, type NexraModelSpecFilter as j, type MediaGeometryProjection as k, type NexraBillingCurrency as l, type NexraCatalogModelIdentity as m, type NexraModelOperation as n, type NexraSalePrice as o, type NexraSettlement as p, applyMediaGeometry as q, decodeMediaGeometry as r, encodeMediaGeometry as s, projectMediaGeometry as t, type ModelSearchParams as u, type TaskModel as v, type ModelSchema as w, type ModelResourceList as x, type NexraClientOptions as y, type ModelCapabilitySummary as z };
|
package/dist/media.d.ts
CHANGED
|
@@ -1,222 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
declare const NEXRA_MEDIA_API_VERSION: 1;
|
|
5
|
-
/** Catalog-level generation taxonomy. Text keeps its native endpoint protocols. */
|
|
6
|
-
declare const NEXRA_GENERATION_OPERATIONS: readonly ["text.generate", "image.generate", "video.generate", "audio.generate", "image.upscale", "video.upscale"];
|
|
7
|
-
type NexraGenerationOperation = (typeof NEXRA_GENERATION_OPERATIONS)[number];
|
|
8
|
-
declare const NEXRA_MEDIA_OPERATIONS: readonly ["image.generate", "video.generate", "audio.generate", "image.upscale", "video.upscale"];
|
|
9
|
-
type NexraMediaOperation = (typeof NEXRA_MEDIA_OPERATIONS)[number];
|
|
10
|
-
declare const NEXRA_PUBLISHED_MEDIA_OPERATIONS: readonly ["image.generate", "video.generate", "audio.generate", "image.upscale", "video.upscale"];
|
|
11
|
-
type NexraPublishedMediaOperation = (typeof NEXRA_PUBLISHED_MEDIA_OPERATIONS)[number];
|
|
12
|
-
declare const NEXRA_MEDIA_FEATURES: readonly ["text-to-image", "image-to-image", "image-reference", "image-edit", "image-inpaint", "image-control", "text-to-video", "first-frame", "first-last-frame", "image-to-video", "video-to-video", "audio-to-video", "avatar-video", "reference-image", "reference-video", "reference-audio", "omni-reference", "tts", "music", "sfx", "voice-reference", "voice-design", "scale-factor", "target-resolution"];
|
|
13
|
-
type NexraMediaFeature = (typeof NEXRA_MEDIA_FEATURES)[number];
|
|
14
|
-
/** JSON wire locator. SDK-only Blob/File support is normalized into one of these forms. */
|
|
15
|
-
type NexraMediaSource = string | AssetReference;
|
|
16
|
-
type NexraTextRole = "prompt" | "negative_prompt" | "script" | "lyrics";
|
|
17
|
-
type NexraImageRole = "source" | "reference" | "first_frame" | "last_frame" | "mask" | "control" | "subject" | "background";
|
|
18
|
-
type NexraVideoRole = "source" | "reference" | "edit" | "extend";
|
|
19
|
-
type NexraAudioRole = "source" | "reference" | "voice_reference";
|
|
20
|
-
type NexraTextContentPart = Readonly<{
|
|
21
|
-
type: "text";
|
|
22
|
-
text: string;
|
|
23
|
-
role?: NexraTextRole;
|
|
24
|
-
}>;
|
|
25
|
-
type NexraImageContentPart = Readonly<{
|
|
26
|
-
type: "image";
|
|
27
|
-
source: NexraMediaSource;
|
|
28
|
-
role?: NexraImageRole;
|
|
29
|
-
/** Stable prompt reference name for models that address media as `@name`. */
|
|
30
|
-
name?: string;
|
|
31
|
-
}>;
|
|
32
|
-
/** An image pinned inside a generated video; only models declaring this role accept it. */
|
|
33
|
-
type NexraVideoKeyframeContentPart = Readonly<{
|
|
34
|
-
type: "image";
|
|
35
|
-
source: NexraMediaSource;
|
|
36
|
-
role: "keyframe";
|
|
37
|
-
/** Position in seconds, strictly inside the generated clip. */
|
|
38
|
-
timestamp: number;
|
|
39
|
-
}>;
|
|
40
|
-
type NexraVideoContentPart = Readonly<{
|
|
41
|
-
type: "video";
|
|
42
|
-
source: NexraMediaSource;
|
|
43
|
-
role?: NexraVideoRole;
|
|
44
|
-
}>;
|
|
45
|
-
type NexraAudioContentPart = Readonly<{
|
|
46
|
-
type: "audio";
|
|
47
|
-
source: NexraMediaSource;
|
|
48
|
-
role?: NexraAudioRole;
|
|
49
|
-
}>;
|
|
50
|
-
type NexraMediaContentPart = NexraTextContentPart | NexraImageContentPart | NexraVideoContentPart | NexraAudioContentPart;
|
|
51
|
-
type NexraDraftContentPart = Readonly<{
|
|
52
|
-
type: "draft_task";
|
|
53
|
-
draft_task: Readonly<{
|
|
54
|
-
id: string;
|
|
55
|
-
}>;
|
|
56
|
-
}>;
|
|
57
|
-
type NexraImageGenerateInput = Readonly<{
|
|
58
|
-
content: readonly (NexraTextContentPart | NexraImageContentPart)[];
|
|
59
|
-
aspect_ratio?: string;
|
|
60
|
-
resolution?: string;
|
|
61
|
-
quality?: string;
|
|
62
|
-
count?: number;
|
|
63
|
-
output_format?: string;
|
|
64
|
-
seed?: number;
|
|
65
|
-
}>;
|
|
66
|
-
type NexraVideoGenerateInput = Readonly<{
|
|
67
|
-
content: readonly (NexraMediaContentPart | NexraDraftContentPart | NexraVideoKeyframeContentPart)[];
|
|
68
|
-
task_type?: string;
|
|
69
|
-
draft?: boolean;
|
|
70
|
-
/** Explicit no-watermark value, only on models whose contract declares it. */
|
|
71
|
-
watermark?: false;
|
|
72
|
-
/** Optional preset or cloned voice used by talking-avatar video models. */
|
|
73
|
-
voice?: string;
|
|
74
|
-
aspect_ratio?: string;
|
|
75
|
-
resolution?: string;
|
|
76
|
-
quality?: string;
|
|
77
|
-
duration?: number;
|
|
78
|
-
fit?: "contain" | "cover";
|
|
79
|
-
title?: string;
|
|
80
|
-
generate_audio?: boolean;
|
|
81
|
-
output_format?: string;
|
|
82
|
-
seed?: number;
|
|
83
|
-
}>;
|
|
84
|
-
type NexraAudioGenerateInput = Readonly<{
|
|
85
|
-
content: readonly (NexraTextContentPart | NexraAudioContentPart)[];
|
|
86
|
-
voice?: string;
|
|
87
|
-
language?: string;
|
|
88
|
-
duration?: number;
|
|
89
|
-
output_format?: string;
|
|
90
|
-
sample_rate?: number;
|
|
91
|
-
speed?: number;
|
|
92
|
-
volume?: number;
|
|
93
|
-
pitch?: number;
|
|
94
|
-
emotion?: string;
|
|
95
|
-
instrumental?: boolean;
|
|
96
|
-
loop?: boolean;
|
|
97
|
-
prompt_influence?: number;
|
|
98
|
-
seed?: number;
|
|
99
|
-
}>;
|
|
100
|
-
type NexraImageUpscaleInput = Readonly<{
|
|
101
|
-
content: readonly [NexraImageContentPart];
|
|
102
|
-
enable_hdr?: boolean;
|
|
103
|
-
enable_wb?: boolean;
|
|
104
|
-
scale?: number;
|
|
105
|
-
resolution?: string;
|
|
106
|
-
output_format?: string;
|
|
107
|
-
preserve_details?: boolean;
|
|
108
|
-
}>;
|
|
109
|
-
type NexraVideoUpscaleInput = Readonly<{
|
|
110
|
-
source_duration: number;
|
|
111
|
-
config?: string;
|
|
112
|
-
scale?: number;
|
|
113
|
-
resolution?: string;
|
|
114
|
-
output_format?: string;
|
|
115
|
-
preserve_details?: boolean;
|
|
116
|
-
}> & (Readonly<{
|
|
117
|
-
content: readonly [NexraVideoContentPart];
|
|
118
|
-
vid?: never;
|
|
119
|
-
}> | Readonly<{
|
|
120
|
-
vid: string;
|
|
121
|
-
content?: never;
|
|
122
|
-
}>);
|
|
123
|
-
type NexraMediaInputByOperation = Readonly<{
|
|
124
|
-
"image.generate": NexraImageGenerateInput;
|
|
125
|
-
"video.generate": NexraVideoGenerateInput;
|
|
126
|
-
"audio.generate": NexraAudioGenerateInput;
|
|
127
|
-
"image.upscale": NexraImageUpscaleInput;
|
|
128
|
-
"video.upscale": NexraVideoUpscaleInput;
|
|
129
|
-
}>;
|
|
130
|
-
type NexraMediaKind = "image" | "video" | "audio";
|
|
131
|
-
type NexraMediaInputSlot = Readonly<{
|
|
132
|
-
mediaKind: NexraMediaKind;
|
|
133
|
-
role: string;
|
|
134
|
-
min?: number;
|
|
135
|
-
max: number;
|
|
136
|
-
maxBytes?: number;
|
|
137
|
-
minDurationSeconds?: number;
|
|
138
|
-
maxDurationSeconds?: number;
|
|
139
|
-
}>;
|
|
140
|
-
type NexraMediaInputMode = Readonly<{
|
|
141
|
-
id: string;
|
|
142
|
-
slots: readonly NexraMediaInputSlot[];
|
|
143
|
-
}>;
|
|
144
|
-
type NexraMediaParameterValue = string | number | boolean;
|
|
145
|
-
type NexraMediaParameter = Readonly<{
|
|
146
|
-
key: string;
|
|
147
|
-
label?: string;
|
|
148
|
-
}> & (Readonly<{
|
|
149
|
-
kind: "enum";
|
|
150
|
-
options: readonly NexraMediaParameterValue[];
|
|
151
|
-
default: NexraMediaParameterValue;
|
|
152
|
-
allowCustom?: boolean;
|
|
153
|
-
}> | Readonly<{
|
|
154
|
-
kind: "range";
|
|
155
|
-
min: number;
|
|
156
|
-
max: number;
|
|
157
|
-
step: number;
|
|
158
|
-
default: number;
|
|
159
|
-
autoValue?: number;
|
|
160
|
-
unit?: string;
|
|
161
|
-
}> | Readonly<{
|
|
162
|
-
kind: "toggle";
|
|
163
|
-
default: boolean;
|
|
164
|
-
}> | Readonly<{
|
|
165
|
-
kind: "resource";
|
|
166
|
-
resource: "voice";
|
|
167
|
-
default?: string;
|
|
168
|
-
allowCustom?: boolean;
|
|
169
|
-
}>);
|
|
170
|
-
type NexraMediaParameterConstraint = Readonly<{
|
|
171
|
-
when: Readonly<Record<string, NexraMediaParameterValue | readonly NexraMediaParameterValue[]>>;
|
|
172
|
-
parameter: string;
|
|
173
|
-
allowedValues?: readonly NexraMediaParameterValue[];
|
|
174
|
-
fixedValue?: NexraMediaParameterValue;
|
|
175
|
-
disabled?: boolean;
|
|
176
|
-
}>;
|
|
177
|
-
type NexraMediaOperationDefinition = Readonly<{
|
|
178
|
-
operation: NexraMediaOperation;
|
|
179
|
-
status: "active" | "hold";
|
|
180
|
-
outputKind: NexraMediaKind;
|
|
181
|
-
features: readonly NexraMediaFeature[];
|
|
182
|
-
parameterKeys: readonly string[];
|
|
183
|
-
}>;
|
|
184
|
-
declare const NEXRA_MEDIA_OPERATION_DEFINITIONS: readonly [{
|
|
185
|
-
readonly operation: "image.generate";
|
|
186
|
-
readonly status: "active";
|
|
187
|
-
readonly outputKind: "image";
|
|
188
|
-
readonly features: readonly ["text-to-image", "image-to-image", "image-reference", "image-edit", "image-inpaint", "image-control"];
|
|
189
|
-
readonly parameterKeys: readonly ["aspect_ratio", "resolution", "quality", "count", "output_format", "seed"];
|
|
190
|
-
}, {
|
|
191
|
-
readonly operation: "video.generate";
|
|
192
|
-
readonly status: "active";
|
|
193
|
-
readonly outputKind: "video";
|
|
194
|
-
readonly features: readonly ["text-to-video", "first-frame", "first-last-frame", "image-to-video", "video-to-video", "audio-to-video", "avatar-video", "reference-image", "reference-video", "reference-audio", "omni-reference"];
|
|
195
|
-
readonly parameterKeys: readonly ["voice", "aspect_ratio", "resolution", "quality", "duration", "fit", "title", "generate_audio", "output_format", "seed", "watermark"];
|
|
196
|
-
}, {
|
|
197
|
-
readonly operation: "audio.generate";
|
|
198
|
-
readonly status: "active";
|
|
199
|
-
readonly outputKind: "audio";
|
|
200
|
-
readonly features: readonly ["tts", "music", "sfx", "voice-reference", "voice-design"];
|
|
201
|
-
readonly parameterKeys: readonly ["voice", "language", "duration", "output_format", "sample_rate", "speed", "volume", "pitch", "emotion", "instrumental", "loop", "prompt_influence", "seed"];
|
|
202
|
-
}, {
|
|
203
|
-
readonly operation: "image.upscale";
|
|
204
|
-
readonly status: "active";
|
|
205
|
-
readonly outputKind: "image";
|
|
206
|
-
readonly features: readonly ["scale-factor", "target-resolution"];
|
|
207
|
-
readonly parameterKeys: readonly ["scale", "resolution", "output_format", "preserve_details"];
|
|
208
|
-
}, {
|
|
209
|
-
readonly operation: "video.upscale";
|
|
210
|
-
readonly status: "active";
|
|
211
|
-
readonly outputKind: "video";
|
|
212
|
-
readonly features: readonly ["scale-factor", "target-resolution"];
|
|
213
|
-
readonly parameterKeys: readonly ["scale", "resolution", "output_format", "preserve_details"];
|
|
214
|
-
}];
|
|
215
|
-
declare const NEXRA_MEDIA_INPUT_SCHEMAS: Readonly<Record<NexraPublishedMediaOperation, JsonObject>>;
|
|
216
|
-
declare function nexraMediaInputSchema(operation: NexraMediaOperation): JsonObject | undefined;
|
|
217
|
-
declare function isNexraMediaInput(value: unknown): value is JsonObject;
|
|
218
|
-
declare function nexraMediaOperationForMode(mode: string): NexraPublishedMediaOperation | undefined;
|
|
219
|
-
/** Narrow the shared category vocabulary for one Experience Center input mode. */
|
|
220
|
-
declare function nexraMediaInputSchemaForMode(mode: string): JsonObject | undefined;
|
|
221
|
-
|
|
222
|
-
export { NEXRA_GENERATION_OPERATIONS, NEXRA_MEDIA_API_VERSION, NEXRA_MEDIA_FEATURES, NEXRA_MEDIA_INPUT_SCHEMAS, NEXRA_MEDIA_OPERATIONS, NEXRA_MEDIA_OPERATION_DEFINITIONS, NEXRA_PUBLISHED_MEDIA_OPERATIONS, type NexraAudioContentPart, type NexraAudioGenerateInput, type NexraGenerationOperation, type NexraImageContentPart, type NexraImageGenerateInput, type NexraImageUpscaleInput, type NexraMediaContentPart, type NexraMediaFeature, type NexraMediaInputByOperation, type NexraMediaInputMode, type NexraMediaInputSlot, type NexraMediaKind, type NexraMediaOperation, type NexraMediaOperationDefinition, type NexraMediaParameter, type NexraMediaParameterConstraint, type NexraMediaSource, type NexraPublishedMediaOperation, type NexraTextContentPart, type NexraVideoContentPart, type NexraVideoGenerateInput, type NexraVideoKeyframeContentPart, type NexraVideoUpscaleInput, isNexraMediaInput, nexraMediaInputSchema, nexraMediaInputSchemaForMode, nexraMediaOperationForMode };
|
|
1
|
+
export { k as NEXRA_GENERATION_OPERATIONS, l as NEXRA_MEDIA_API_VERSION, m as NEXRA_MEDIA_FEATURES, n as NEXRA_MEDIA_INPUT_SCHEMAS, o as NEXRA_MEDIA_OPERATIONS, p as NEXRA_MEDIA_OPERATION_DEFINITIONS, q as NEXRA_PUBLISHED_MEDIA_OPERATIONS, r as NexraAudioContentPart, s as NexraAudioGenerateInput, t as NexraGenerationOperation, u as NexraImageContentPart, v as NexraImageGenerateInput, N as NexraImageLayer, g as NexraImageLayerDecompositionOutput, w as NexraImageUpscaleInput, x as NexraMediaContentPart, y as NexraMediaFeature, z as NexraMediaInputByOperation, B as NexraMediaInputMode, C as NexraMediaInputSlot, D as NexraMediaKind, E as NexraMediaOperation, F as NexraMediaOperationDefinition, G as NexraMediaParameter, H as NexraMediaParameterConstraint, I as NexraMediaSource, J as NexraPublishedMediaOperation, K as NexraTextContentPart, L as NexraVideoContentPart, O as NexraVideoGenerateInput, P as NexraVideoKeyframeContentPart, Q as NexraVideoUpscaleInput, R as isNexraMediaInput, S as nexraMediaInputSchema, T as nexraMediaInputSchemaForMode, U as nexraMediaOperationForMode } from './media-CwGmG5qB.js';
|
|
2
|
+
import './json-Cz0MkWQn.js';
|
package/dist/media.js
CHANGED
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { A as AssetImportRequest, a as AssetInput, b as AssetReference, c as AssetUploadOptions, d as MediaAsset, e as MediaAssetStatus, f as MediaKind } from './
|
|
2
|
-
export {
|
|
1
|
+
export { A as AssetImportRequest, a as AssetInput, b as AssetReference, c as AssetUploadOptions, d as MediaAsset, e as MediaAssetStatus, f as MediaKind, N as NexraImageLayer, g as NexraImageLayerDecompositionOutput } from './media-CwGmG5qB.js';
|
|
2
|
+
export { e as CreateNexraDisplayQuoteBatchRequest, C as CreateNexraQuoteRequest, F as FetchLike, M as MediaGeometryField, k as MediaGeometryProjection, z as ModelCapabilitySummary, A as ModelDateVersion, B as ModelEndpointSummary, D as ModelModality, x as ModelResourceList, E as ModelResourceOption, w as ModelSchema, u as ModelSearchParams, l as NexraBillingCurrency, g as NexraCatalogRevision, y as NexraClientOptions, f as NexraDisplayQuoteBatch, G as NexraDisplayQuoteBatchEntry, n as NexraModelOperation, h as NexraModelSpec, j as NexraModelSpecFilter, d as NexraQuote, o as NexraSalePrice, c as NexraSalePriceList, p as NexraSettlement, v as TaskModel, T as TaskModelSummary, U as UnifiedMediaGeometry } from './media-geometry-KwQh1O8Y.js';
|
|
3
3
|
export { C as CursorPage, a as JsonObject, b as JsonPrimitive, J as JsonValue } from './json-Cz0MkWQn.js';
|
|
4
4
|
export { A as ApiErrorPayload, N as NexraError, a as PublicError, b as PublicErrorContext, P as PublicErrorFields } from './errors-DJZuAKoO.js';
|
|
5
|
-
export { d as CreateTaskOptions, e as CreateTaskRequest, C as CreateVoiceRequest, f as RequestDetails, b as RunResult, R as RunTaskOptions, c as Task, h as TaskCost, i as TaskError, j as TaskEvent, k as TaskEventType, l as TaskListParams, m as TaskPage, n as TaskProgress, o as TaskReceipt, c as TaskResult, p as TaskStatus, q as TaskTiming, r as TaskUsage, s as TaskWebhookConfig, t as TerminalTaskStatus, u as VerifyWebhookOptions, V as Voice, a as VoiceCreation, W as WaitTaskOptions, v as WatchTaskOptions } from './voices-
|
|
5
|
+
export { d as CreateTaskOptions, e as CreateTaskRequest, C as CreateVoiceRequest, f as RequestDetails, b as RunResult, R as RunTaskOptions, c as Task, h as TaskCost, i as TaskError, j as TaskEvent, k as TaskEventType, l as TaskListParams, m as TaskPage, n as TaskProgress, o as TaskReceipt, c as TaskResult, p as TaskStatus, q as TaskTiming, r as TaskUsage, s as TaskWebhookConfig, t as TerminalTaskStatus, u as VerifyWebhookOptions, V as Voice, a as VoiceCreation, W as WaitTaskOptions, v as WatchTaskOptions } from './voices-B09HqQJJ.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as AssetUploadOptions, d as MediaAsset, A as AssetImportRequest,
|
|
2
|
-
import { H as HttpTransport,
|
|
1
|
+
import { c as AssetUploadOptions, d as MediaAsset, A as AssetImportRequest, h as AssetCertificationRequest, i as AssetCertification, j as AssetCertificationWaitOptions } from './media-CwGmG5qB.js';
|
|
2
|
+
import { H as HttpTransport, p as NexraSettlement } from './media-geometry-KwQh1O8Y.js';
|
|
3
3
|
import { a as JsonObject, J as JsonValue, C as CursorPage } from './json-Cz0MkWQn.js';
|
|
4
4
|
import { P as PublicErrorFields, a as PublicError, b as PublicErrorContext, N as NexraError } from './errors-DJZuAKoO.js';
|
|
5
5
|
|
|
@@ -178,9 +178,9 @@ interface Task<TOutput = JsonValue> extends PublicErrorFields {
|
|
|
178
178
|
/**
|
|
179
179
|
* Caller-supplied business data, returned unchanged; never sent to the provider.
|
|
180
180
|
* The platform extracts the reserved string keys `callerUrl` (caller origin,
|
|
181
|
-
* https URL)
|
|
182
|
-
*
|
|
183
|
-
*
|
|
181
|
+
* https URL), `endUserId` (opaque end-user identifier), and `endUserIp`
|
|
182
|
+
* (IPv4/IPv6 address) for support diagnostics. These caller assertions are
|
|
183
|
+
* checked for format only and remain unchanged inside `metadata`.
|
|
184
184
|
*/
|
|
185
185
|
metadata?: JsonObject;
|
|
186
186
|
timing?: TaskTiming;
|
|
@@ -229,12 +229,16 @@ interface RequestDetails extends PublicErrorFields {
|
|
|
229
229
|
billingReason?: Task["billingReason"];
|
|
230
230
|
settlement?: NexraSettlement;
|
|
231
231
|
metadata?: JsonObject;
|
|
232
|
-
/** Caller-asserted origin
|
|
232
|
+
/** Caller-asserted origin recorded with the request; diagnostics display only. */
|
|
233
233
|
callerUrl?: string | null;
|
|
234
234
|
/** Client address recorded at the trusted HTTP ingress; absent on historical requests. */
|
|
235
235
|
clientIp?: string | null;
|
|
236
|
-
/** Caller-asserted end-user identifier
|
|
236
|
+
/** Caller-asserted end-user identifier recorded with the request; diagnostics display only. */
|
|
237
237
|
endUserId?: string | null;
|
|
238
|
+
endUserIp?: string | null;
|
|
239
|
+
purpose?: string | null;
|
|
240
|
+
sourceSessionId?: string | null;
|
|
241
|
+
sourceTaskId?: string | null;
|
|
238
242
|
/** Name of the API key that authenticated this request; diagnostics display only. */
|
|
239
243
|
apiKeyName?: string | null;
|
|
240
244
|
/** Latest known execution update; omitted when not observed. */
|