@nodaro/sdk 2.74.0 → 2.76.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/dist/chunk-3WQ4UW3C.js +3 -0
- package/dist/chunk-3WQ4UW3C.js.map +1 -0
- package/dist/{chunk-IJAJTVEW.js → chunk-4Q3XZE5O.js} +17 -3
- package/dist/chunk-4Q3XZE5O.js.map +1 -0
- package/dist/{chunk-INRVOUKE.js → chunk-66IQZPPW.js} +47 -3
- package/dist/chunk-66IQZPPW.js.map +1 -0
- package/dist/{chunk-MQQA2E6J.cjs → chunk-6NIKAVI3.cjs} +2 -2
- package/dist/chunk-6NIKAVI3.cjs.map +1 -0
- package/dist/{chunk-YE6X5BQ2.js → chunk-6TR7QXSX.js} +3 -3
- package/dist/{chunk-YE6X5BQ2.js.map → chunk-6TR7QXSX.js.map} +1 -1
- package/dist/chunk-6YWXKDAY.cjs +190 -0
- package/dist/chunk-6YWXKDAY.cjs.map +1 -0
- package/dist/chunk-7NTMMIPC.cjs +4 -0
- package/dist/chunk-7NTMMIPC.cjs.map +1 -0
- package/dist/{chunk-CLBLAWH3.cjs → chunk-7PMOXQEO.cjs} +9 -9
- package/dist/{chunk-CLBLAWH3.cjs.map → chunk-7PMOXQEO.cjs.map} +1 -1
- package/dist/{chunk-BETFYVOR.cjs → chunk-7XKVBFKM.cjs} +5 -5
- package/dist/{chunk-BETFYVOR.cjs.map → chunk-7XKVBFKM.cjs.map} +1 -1
- package/dist/{chunk-HNUCPUIX.js → chunk-AOHDYZSZ.js} +3 -3
- package/dist/{chunk-HNUCPUIX.js.map → chunk-AOHDYZSZ.js.map} +1 -1
- package/dist/{chunk-TKSQCF2X.js → chunk-CSNYBGHP.js} +2 -2
- package/dist/chunk-CSNYBGHP.js.map +1 -0
- package/dist/{chunk-4AD3CBDK.cjs → chunk-E2NMFQNY.cjs} +18 -2
- package/dist/chunk-E2NMFQNY.cjs.map +1 -0
- package/dist/{chunk-NJ5ZFUWJ.js → chunk-FOC4VPGK.js} +4 -4
- package/dist/{chunk-NJ5ZFUWJ.js.map → chunk-FOC4VPGK.js.map} +1 -1
- package/dist/{chunk-KKQKJD7K.js → chunk-GWL4O3J2.js} +3 -3
- package/dist/chunk-GWL4O3J2.js.map +1 -0
- package/dist/{chunk-BNJUMQQ3.cjs → chunk-IKZIXM5C.cjs} +24 -8
- package/dist/{chunk-BNJUMQQ3.cjs.map → chunk-IKZIXM5C.cjs.map} +1 -1
- package/dist/{chunk-GU3YOOCK.cjs → chunk-IO7NEEZZ.cjs} +20 -18
- package/dist/chunk-IO7NEEZZ.cjs.map +1 -0
- package/dist/chunk-K53JD2ZC.js +187 -0
- package/dist/chunk-K53JD2ZC.js.map +1 -0
- package/dist/{chunk-6RH2SICN.cjs → chunk-KNBZFWVO.cjs} +22 -22
- package/dist/chunk-KNBZFWVO.cjs.map +1 -0
- package/dist/{chunk-UDRP64FX.js → chunk-NEGNTQLF.js} +24 -8
- package/dist/{chunk-UDRP64FX.js.map → chunk-NEGNTQLF.js.map} +1 -1
- package/dist/{chunk-VGY3WBNY.js → chunk-OO4AKYUN.js} +3 -3
- package/dist/{chunk-VGY3WBNY.js.map → chunk-OO4AKYUN.js.map} +1 -1
- package/dist/{chunk-CCXY4ZJM.js → chunk-SA7VTT7C.js} +3 -3
- package/dist/{chunk-CCXY4ZJM.js.map → chunk-SA7VTT7C.js.map} +1 -1
- package/dist/{chunk-SRL555ST.cjs → chunk-SGVJUVFD.cjs} +5 -5
- package/dist/{chunk-SRL555ST.cjs.map → chunk-SGVJUVFD.cjs.map} +1 -1
- package/dist/{chunk-VVVJW4DD.cjs → chunk-SGVTZ2J5.cjs} +31 -28
- package/dist/chunk-SGVTZ2J5.cjs.map +1 -0
- package/dist/{chunk-YUY56PT7.js → chunk-TZFZDEWI.js} +20 -19
- package/dist/chunk-TZFZDEWI.js.map +1 -0
- package/dist/{chunk-IKJNFENZ.js → chunk-U2F6IHHY.js} +20 -17
- package/dist/chunk-U2F6IHHY.js.map +1 -0
- package/dist/{chunk-C5GFDCK2.cjs → chunk-UKITRPXF.cjs} +2 -2
- package/dist/{chunk-C5GFDCK2.cjs.map → chunk-UKITRPXF.cjs.map} +1 -1
- package/dist/{chunk-VTHHSO2K.cjs → chunk-UPWAODYT.cjs} +4 -4
- package/dist/{chunk-VTHHSO2K.cjs.map → chunk-UPWAODYT.cjs.map} +1 -1
- package/dist/{chunk-YDRNPIUC.cjs → chunk-VMV5JH4U.cjs} +47 -3
- package/dist/chunk-VMV5JH4U.cjs.map +1 -0
- package/dist/{chunk-R5DTFY73.js → chunk-WY5QIOO4.js} +2 -2
- package/dist/{chunk-R5DTFY73.js.map → chunk-WY5QIOO4.js.map} +1 -1
- package/dist/{chunk-EJJIA765.cjs → chunk-XWPYN2VX.cjs} +5 -5
- package/dist/{chunk-EJJIA765.cjs.map → chunk-XWPYN2VX.cjs.map} +1 -1
- package/dist/{chunk-SZ67PDKE.js → chunk-YQ2Q4OM3.js} +3 -3
- package/dist/{chunk-SZ67PDKE.js.map → chunk-YQ2Q4OM3.js.map} +1 -1
- package/dist/{chunk-TQLOD7OL.cjs → chunk-ZJM5YBXY.cjs} +4 -4
- package/dist/{chunk-TQLOD7OL.cjs.map → chunk-ZJM5YBXY.cjs.map} +1 -1
- package/dist/entries/billing.cjs +2 -2
- package/dist/entries/billing.d.cts +93 -5
- package/dist/entries/billing.d.ts +93 -5
- package/dist/entries/billing.js +1 -1
- package/dist/entries/cast-swap.cjs +2 -2
- package/dist/entries/cast-swap.d.cts +2 -623
- package/dist/entries/cast-swap.d.ts +2 -623
- package/dist/entries/cast-swap.js +1 -1
- package/dist/entries/characters.d.cts +1 -1
- package/dist/entries/characters.d.ts +1 -1
- package/dist/entries/client.cjs +20 -20
- package/dist/entries/client.d.cts +7 -5
- package/dist/entries/client.d.ts +7 -5
- package/dist/entries/client.js +15 -15
- package/dist/entries/copilot.cjs +4 -4
- package/dist/entries/copilot.js +3 -3
- package/dist/entries/core.cjs +6 -6
- package/dist/entries/core.js +2 -2
- package/dist/entries/creatures.d.cts +1 -1
- package/dist/entries/creatures.d.ts +1 -1
- package/dist/entries/credits.cjs +2 -2
- package/dist/entries/credits.d.cts +49 -9
- package/dist/entries/credits.d.ts +49 -9
- package/dist/entries/credits.js +1 -1
- package/dist/entries/edit.cjs +7 -7
- package/dist/entries/edit.js +2 -2
- package/dist/entries/errors.cjs +36 -28
- package/dist/entries/errors.d.cts +24 -1
- package/dist/entries/errors.d.ts +24 -1
- package/dist/entries/errors.js +1 -1
- package/dist/entries/jobs.cjs +2 -2
- package/dist/entries/jobs.d.cts +4 -4
- package/dist/entries/jobs.d.ts +4 -4
- package/dist/entries/jobs.js +1 -1
- package/dist/entries/locations.d.cts +1 -1
- package/dist/entries/locations.d.ts +1 -1
- package/dist/entries/media.cjs +4 -4
- package/dist/entries/media.d.cts +1 -1
- package/dist/entries/media.d.ts +1 -1
- package/dist/entries/media.js +3 -3
- package/dist/entries/nodes.cjs +3 -3
- package/dist/entries/nodes.d.cts +1 -1
- package/dist/entries/nodes.d.ts +1 -1
- package/dist/entries/nodes.js +2 -2
- package/dist/entries/objects.d.cts +1 -1
- package/dist/entries/objects.d.ts +1 -1
- package/dist/entries/scene3d.d.cts +2 -2
- package/dist/entries/scene3d.d.ts +2 -2
- package/dist/entries/studio.cjs +5 -5
- package/dist/entries/studio.js +2 -2
- package/dist/entries/trends.cjs +2 -2
- package/dist/entries/trends.d.cts +26 -18
- package/dist/entries/trends.d.ts +26 -18
- package/dist/entries/trends.js +1 -1
- package/dist/entries/uploads.cjs +7 -2
- package/dist/entries/uploads.d.cts +60 -1
- package/dist/entries/uploads.d.ts +60 -1
- package/dist/entries/uploads.js +2 -1
- package/dist/entries/video-remake.cjs +13 -0
- package/dist/entries/video-remake.cjs.map +1 -0
- package/dist/entries/video-remake.d.cts +4 -0
- package/dist/entries/video-remake.d.ts +4 -0
- package/dist/entries/video-remake.js +4 -0
- package/dist/entries/video-remake.js.map +1 -0
- package/dist/index.cjs +82 -65
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +16 -15
- package/dist/{nodes-DEGPmZ9a.d.cts → nodes-BHtjh6gl.d.cts} +8 -5
- package/dist/{nodes-CHXTwiWW.d.ts → nodes-BaRqRB2Z.d.ts} +8 -5
- package/dist/video-remake-C-KR7YtT.d.ts +676 -0
- package/dist/video-remake-DTuCyhd9.d.cts +676 -0
- package/package.json +8 -3
- package/dist/chunk-4AD3CBDK.cjs.map +0 -1
- package/dist/chunk-6RH2SICN.cjs.map +0 -1
- package/dist/chunk-F6KAMECM.cjs +0 -72
- package/dist/chunk-F6KAMECM.cjs.map +0 -1
- package/dist/chunk-GU3YOOCK.cjs.map +0 -1
- package/dist/chunk-IJAJTVEW.js.map +0 -1
- package/dist/chunk-IKJNFENZ.js.map +0 -1
- package/dist/chunk-INRVOUKE.js.map +0 -1
- package/dist/chunk-KKQKJD7K.js.map +0 -1
- package/dist/chunk-MQQA2E6J.cjs.map +0 -1
- package/dist/chunk-TKSQCF2X.js.map +0 -1
- package/dist/chunk-VVVJW4DD.cjs.map +0 -1
- package/dist/chunk-YDRNPIUC.cjs.map +0 -1
- package/dist/chunk-YEOK5A5H.js +0 -70
- package/dist/chunk-YEOK5A5H.js.map +0 -1
- package/dist/chunk-YUY56PT7.js.map +0 -1
|
@@ -0,0 +1,676 @@
|
|
|
1
|
+
import { N as NodaroClientCore } from './developer-apps-D59GfAnO.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Video Remake (the `videoRemake` resource; routes `/v1/video-remake`) — replace
|
|
5
|
+
* the people, pets, products and/or the location in a short video with your
|
|
6
|
+
* own references, keeping its motion, framing, timing and sound (the clip's
|
|
7
|
+
* audio is kept, and the result is the clip's length).
|
|
8
|
+
*
|
|
9
|
+
* Before the video, each person, pet and product role's photos are turned
|
|
10
|
+
* into one clean reference picture by an image model. This costs extra
|
|
11
|
+
* credits (`breakdown.references` in the estimate), charged when it runs, even
|
|
12
|
+
* if the video then fails; it adds about a minute, falls back to your own
|
|
13
|
+
* photos if it fails, and is turned off with `prepareReferences: false`.
|
|
14
|
+
* Locations are not prepared.
|
|
15
|
+
*
|
|
16
|
+
* Engines: a run is made on Nodaro Prism (`engine` left out, or
|
|
17
|
+
* `"nodaro-prism"`) or Nodaro Pulse (`"nodaro-pulse"`). Prism renders
|
|
18
|
+
* 480p (the default; plain unless `draft: true`), 720p or 1080p. Pulse renders
|
|
19
|
+
* 720p (its default) or 1080p and makes a new take guided by the clip and
|
|
20
|
+
* pictures; it has no draft, so no Full Quality: run it again at 1080p instead.
|
|
21
|
+
*
|
|
22
|
+
* How the clip is prepared for the video model (for one, whether faces are
|
|
23
|
+
* hidden first, and whether a refused clip is retried) is set by Nodaro for
|
|
24
|
+
* each engine; a run cannot change it. `faceMasking` is no longer read
|
|
25
|
+
* (deprecated: accepted and ignored).
|
|
26
|
+
*
|
|
27
|
+
* Cloud edition only: `/v1/video-remake` is served by the cloud plugin and 404s
|
|
28
|
+
* on self-hosted installs. `run()` answers 202 with a job id; follow it with
|
|
29
|
+
* `client.jobs.get(jobId)` / `client.jobs.getStatus(jobId)` like any other job.
|
|
30
|
+
*
|
|
31
|
+
* Repeats: pass `{ idempotencyKey }` to `run()` and it is sent as the
|
|
32
|
+
* `Idempotency-Key` header. A repeat with the same key within the credit
|
|
33
|
+
* guard's dedup window (about 10 s) answers 200 `{ jobId, deduped: true }` with
|
|
34
|
+
* an `X-Dedup-Hit` header; a later one answers 202 with the first run's
|
|
35
|
+
* `jobId`. Nothing new is started or charged.
|
|
36
|
+
*
|
|
37
|
+
* Refusals (thrown as a `NodaroError` subclass; body `{ error: { code, message } }`), before
|
|
38
|
+
* anything is charged: 400 `validation_error` (the body: no role with images,
|
|
39
|
+
* no reference, no `prePrompt` or `postPrompt` and no art style (Flex on
|
|
40
|
+
* Nodaro Prism), more roles of a kind
|
|
41
|
+
* than allowed, more than 30 images in all, `draft: true` above 480p, a
|
|
42
|
+
* `prePrompt` or `postPrompt` over 4,000 characters); on Nodaro Pulse,
|
|
43
|
+
* `draft_unsupported` (`draft: true`), `resolution_unsupported` (480p),
|
|
44
|
+
* `output_format_unsupported` (a MOV edit output) and `too_many_images` (more
|
|
45
|
+
* than 10 images in the run, across every role and fixed reference);
|
|
46
|
+
* `raw_reference_token` (also in a reference's `line`),
|
|
47
|
+
* `invalid_role_mention` (also any `{role:N}` in a reference's `line`),
|
|
48
|
+
* `unsafe_url`, `video_unreadable`, `clip_out_of_range` (4–30 s),
|
|
49
|
+
* `preview_out_of_range`, `unnamed_role_needs_picture` (a role with no name
|
|
50
|
+
* and no image), `no_roles_in_preview` (a preview that would change nothing,
|
|
51
|
+
* judged on what it sends: no role kept in it with images, no fixed
|
|
52
|
+
* reference, no `prePrompt` or `postPrompt` and no art style), `prompt_too_long`
|
|
53
|
+
* (the prompt would build too long: a `{role:N}` reads as the role's name when
|
|
54
|
+
* it sends no images; Nodaro Pulse's cap is 8,000 characters); 401; 402 `insufficient_credits` (`run()` only); 404
|
|
55
|
+
* (a `sessionId` you may not use, `run()` only); 422 `job_blocked` (`run()`
|
|
56
|
+
* only); 503 `host_too_old` (both); 503 `estimate_unavailable` (`estimate()`
|
|
57
|
+
* only).
|
|
58
|
+
*/
|
|
59
|
+
/**
|
|
60
|
+
* The engine a Video Remake run is made on, by its public id. Left out =
|
|
61
|
+
* `"nodaro-prism"`.
|
|
62
|
+
*
|
|
63
|
+
* - `"nodaro-prism"` (Nodaro Prism): 480p (the default; plain unless
|
|
64
|
+
* `draft: true`), 720p or 1080p; Full Quality finishes a draft's own take at
|
|
65
|
+
* 1080p.
|
|
66
|
+
* - `"nodaro-pulse"` (Nodaro Pulse): 720p (the default) or 1080p, never a
|
|
67
|
+
* draft (`draft: true` answers 400 `draft_unsupported`), so no Full Quality:
|
|
68
|
+
* run it again at 1080p instead. A preview is still 4 s from `previewStart`.
|
|
69
|
+
*/
|
|
70
|
+
type VideoRemakeEngine = "nodaro-prism" | "nodaro-pulse";
|
|
71
|
+
/**
|
|
72
|
+
* The engine ids an older client sent: the earlier public ids
|
|
73
|
+
* (`"motion-prism"` and `"motion-pro"` = `"nodaro-prism"`, `"motion-pulse"`
|
|
74
|
+
* and `"motion-lite"` = `"nodaro-pulse"`) and the internal ones
|
|
75
|
+
* (`"seedance-2-5"`, `"kling-4"`). Still accepted in a request; never
|
|
76
|
+
* returned.
|
|
77
|
+
* @deprecated use {@link VideoRemakeEngine}.
|
|
78
|
+
*/
|
|
79
|
+
type VideoRemakeEngineLegacyId = "motion-prism" | "motion-pulse" | "motion-pro" | "motion-lite" | "seedance-2-5" | "kling-4";
|
|
80
|
+
/**
|
|
81
|
+
* How a run follows its clip. Left out = `"precise"`.
|
|
82
|
+
*
|
|
83
|
+
* - `"precise"`: follows the clip exactly.
|
|
84
|
+
* - `"motion"`: follows the clip's movement and takes the looks from your
|
|
85
|
+
* photos, more freely than `"precise"`. Its price may differ from
|
|
86
|
+
* `"precise"`'s: the estimate shows the exact price.
|
|
87
|
+
*/
|
|
88
|
+
type VideoRemakeStyle = "precise" | "motion";
|
|
89
|
+
/**
|
|
90
|
+
* Where a Nodaro Pulse run cuts the clip to whole seconds (Pulse renders
|
|
91
|
+
* whole seconds; asked for more than the clip, it would stretch the motion):
|
|
92
|
+
* - `"cut-end"` (the default): drop the fraction of a second at its end;
|
|
93
|
+
* - `"cut-start"`: drop it at its start.
|
|
94
|
+
*/
|
|
95
|
+
type VideoRemakeMotionLength = "cut-end" | "cut-start";
|
|
96
|
+
/** Whether a swapped subject takes this trait from the references (`"new"`) or keeps the video's (`"original"`). */
|
|
97
|
+
type VideoRemakeTraitSource = "new" | "original";
|
|
98
|
+
/**
|
|
99
|
+
* Preview-only settings, on every role kind; a full run (`preview` not `true`)
|
|
100
|
+
* ignores both.
|
|
101
|
+
*/
|
|
102
|
+
interface VideoRemakeRolePreviewSettings {
|
|
103
|
+
/** The name used instead of `name` in a preview. Same rules as `name` (1–200 characters). */
|
|
104
|
+
previewName?: string;
|
|
105
|
+
/**
|
|
106
|
+
* `false` leaves this role out of the preview: its reference images are not
|
|
107
|
+
* sent, not prepared and not charged, and a `{role:N}` naming it reads as its
|
|
108
|
+
* `previewName`, else its `name`. Default `true`. A preview that would
|
|
109
|
+
* change nothing (no role kept in it with images, no fixed reference, no pre
|
|
110
|
+
* or post prompt and no art style) answers 400 `no_roles_in_preview`.
|
|
111
|
+
*/
|
|
112
|
+
inPreview?: boolean;
|
|
113
|
+
}
|
|
114
|
+
/** A person in the video to recast. */
|
|
115
|
+
interface VideoRemakePersonRole extends VideoRemakeRolePreviewSettings {
|
|
116
|
+
kind: "person";
|
|
117
|
+
/** How the person is told apart in the video, e.g. `"the woman that attacks"`.
|
|
118
|
+
*
|
|
119
|
+
* Direct runs only: omit it (or leave it empty) and the role is named by its
|
|
120
|
+
* first picture — matched to the subject in the video it fits best; such a
|
|
121
|
+
* role needs at least one image (else 400 `unnamed_role_needs_picture`). A
|
|
122
|
+
* trend run's roles are always named (400 `role_name_required`).
|
|
123
|
+
*/
|
|
124
|
+
name?: string;
|
|
125
|
+
/** 0–3 images of ONE person. Empty or `null` keeps the original person. */
|
|
126
|
+
images: string[] | null;
|
|
127
|
+
/** Body from the references or the video. Default `"new"`. */
|
|
128
|
+
body?: VideoRemakeTraitSource;
|
|
129
|
+
/** Outfit from the references or the video. Default `"new"`. */
|
|
130
|
+
outfit?: VideoRemakeTraitSource;
|
|
131
|
+
/** Hairstyle and haircut from the references or the video. Default `"new"`. */
|
|
132
|
+
hair?: VideoRemakeTraitSource;
|
|
133
|
+
}
|
|
134
|
+
/** The place the video happens in. */
|
|
135
|
+
interface VideoRemakeLocationRole extends VideoRemakeRolePreviewSettings {
|
|
136
|
+
kind: "location";
|
|
137
|
+
/** How the place is named. Default `"the setting"`. */
|
|
138
|
+
name?: string;
|
|
139
|
+
/** 0–3 images of ONE place. Empty or `null` keeps the original place. */
|
|
140
|
+
images: string[] | null;
|
|
141
|
+
}
|
|
142
|
+
/** An animal in the video to recast. */
|
|
143
|
+
interface VideoRemakePetRole extends VideoRemakeRolePreviewSettings {
|
|
144
|
+
kind: "pet";
|
|
145
|
+
/** How the animal is told apart in the video, e.g. `"the dog"`.
|
|
146
|
+
*
|
|
147
|
+
* Direct runs only: omit it (or leave it empty) and the role is named by its
|
|
148
|
+
* first picture — matched to the subject in the video it fits best; such a
|
|
149
|
+
* role needs at least one image (else 400 `unnamed_role_needs_picture`). A
|
|
150
|
+
* trend run's roles are always named (400 `role_name_required`).
|
|
151
|
+
*/
|
|
152
|
+
name?: string;
|
|
153
|
+
/** 0–3 images of ONE animal. Empty or `null` keeps the original animal. */
|
|
154
|
+
images: string[] | null;
|
|
155
|
+
/** Body (shape, size and build) from the references or the video. Default `"new"`. */
|
|
156
|
+
body?: VideoRemakeTraitSource;
|
|
157
|
+
/** Coat (fur, colors and markings) from the references or the video. Default `"new"`. */
|
|
158
|
+
coat?: VideoRemakeTraitSource;
|
|
159
|
+
}
|
|
160
|
+
/** An object in the video to recast. */
|
|
161
|
+
interface VideoRemakeProductRole extends VideoRemakeRolePreviewSettings {
|
|
162
|
+
kind: "product";
|
|
163
|
+
/** How the object is told apart in the video, e.g. `"the can"`.
|
|
164
|
+
*
|
|
165
|
+
* Direct runs only: omit it (or leave it empty) and the role is named by its
|
|
166
|
+
* first picture — matched to the subject in the video it fits best; such a
|
|
167
|
+
* role needs at least one image (else 400 `unnamed_role_needs_picture`). A
|
|
168
|
+
* trend run's roles are always named (400 `role_name_required`).
|
|
169
|
+
*/
|
|
170
|
+
name?: string;
|
|
171
|
+
/** 0–3 images of ONE product. Empty or `null` keeps the original object. */
|
|
172
|
+
images: string[] | null;
|
|
173
|
+
/** Shape and proportions from the references or the video. Default `"new"`. */
|
|
174
|
+
shape?: VideoRemakeTraitSource;
|
|
175
|
+
/** Finish (colors, materials, label and markings) from the references or the video. Default `"new"`. */
|
|
176
|
+
finish?: VideoRemakeTraitSource;
|
|
177
|
+
}
|
|
178
|
+
type VideoRemakeRole = VideoRemakePersonRole | VideoRemakeLocationRole | VideoRemakePetRole | VideoRemakeProductRole;
|
|
179
|
+
/**
|
|
180
|
+
* A fixed reference: 1–3 images of ONE thing that no role replaces, and the
|
|
181
|
+
* line that says what it is (`"the glass she drinks from"`). Sent as given,
|
|
182
|
+
* never prepared; its images count toward the 30.
|
|
183
|
+
*/
|
|
184
|
+
interface VideoRemakeReference {
|
|
185
|
+
/** 1–3 http(s) image URLs of one thing. */
|
|
186
|
+
images: string[];
|
|
187
|
+
/**
|
|
188
|
+
* What it is, 1–500 characters. `{image}` in the line stands for this
|
|
189
|
+
* reference's first image (`"Use {image} for the sky"`); a line without it
|
|
190
|
+
* gets it appended. A `{role:N}` or a raw `{image:` / `{video:` / `{audio:`
|
|
191
|
+
* token answers 400.
|
|
192
|
+
*/
|
|
193
|
+
line: string;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* @deprecated Nodaro sets this per engine; a run's `faceMasking` is ignored.
|
|
197
|
+
*/
|
|
198
|
+
interface VideoRemakeFaceMaskingZone {
|
|
199
|
+
leftPct?: number;
|
|
200
|
+
rightPct?: number;
|
|
201
|
+
topPct?: number;
|
|
202
|
+
bottomPct?: number;
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* @deprecated Nodaro sets how the clip is prepared for the video model, per
|
|
206
|
+
* engine; a run cannot change it. A `faceMasking` sent is accepted and
|
|
207
|
+
* ignored (no error), so older code keeps working unchanged.
|
|
208
|
+
*/
|
|
209
|
+
interface VideoRemakeFaceMasking {
|
|
210
|
+
mode: "off" | "always" | "auto";
|
|
211
|
+
fill?: "blur" | "depth";
|
|
212
|
+
minFaceHeightPct?: number;
|
|
213
|
+
maxFaceHeightPct?: number;
|
|
214
|
+
zone?: VideoRemakeFaceMaskingZone | null;
|
|
215
|
+
blurStrengthPct?: number;
|
|
216
|
+
threshold?: number;
|
|
217
|
+
}
|
|
218
|
+
/** The body of `POST /v1/video-remake` and `POST /v1/video-remake/estimate`. */
|
|
219
|
+
interface VideoRemakeParams {
|
|
220
|
+
/** The source clip, 4–30 seconds. */
|
|
221
|
+
videoUrl: string;
|
|
222
|
+
/**
|
|
223
|
+
* Who and what to swap: at most 6 person roles, 1 location role, 3 pet roles
|
|
224
|
+
* and 3 product roles, with at most 30 images in all. A role with no images
|
|
225
|
+
* is skipped (that subject or place stays as in the video). At least one role
|
|
226
|
+
* with images, a fixed reference, a `prePrompt` or `postPrompt`, or an art
|
|
227
|
+
* style (`direction`, Flex on Nodaro Prism) is required. With an art
|
|
228
|
+
* style and nothing to swap, a run restyles the whole clip (see `direction`).
|
|
229
|
+
*/
|
|
230
|
+
roles: VideoRemakeRole[];
|
|
231
|
+
/**
|
|
232
|
+
* Fixed references (at most 5): things the video should show that no role
|
|
233
|
+
* replaces, each with the line that names it. Their images count toward the
|
|
234
|
+
* 30. A reference alone is enough for a run (no role needs images).
|
|
235
|
+
*/
|
|
236
|
+
references?: VideoRemakeReference[];
|
|
237
|
+
/**
|
|
238
|
+
* Your own words placed at the start of the prompt, before the role
|
|
239
|
+
* instructions; at most 4,000 characters. Mention a role as `{role:N}`, as in
|
|
240
|
+
* `postPrompt`; the same 400 refusals apply (an N outside 1..`roles.length`,
|
|
241
|
+
* a raw `{image:` / `{video:` / `{audio:` token).
|
|
242
|
+
*/
|
|
243
|
+
prePrompt?: string;
|
|
244
|
+
/**
|
|
245
|
+
* Extra instructions in your own words, at most 4,000 characters. Mention a
|
|
246
|
+
* role as `{role:N}`, where N is its 1-based position in `roles`
|
|
247
|
+
* (`{role:1}` is `roles[0]`; empty roles count).
|
|
248
|
+
*
|
|
249
|
+
* The route answers 400, before charging, for an N outside 1..`roles.length`,
|
|
250
|
+
* for a raw `{image:` / `{video:` / `{audio:` token in the pre or post prompt
|
|
251
|
+
* or a role's `name`, for a clip outside 4–30 s, and for a preview past the clip's
|
|
252
|
+
* end (`previewStart + 4` > its length).
|
|
253
|
+
*/
|
|
254
|
+
postPrompt?: string;
|
|
255
|
+
/** `true` runs on 4 seconds of the clip, starting at `previewStart`: a cheap check of the roles and choices. */
|
|
256
|
+
preview?: boolean;
|
|
257
|
+
/** Where the preview starts, in seconds. Default 0. */
|
|
258
|
+
previewStart?: number;
|
|
259
|
+
/**
|
|
260
|
+
* The engine (see {@link VideoRemakeEngine}). Default `"nodaro-prism"`. The job
|
|
261
|
+
* records it in `input_data.engine`, and a completed job's output in its
|
|
262
|
+
* `engine`. The ids an older client sent ({@link VideoRemakeEngineLegacyId})
|
|
263
|
+
* are still accepted.
|
|
264
|
+
*/
|
|
265
|
+
engine?: VideoRemakeEngine | VideoRemakeEngineLegacyId;
|
|
266
|
+
/**
|
|
267
|
+
* How the run follows the clip (see {@link VideoRemakeStyle}). Default
|
|
268
|
+
* `"precise"`; the job records it in `input_data.style`.
|
|
269
|
+
*/
|
|
270
|
+
style?: VideoRemakeStyle;
|
|
271
|
+
/**
|
|
272
|
+
* A direct run on Nodaro Prism: an art style that restyles the whole
|
|
273
|
+
* video, as a `direction.style` id of the platform's `style` picker catalog
|
|
274
|
+
* (the same ids an image's `direction.style` takes); the platform words it.
|
|
275
|
+
* A Flex run (`style: "motion"`) takes one, and so does a Precise run where
|
|
276
|
+
* {@link VideoRemakeResource.styleChoice} answers `preciseArtStyle` true for the
|
|
277
|
+
* engine. Nodaro may make such a Precise request the way a Flex run is made
|
|
278
|
+
* (its engine does by default, unless Nodaro turns that off): its estimate,
|
|
279
|
+
* price and Full Quality are then a Flex run's, while the job still records
|
|
280
|
+
* the style sent (`input_data.style` absent, or `"precise"`; jobs made so
|
|
281
|
+
* before the style was kept record `"motion"`). Otherwise it is Precise's edit
|
|
282
|
+
* of the clip, drawn in the art style. Refused with
|
|
283
|
+
* 400 `unknown_art_style` (not in the catalog), `art_style_not_supported` (a
|
|
284
|
+
* saved moodboard, `moodboard:…`) or `art_style_needs_flex` (a trend run, a
|
|
285
|
+
* Flex run whose prompt is made Precise by Nodaro's setting for how Flex
|
|
286
|
+
* runs are prepared, or a Precise request on an engine from before Precise
|
|
287
|
+
* runs took one), and on Nodaro Pulse with `art_style_needs_prism`.
|
|
288
|
+
* The estimate (sent with the same `direction`) shows the price: it changes
|
|
289
|
+
* only where Nodaro's setting for such runs first redraws the role pictures
|
|
290
|
+
* in the art style.
|
|
291
|
+
*
|
|
292
|
+
* Style only: with no role with images and no fixed reference, the art style
|
|
293
|
+
* alone is the run's change (a pre or post prompt is still added). It
|
|
294
|
+
* restyles the whole clip, keeping the people, places, motion and sound, and
|
|
295
|
+
* is charged for what it runs (the estimate shows it; no clip-preparation
|
|
296
|
+
* `privacy` part). By default a black-and-white art style comes out
|
|
297
|
+
* monochrome. Nodaro may run it the way other art-style runs run instead,
|
|
298
|
+
* priced as those are and not made monochrome.
|
|
299
|
+
* A preview takes its full run's path. Runs this way only on a Flex run, and
|
|
300
|
+
* only where {@link VideoRemakeResource.styleChoice} answers `styleOnly` true
|
|
301
|
+
* for the engine; elsewhere on Nodaro Prism an art style alone is
|
|
302
|
+
* refused (on a Precise run that stays Precise too, unless
|
|
303
|
+
* {@link VideoRemakeResource.styleChoice} answers `preciseArtStyleAlone` true for
|
|
304
|
+
* the engine, where it is that run's change), and one with a pre or post prompt
|
|
305
|
+
* runs as any other art-style run. The job records it in
|
|
306
|
+
* `input_data.direction`.
|
|
307
|
+
*/
|
|
308
|
+
direction?: {
|
|
309
|
+
style: string;
|
|
310
|
+
};
|
|
311
|
+
/**
|
|
312
|
+
* Nodaro Pulse only (Prism ignores it): which end of the clip is cut to
|
|
313
|
+
* whole seconds (see {@link VideoRemakeMotionLength}). Default `"cut-end"`.
|
|
314
|
+
*/
|
|
315
|
+
motionLength?: VideoRemakeMotionLength;
|
|
316
|
+
/** @deprecated use {@link motionLength} (still accepted). */
|
|
317
|
+
klingLength?: VideoRemakeMotionLength;
|
|
318
|
+
/**
|
|
319
|
+
* The output resolution. Nodaro Prism: `"480p"` (default), `"720p"` or
|
|
320
|
+
* `"1080p"`. Nodaro Pulse: `"720p"` (default) or `"1080p"`; `"480p"`
|
|
321
|
+
* answers 400.
|
|
322
|
+
*/
|
|
323
|
+
resolution?: "480p" | "720p" | "1080p";
|
|
324
|
+
/**
|
|
325
|
+
* `true` makes a draft: a 480p run whose same take Full Quality can finish
|
|
326
|
+
* at 1080p (Nodaro Prism only). Default `false`: a plain run, at 480p
|
|
327
|
+
* too, which Full Quality cannot finish. `true` with `"720p"` or `"1080p"`
|
|
328
|
+
* answers 400 (draft is 480p only). Nodaro Pulse has no draft: `true`
|
|
329
|
+
* answers 400 `draft_unsupported`.
|
|
330
|
+
*/
|
|
331
|
+
draft?: boolean;
|
|
332
|
+
/**
|
|
333
|
+
* Turn each person, pet and product role's photos into one clean reference
|
|
334
|
+
* picture before the video (extra credits, shown in `breakdown.references`;
|
|
335
|
+
* about a minute longer; falls back to your own photos if it fails).
|
|
336
|
+
* Default `true`.
|
|
337
|
+
*/
|
|
338
|
+
prepareReferences?: boolean;
|
|
339
|
+
/**
|
|
340
|
+
* Ignored: Nodaro sets how the clip is prepared, per engine. Accepted (no
|
|
341
|
+
* error) so older code keeps working.
|
|
342
|
+
* @deprecated leave it out.
|
|
343
|
+
*/
|
|
344
|
+
faceMasking?: VideoRemakeFaceMasking;
|
|
345
|
+
/**
|
|
346
|
+
* `"draft"` means 480p draft.
|
|
347
|
+
* @deprecated use `resolution` + `draft`.
|
|
348
|
+
*/
|
|
349
|
+
quality?: "draft";
|
|
350
|
+
/** A generation session to file the result in. */
|
|
351
|
+
sessionId?: string;
|
|
352
|
+
/** The client app that sent the run (stored on the job as `input_data.origin`). */
|
|
353
|
+
origin?: string;
|
|
354
|
+
}
|
|
355
|
+
/** What a run would cost, in credits. */
|
|
356
|
+
interface VideoRemakeEstimate {
|
|
357
|
+
/**
|
|
358
|
+
* The engine the run would use, by its public id (absent from an older
|
|
359
|
+
* server = `"nodaro-prism"`). An id an older server answers is read as the
|
|
360
|
+
* public id it names.
|
|
361
|
+
*/
|
|
362
|
+
engine?: VideoRemakeEngine;
|
|
363
|
+
/**
|
|
364
|
+
* What is held when the run starts. The run is charged what it actually
|
|
365
|
+
* costs, which is expected to be `expectedCredits`.
|
|
366
|
+
*/
|
|
367
|
+
totalCredits: number;
|
|
368
|
+
/**
|
|
369
|
+
* The charge the run is expected to come to. Never above `totalCredits`
|
|
370
|
+
* (on Nodaro Pulse it equals it: Pulse renders exactly the length
|
|
371
|
+
* asked for, so the hold is what it settles at). Absent from an older
|
|
372
|
+
* server: read `totalCredits` then.
|
|
373
|
+
*/
|
|
374
|
+
expectedCredits?: number;
|
|
375
|
+
/**
|
|
376
|
+
* The parts of the quote, by name, for display only:
|
|
377
|
+
* - `base`: the run itself (its base fee). An older server
|
|
378
|
+
* names it `castSwap` instead: read `base`, else `castSwap`;
|
|
379
|
+
* - `references`: preparing the reference pictures (0 when
|
|
380
|
+
* `prepareReferences` is off or there is nothing to prepare);
|
|
381
|
+
* - `motion`: what the video holds (on Nodaro Pulse, what it costs);
|
|
382
|
+
* - `motionExpected`: what the video is expected to be charged, never above
|
|
383
|
+
* `motion` (Nodaro Prism);
|
|
384
|
+
* - `privacy`: preparing the clip, when the engine's setting does. In both
|
|
385
|
+
* totals when it always runs; outside both when it is the retry
|
|
386
|
+
* (`privacyCredits`).
|
|
387
|
+
* - `prompt`: the prompt written for the run by a language model, when
|
|
388
|
+
* Nodaro's setting for the engine does so (absent otherwise).
|
|
389
|
+
* - `referenceAudio`: preparing the clip's sound for the video model, when
|
|
390
|
+
* Nodaro's setting for the engine runs that step (absent otherwise).
|
|
391
|
+
*
|
|
392
|
+
* `motion` and `motionExpected` are alternatives, so the parts sum to more
|
|
393
|
+
* than either total: read `totalCredits` and `expectedCredits`, never the
|
|
394
|
+
* sum. Other parts may appear.
|
|
395
|
+
*/
|
|
396
|
+
breakdown: {
|
|
397
|
+
base?: number;
|
|
398
|
+
/** @deprecated read {@link base} (an older server answered this name for the same part). */
|
|
399
|
+
castSwap?: number;
|
|
400
|
+
references: number;
|
|
401
|
+
motion?: number;
|
|
402
|
+
motionExpected?: number;
|
|
403
|
+
privacy?: number;
|
|
404
|
+
prompt?: number;
|
|
405
|
+
referenceAudio?: number;
|
|
406
|
+
} & Record<string, number>;
|
|
407
|
+
/**
|
|
408
|
+
* The extra credits charged only if the video model refuses the clip and
|
|
409
|
+
* the run is retried (Nodaro's setting for the engine decides whether it
|
|
410
|
+
* does). Not in `totalCredits` or `expectedCredits`; `run()` needs credits
|
|
411
|
+
* for both the hold and this (else 402).
|
|
412
|
+
*/
|
|
413
|
+
privacyCredits?: number;
|
|
414
|
+
/** @deprecated read {@link privacyCredits} (an older server answered this name). */
|
|
415
|
+
maskingCredits?: number;
|
|
416
|
+
/**
|
|
417
|
+
* `true` when the video is made at Auto length (every Nodaro Prism
|
|
418
|
+
* run): the final charge is expected to come out lower than `totalCredits`,
|
|
419
|
+
* at about `expectedCredits`. `false` on Nodaro Pulse.
|
|
420
|
+
*/
|
|
421
|
+
settlesLower: boolean;
|
|
422
|
+
}
|
|
423
|
+
/** Per-call options for {@link VideoRemakeResource.run}. */
|
|
424
|
+
interface VideoRemakeRunOptions {
|
|
425
|
+
/**
|
|
426
|
+
* Sent as the `Idempotency-Key` header, unchanged (the SDK checks nothing;
|
|
427
|
+
* an empty string sends no header, like no key).
|
|
428
|
+
* The server takes 8–200 characters and answers 400 for any other length.
|
|
429
|
+
* Reuse the same value when retrying the same run: within about 10 s the
|
|
430
|
+
* repeat answers 200 `{ jobId, deduped: true }`, later 202 with the first
|
|
431
|
+
* run's `jobId`. Nothing new is started or charged.
|
|
432
|
+
*/
|
|
433
|
+
idempotencyKey?: string;
|
|
434
|
+
}
|
|
435
|
+
/**
|
|
436
|
+
* What a Full Quality version would be: `"same-take"` finishes a Nodaro
|
|
437
|
+
* Prism draft's own take at 1080p, and the draft stays. `"new-take"` was a new
|
|
438
|
+
* Nodaro Pulse take at 1080p from a 720p run's inputs; Pulse no longer
|
|
439
|
+
* has Full Quality, so a quote no longer answers it (kept so code that reads
|
|
440
|
+
* it still compiles).
|
|
441
|
+
*/
|
|
442
|
+
type VideoRemakeFullQualityKind = "same-take" | "new-take";
|
|
443
|
+
/**
|
|
444
|
+
* What a Full Quality version of a run would cost
|
|
445
|
+
* (`POST /v1/video-remake/:jobId/full-quality/estimate`): a Nodaro Prism
|
|
446
|
+
* draft (a 480p run made with `draft: true`).
|
|
447
|
+
*/
|
|
448
|
+
interface VideoRemakeFullQualityEstimate {
|
|
449
|
+
/**
|
|
450
|
+
* Which Full Quality this is ({@link VideoRemakeFullQualityKind}), so it can
|
|
451
|
+
* be worded right. Absent from an older server: `"same-take"`.
|
|
452
|
+
*/
|
|
453
|
+
kind?: VideoRemakeFullQualityKind;
|
|
454
|
+
/** The quote in credits: `breakdown.base` plus the 1080p render (same take) or the new take. */
|
|
455
|
+
totalCredits: number;
|
|
456
|
+
/**
|
|
457
|
+
* The parts of the quote, by name, for display only: `base` (the Full
|
|
458
|
+
* Quality job's own steps; an older server names it
|
|
459
|
+
* `castSwap` instead: read `base`, else `castSwap`), and `motionHd` (a same
|
|
460
|
+
* take: the 1080p render, 0 when an earlier try of this draft already
|
|
461
|
+
* finished that render, which is then reused) or `motion` (a new take).
|
|
462
|
+
*/
|
|
463
|
+
breakdown: {
|
|
464
|
+
base?: number;
|
|
465
|
+
/** @deprecated read {@link base} (an older server answered this name for the same part). */
|
|
466
|
+
castSwap?: number;
|
|
467
|
+
motionHd?: number;
|
|
468
|
+
motion?: number;
|
|
469
|
+
} & Record<string, number>;
|
|
470
|
+
/** ISO time until which the run can be finished at Full Quality (7 days after it completed). */
|
|
471
|
+
availableUntil: string;
|
|
472
|
+
}
|
|
473
|
+
/** Options for {@link VideoRemakeResource.fullQuality}. */
|
|
474
|
+
interface VideoRemakeFullQualityParams {
|
|
475
|
+
/** A generation session to file the Full Quality result in. */
|
|
476
|
+
sessionId?: string;
|
|
477
|
+
}
|
|
478
|
+
/** The Full Quality job (`POST /v1/video-remake/:jobId/full-quality`). */
|
|
479
|
+
interface VideoRemakeFullQualityResult {
|
|
480
|
+
jobId: string;
|
|
481
|
+
/** `true` when this run's Full Quality was already running or done: that job is answered, nothing new is started or charged. */
|
|
482
|
+
existing?: boolean;
|
|
483
|
+
}
|
|
484
|
+
/**
|
|
485
|
+
* The `code` of a Full Quality refusal (`NodaroError.code`), all before
|
|
486
|
+
* anything is charged:
|
|
487
|
+
* - `unauthorized` (401): no authenticated user;
|
|
488
|
+
* - `not_found` (404): not your job, or not a Video Remake run; also a
|
|
489
|
+
* `sessionId` you may not use;
|
|
490
|
+
* - `not_completed` (409): the run has not finished;
|
|
491
|
+
* - `not_a_draft` (409): the run is not a Nodaro Prism draft: a plain
|
|
492
|
+
* run (480p made without `draft: true` included; make a draft with
|
|
493
|
+
* `draft: true`), or any Nodaro Pulse run (Pulse makes no drafts: run
|
|
494
|
+
* it again at 1080p);
|
|
495
|
+
* - `draft_expired` (410): more than 7 days after the draft completed, or
|
|
496
|
+
* the draft can no longer be finished at Full Quality;
|
|
497
|
+
* - `full_quality_pending` (409, `details.retryable: true`): not final — an
|
|
498
|
+
* earlier try's 1080p render of this draft is being reviewed, or has not
|
|
499
|
+
* started yet; try again later (once the review ends). The only refusal
|
|
500
|
+
* that ends on its own;
|
|
501
|
+
* - `full_quality_unavailable` (409): final — nothing kept to re-render, no
|
|
502
|
+
* readable completion time, or the 1080p finalize refuses this draft; on
|
|
503
|
+
* the start only, also "failed too many times" (every try failed) or no
|
|
504
|
+
* try can be started for this run;
|
|
505
|
+
* - `insufficient_credits` (402), or in a workspace `budget_exceeded`,
|
|
506
|
+
* `member_cap_exceeded` or `user_allowance_exceeded`;
|
|
507
|
+
* - `job_blocked` (422): the request was blocked by the job policy;
|
|
508
|
+
* - `job_read_failed` (503, retryable), `estimate_unavailable` (503, try
|
|
509
|
+
* again shortly), `host_too_old` (503).
|
|
510
|
+
*
|
|
511
|
+
* Open-ended: a code not listed here may still arrive.
|
|
512
|
+
*/
|
|
513
|
+
type VideoRemakeFullQualityRefusalCode = "unauthorized" | "not_found" | "not_completed" | "not_a_draft" | "draft_expired" | "full_quality_pending" | "full_quality_unavailable" | "insufficient_credits" | "budget_exceeded" | "member_cap_exceeded" | "user_allowance_exceeded" | "job_blocked" | "job_read_failed" | "estimate_unavailable" | "host_too_old" | (string & {});
|
|
514
|
+
/**
|
|
515
|
+
* Who decides a direct run's style on one engine:
|
|
516
|
+
* - `"user"`: the person (the request's `style`, left out = `"precise"`);
|
|
517
|
+
* show a Style control;
|
|
518
|
+
* - `"precise"`: Nodaro's own apps run Precise on that engine and show no
|
|
519
|
+
* Style control; it changes no request: a direct run and quote take the
|
|
520
|
+
* request's `style`, as on `"user"`;
|
|
521
|
+
* - `"flex"`: an admin forced it — every direct run and quote of that engine
|
|
522
|
+
* runs Flex (`style: "motion"`) whatever the request's `style` says; show
|
|
523
|
+
* no Style control.
|
|
524
|
+
*
|
|
525
|
+
* A trend run keeps its own trend's style.
|
|
526
|
+
*/
|
|
527
|
+
type VideoRemakeStyleChoiceOption = "user" | "precise" | "flex";
|
|
528
|
+
/** What {@link VideoRemakeResource.styleChoice} answers: every engine's choice, by its public id. */
|
|
529
|
+
interface VideoRemakeStyleChoice {
|
|
530
|
+
engines: Record<VideoRemakeEngine, VideoRemakeStyleChoiceOption>;
|
|
531
|
+
/**
|
|
532
|
+
* Per engine, whether the engine takes style-only runs: a Flex run
|
|
533
|
+
* (`style: "motion"`) with an art style (`direction`) and nothing to swap
|
|
534
|
+
* (no role with images, no fixed reference). It follows the engine alone, so
|
|
535
|
+
* read it with {@link engines}: an engine answered `"flex"` makes a Precise
|
|
536
|
+
* request Flex too, and one answered `"precise"` changes no request, so a
|
|
537
|
+
* Flex request there runs as on `"user"`. Nodaro Pulse is always
|
|
538
|
+
* `false` (it takes no art style). Absent from an older server, and
|
|
539
|
+
* an engine missing from it: `false`.
|
|
540
|
+
*/
|
|
541
|
+
styleOnly?: Partial<Record<VideoRemakeEngine, boolean>>;
|
|
542
|
+
/**
|
|
543
|
+
* Per engine, whether a Precise run (no `style`, or `"precise"`) takes an
|
|
544
|
+
* art style (`direction`), as a Flex run does. Nodaro may run such a request as
|
|
545
|
+
* a Flex run (see {@link VideoRemakeParams}'s `direction`), which this does not
|
|
546
|
+
* say; otherwise it is Precise's edit of the clip, drawn in the art style, and,
|
|
547
|
+
* where {@link VideoRemakeStyleChoice.preciseArtStyleAlone} is not true for the
|
|
548
|
+
* engine, not on its own: a Precise run with nothing else to change is then refused.
|
|
549
|
+
* Nodaro Pulse is always `false` (it takes no art style). Absent from
|
|
550
|
+
* an older server, and an engine missing from it: `false` (offer an art style
|
|
551
|
+
* on Flex runs alone).
|
|
552
|
+
*/
|
|
553
|
+
preciseArtStyle?: Partial<Record<VideoRemakeEngine, boolean>>;
|
|
554
|
+
/**
|
|
555
|
+
* Per engine, whether an art style (`direction`) alone is a Precise run's
|
|
556
|
+
* change there, so the run needs no role, reference or prompt. Nodaro may run
|
|
557
|
+
* such a request as a Flex run (see {@link VideoRemakeParams}'s `direction`), which
|
|
558
|
+
* this does not say. It answers
|
|
559
|
+
* `false` until the engine takes such runs. Nodaro Pulse is always
|
|
560
|
+
* `false` (it takes no art style). Absent from an older server, and an engine
|
|
561
|
+
* missing from it: `false`.
|
|
562
|
+
*/
|
|
563
|
+
preciseArtStyleAlone?: Partial<Record<VideoRemakeEngine, boolean>>;
|
|
564
|
+
}
|
|
565
|
+
declare class VideoRemakeResource {
|
|
566
|
+
private client;
|
|
567
|
+
constructor(client: NodaroClientCore);
|
|
568
|
+
/**
|
|
569
|
+
* Start a Video Remake run (`POST /v1/video-remake`, 202 `{ jobId }`). Returns the
|
|
570
|
+
* job to follow. With `options.idempotencyKey` (sent as the
|
|
571
|
+
* `Idempotency-Key` header; 8–200 characters, else 400) a repeat with the
|
|
572
|
+
* same key within about 10 s answers 200 `{ jobId, deduped: true }`, a later
|
|
573
|
+
* one 202 with the first run's `jobId`; nothing new starts.
|
|
574
|
+
*/
|
|
575
|
+
run(params: VideoRemakeParams, options?: VideoRemakeRunOptions): Promise<{
|
|
576
|
+
jobId: string;
|
|
577
|
+
deduped?: boolean;
|
|
578
|
+
}>;
|
|
579
|
+
/**
|
|
580
|
+
* Whether people choose a direct run's style, per engine
|
|
581
|
+
* (`GET /v1/video-remake/style-choice`): `"user"` = show a Style control;
|
|
582
|
+
* `"precise"` = Nodaro's own apps run Precise on that engine and hide the
|
|
583
|
+
* control, while a run's `style` is still taken as sent; `"flex"` = an admin
|
|
584
|
+
* forced Flex for the engine, so a run's `style` is overridden and the
|
|
585
|
+
* control is best hidden. Its
|
|
586
|
+
* `styleOnly` says, per engine, whether a Flex run with an art style and
|
|
587
|
+
* nothing to swap restyles the whole clip there. Where it is not `true`
|
|
588
|
+
* (absent, or an engine missing from it, included) on Nodaro Prism, an
|
|
589
|
+
* art style alone is refused, and one with a pre or post prompt runs as any
|
|
590
|
+
* other art-style run. Its `preciseArtStyle` says, per engine, whether a
|
|
591
|
+
* Precise run takes an art style there too, and its `preciseArtStyleAlone`
|
|
592
|
+
* whether that art style alone is the run's change.
|
|
593
|
+
* Public (no sign-in needed); the answer may be up to a minute old.
|
|
594
|
+
*/
|
|
595
|
+
styleChoice(): Promise<VideoRemakeStyleChoice>;
|
|
596
|
+
/** Quote a run before starting it (`POST /v1/video-remake/estimate`); spends nothing. */
|
|
597
|
+
estimate(params: VideoRemakeParams): Promise<VideoRemakeEstimate>;
|
|
598
|
+
/**
|
|
599
|
+
* Quote finishing a run at Full Quality (`POST
|
|
600
|
+
* /v1/video-remake/:jobId/full-quality/estimate`); spends nothing. `jobId` is a
|
|
601
|
+
* finished Nodaro Prism DRAFT run (a Video Remake or trend run made
|
|
602
|
+
* with `draft: true`), whose same take Full Quality finishes at 1080p. The
|
|
603
|
+
* quote does not look for a Full Quality already running: when one is,
|
|
604
|
+
* {@link fullQuality} answers it (`existing: true`) and charges nothing.
|
|
605
|
+
* Refusals: {@link VideoRemakeFullQualityRefusalCode}.
|
|
606
|
+
*/
|
|
607
|
+
fullQualityEstimate(jobId: string): Promise<VideoRemakeFullQualityEstimate>;
|
|
608
|
+
/**
|
|
609
|
+
* Finish a run at Full Quality (`POST /v1/video-remake/:jobId/full-quality`):
|
|
610
|
+
* at 1080p, with the clip's audio, as a new job linked to the run — a
|
|
611
|
+
* Nodaro Prism draft's own take re-rendered. SPENDS CREDITS: quote it first with
|
|
612
|
+
* {@link fullQualityEstimate}. Answers 202 `{ jobId }`, or 200
|
|
613
|
+
* `{ jobId, existing: true }` when this run's Full Quality is already
|
|
614
|
+
* running or done (one per run; a failed one may be asked again). Follow
|
|
615
|
+
* the job with `client.jobs.get(jobId)`. No `Idempotency-Key` is taken: the
|
|
616
|
+
* server keys the job by the draft. The new job keeps the draft's origin.
|
|
617
|
+
* Refusals: {@link VideoRemakeFullQualityRefusalCode}.
|
|
618
|
+
*/
|
|
619
|
+
fullQuality(jobId: string, params?: VideoRemakeFullQualityParams): Promise<VideoRemakeFullQualityResult>;
|
|
620
|
+
}
|
|
621
|
+
/** @deprecated use {@link VideoRemakeResource} (`client.videoRemake`). */
|
|
622
|
+
declare const CastSwapResource: typeof VideoRemakeResource;
|
|
623
|
+
/** @deprecated use {@link VideoRemakeResource} (`client.videoRemake`). */
|
|
624
|
+
type CastSwapResource = VideoRemakeResource;
|
|
625
|
+
/** @deprecated use {@link VideoRemakeEngine}. */
|
|
626
|
+
type CastSwapEngine = VideoRemakeEngine;
|
|
627
|
+
/** @deprecated use {@link VideoRemakeEngine}. */
|
|
628
|
+
type CastSwapEngineLegacyId = VideoRemakeEngineLegacyId;
|
|
629
|
+
/** @deprecated use {@link VideoRemakeStyle}. */
|
|
630
|
+
type CastSwapStyle = VideoRemakeStyle;
|
|
631
|
+
/** @deprecated use {@link VideoRemakeMotionLength}. */
|
|
632
|
+
type CastSwapMotionLength = VideoRemakeMotionLength;
|
|
633
|
+
/** @deprecated use {@link VideoRemakeMotionLength}. */
|
|
634
|
+
type CastSwapKlingLength = VideoRemakeMotionLength;
|
|
635
|
+
/** @deprecated use {@link VideoRemakeTraitSource}. */
|
|
636
|
+
type CastSwapTraitSource = VideoRemakeTraitSource;
|
|
637
|
+
/** @deprecated use {@link VideoRemakeRolePreviewSettings}. */
|
|
638
|
+
type CastSwapRolePreviewSettings = VideoRemakeRolePreviewSettings;
|
|
639
|
+
/** @deprecated use {@link VideoRemakePersonRole}. */
|
|
640
|
+
type CastSwapPersonRole = VideoRemakePersonRole;
|
|
641
|
+
/** @deprecated use {@link VideoRemakeLocationRole}. */
|
|
642
|
+
type CastSwapLocationRole = VideoRemakeLocationRole;
|
|
643
|
+
/** @deprecated use {@link VideoRemakePetRole}. */
|
|
644
|
+
type CastSwapPetRole = VideoRemakePetRole;
|
|
645
|
+
/** @deprecated use {@link VideoRemakeProductRole}. */
|
|
646
|
+
type CastSwapProductRole = VideoRemakeProductRole;
|
|
647
|
+
/** @deprecated use {@link VideoRemakeRole}. */
|
|
648
|
+
type CastSwapRole = VideoRemakeRole;
|
|
649
|
+
/** @deprecated use {@link VideoRemakeReference}. */
|
|
650
|
+
type CastSwapReference = VideoRemakeReference;
|
|
651
|
+
/** @deprecated use {@link VideoRemakeFaceMaskingZone}. */
|
|
652
|
+
type CastSwapFaceMaskingZone = VideoRemakeFaceMaskingZone;
|
|
653
|
+
/** @deprecated use {@link VideoRemakeFaceMasking}. */
|
|
654
|
+
type CastSwapFaceMasking = VideoRemakeFaceMasking;
|
|
655
|
+
/** @deprecated use {@link VideoRemakeParams}. */
|
|
656
|
+
type CastSwapParams = VideoRemakeParams;
|
|
657
|
+
/** @deprecated use {@link VideoRemakeEstimate}. */
|
|
658
|
+
type CastSwapEstimate = VideoRemakeEstimate;
|
|
659
|
+
/** @deprecated use {@link VideoRemakeRunOptions}. */
|
|
660
|
+
type CastSwapRunOptions = VideoRemakeRunOptions;
|
|
661
|
+
/** @deprecated use {@link VideoRemakeFullQualityKind}. */
|
|
662
|
+
type CastSwapFullQualityKind = VideoRemakeFullQualityKind;
|
|
663
|
+
/** @deprecated use {@link VideoRemakeFullQualityEstimate}. */
|
|
664
|
+
type CastSwapFullQualityEstimate = VideoRemakeFullQualityEstimate;
|
|
665
|
+
/** @deprecated use {@link VideoRemakeFullQualityParams}. */
|
|
666
|
+
type CastSwapFullQualityParams = VideoRemakeFullQualityParams;
|
|
667
|
+
/** @deprecated use {@link VideoRemakeFullQualityResult}. */
|
|
668
|
+
type CastSwapFullQualityResult = VideoRemakeFullQualityResult;
|
|
669
|
+
/** @deprecated use {@link VideoRemakeFullQualityRefusalCode}. */
|
|
670
|
+
type CastSwapFullQualityRefusalCode = VideoRemakeFullQualityRefusalCode;
|
|
671
|
+
/** @deprecated use {@link VideoRemakeStyleChoiceOption}. */
|
|
672
|
+
type CastSwapStyleChoiceOption = VideoRemakeStyleChoiceOption;
|
|
673
|
+
/** @deprecated use {@link VideoRemakeStyleChoice}. */
|
|
674
|
+
type CastSwapStyleChoice = VideoRemakeStyleChoice;
|
|
675
|
+
|
|
676
|
+
export { type VideoRemakeEstimate as A, type VideoRemakeFaceMasking as B, type CastSwapEngine as C, type VideoRemakeFaceMaskingZone as D, type VideoRemakeFullQualityEstimate as E, type VideoRemakeFullQualityKind as F, type VideoRemakeFullQualityParams as G, type VideoRemakeFullQualityRefusalCode as H, type VideoRemakeFullQualityResult as I, type VideoRemakeLocationRole as J, type VideoRemakeMotionLength as K, type VideoRemakeParams as L, type VideoRemakePersonRole as M, type VideoRemakePetRole as N, type VideoRemakeProductRole as O, type VideoRemakeReference as P, VideoRemakeResource as Q, type VideoRemakeRole as R, type VideoRemakeRolePreviewSettings as S, type VideoRemakeRunOptions as T, type VideoRemakeStyle as U, type VideoRemakeEngine as V, type VideoRemakeStyleChoice as W, type VideoRemakeStyleChoiceOption as X, type VideoRemakeTraitSource as Y, type CastSwapEngineLegacyId as a, type CastSwapEstimate as b, type CastSwapFaceMasking as c, type CastSwapFaceMaskingZone as d, type CastSwapFullQualityEstimate as e, type CastSwapFullQualityKind as f, type CastSwapFullQualityParams as g, type CastSwapFullQualityRefusalCode as h, type CastSwapFullQualityResult as i, type CastSwapKlingLength as j, type CastSwapLocationRole as k, type CastSwapMotionLength as l, type CastSwapParams as m, type CastSwapPersonRole as n, type CastSwapPetRole as o, type CastSwapProductRole as p, type CastSwapReference as q, CastSwapResource as r, type CastSwapRole as s, type CastSwapRolePreviewSettings as t, type CastSwapRunOptions as u, type CastSwapStyle as v, type CastSwapStyleChoice as w, type CastSwapStyleChoiceOption as x, type CastSwapTraitSource as y, type VideoRemakeEngineLegacyId as z };
|