@nodaro/sdk 2.45.1 → 2.46.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.
Files changed (95) hide show
  1. package/dist/{chunk-3Y5TV37H.js → chunk-5Q4SUZPL.js} +3 -3
  2. package/dist/{chunk-3Y5TV37H.js.map → chunk-5Q4SUZPL.js.map} +1 -1
  3. package/dist/{chunk-55ZX6TE3.cjs → chunk-66M54BUO.cjs} +6 -6
  4. package/dist/chunk-66M54BUO.cjs.map +1 -0
  5. package/dist/chunk-6NTKEXT5.js +3 -0
  6. package/dist/chunk-6NTKEXT5.js.map +1 -0
  7. package/dist/{chunk-34JMD6ZO.cjs → chunk-7LTVS75S.cjs} +36 -12
  8. package/dist/chunk-7LTVS75S.cjs.map +1 -0
  9. package/dist/{chunk-HKDIIFG2.js → chunk-C3C7IL25.js} +6 -6
  10. package/dist/chunk-C3C7IL25.js.map +1 -0
  11. package/dist/{chunk-J6FHBQ4Z.cjs → chunk-DIF7A5OH.cjs} +2 -2
  12. package/dist/chunk-DIF7A5OH.cjs.map +1 -0
  13. package/dist/{chunk-JB4GVP4Q.js → chunk-GW76IRQD.js} +2 -2
  14. package/dist/{chunk-JB4GVP4Q.js.map → chunk-GW76IRQD.js.map} +1 -1
  15. package/dist/chunk-KBHDUHKM.js +21 -0
  16. package/dist/chunk-KBHDUHKM.js.map +1 -0
  17. package/dist/{chunk-A7HOOWKS.cjs → chunk-POKNFGGD.cjs} +19 -15
  18. package/dist/chunk-POKNFGGD.cjs.map +1 -0
  19. package/dist/{chunk-6MQ2LTJZ.js → chunk-PQHZUWSL.js} +36 -12
  20. package/dist/chunk-PQHZUWSL.js.map +1 -0
  21. package/dist/{chunk-5IXZLQNT.cjs → chunk-TK2CEVSK.cjs} +2 -2
  22. package/dist/{chunk-5IXZLQNT.cjs.map → chunk-TK2CEVSK.cjs.map} +1 -1
  23. package/dist/chunk-UANHMQ3A.cjs +4 -0
  24. package/dist/chunk-UANHMQ3A.cjs.map +1 -0
  25. package/dist/{chunk-RQY2WJD3.js → chunk-WFAFFAGV.js} +13 -9
  26. package/dist/chunk-WFAFFAGV.js.map +1 -0
  27. package/dist/{chunk-PEMLIAPZ.cjs → chunk-WMT7HEBZ.cjs} +40 -7
  28. package/dist/chunk-WMT7HEBZ.cjs.map +1 -0
  29. package/dist/{chunk-Y6VDCZPB.js → chunk-WS4ZQ4AA.js} +40 -7
  30. package/dist/chunk-WS4ZQ4AA.js.map +1 -0
  31. package/dist/{chunk-CKHCSZCV.js → chunk-XILR6TFO.js} +2 -2
  32. package/dist/chunk-XILR6TFO.js.map +1 -0
  33. package/dist/chunk-XKDVEQVD.cjs +23 -0
  34. package/dist/chunk-XKDVEQVD.cjs.map +1 -0
  35. package/dist/{chunk-WFWZBYBS.cjs → chunk-ZJCHIJND.cjs} +3 -3
  36. package/dist/{chunk-WFWZBYBS.cjs.map → chunk-ZJCHIJND.cjs.map} +1 -1
  37. package/dist/entries/cast-swap.cjs +2 -2
  38. package/dist/entries/cast-swap.d.cts +117 -143
  39. package/dist/entries/cast-swap.d.ts +117 -143
  40. package/dist/entries/cast-swap.js +1 -1
  41. package/dist/entries/characters.d.cts +1 -1
  42. package/dist/entries/characters.d.ts +1 -1
  43. package/dist/entries/client.cjs +14 -13
  44. package/dist/entries/client.d.cts +4 -1
  45. package/dist/entries/client.d.ts +4 -1
  46. package/dist/entries/client.js +9 -8
  47. package/dist/entries/core.cjs +5 -5
  48. package/dist/entries/core.js +1 -1
  49. package/dist/entries/creatures.d.cts +1 -1
  50. package/dist/entries/creatures.d.ts +1 -1
  51. package/dist/entries/jobs.cjs +2 -2
  52. package/dist/entries/jobs.d.cts +57 -8
  53. package/dist/entries/jobs.d.ts +57 -8
  54. package/dist/entries/jobs.js +1 -1
  55. package/dist/entries/locations.d.cts +1 -1
  56. package/dist/entries/locations.d.ts +1 -1
  57. package/dist/entries/nodes.cjs +2 -2
  58. package/dist/entries/nodes.d.cts +1 -1
  59. package/dist/entries/nodes.d.ts +1 -1
  60. package/dist/entries/nodes.js +1 -1
  61. package/dist/entries/objects.d.cts +1 -1
  62. package/dist/entries/objects.d.ts +1 -1
  63. package/dist/entries/scene3d.d.cts +2 -2
  64. package/dist/entries/scene3d.d.ts +2 -2
  65. package/dist/entries/sessions.cjs +2 -2
  66. package/dist/entries/sessions.d.cts +58 -8
  67. package/dist/entries/sessions.d.ts +58 -8
  68. package/dist/entries/sessions.js +1 -1
  69. package/dist/entries/trash.cjs +13 -0
  70. package/dist/entries/trash.cjs.map +1 -0
  71. package/dist/entries/trash.d.cts +71 -0
  72. package/dist/entries/trash.d.ts +71 -0
  73. package/dist/entries/trash.js +4 -0
  74. package/dist/entries/trash.js.map +1 -0
  75. package/dist/entries/trends.cjs +2 -2
  76. package/dist/entries/trends.d.cts +30 -21
  77. package/dist/entries/trends.d.ts +30 -21
  78. package/dist/entries/trends.js +1 -1
  79. package/dist/index.cjs +30 -24
  80. package/dist/index.d.cts +5 -4
  81. package/dist/index.d.ts +5 -4
  82. package/dist/index.js +11 -9
  83. package/dist/{nodes-MThDit8l.d.ts → nodes-C9j0PFto.d.ts} +11 -1
  84. package/dist/{nodes-Szl6HrZ_.d.cts → nodes-DGIefTze.d.cts} +11 -1
  85. package/package.json +7 -2
  86. package/dist/chunk-34JMD6ZO.cjs.map +0 -1
  87. package/dist/chunk-55ZX6TE3.cjs.map +0 -1
  88. package/dist/chunk-6MQ2LTJZ.js.map +0 -1
  89. package/dist/chunk-A7HOOWKS.cjs.map +0 -1
  90. package/dist/chunk-CKHCSZCV.js.map +0 -1
  91. package/dist/chunk-HKDIIFG2.js.map +0 -1
  92. package/dist/chunk-J6FHBQ4Z.cjs.map +0 -1
  93. package/dist/chunk-PEMLIAPZ.cjs.map +0 -1
  94. package/dist/chunk-RQY2WJD3.js.map +0 -1
  95. package/dist/chunk-Y6VDCZPB.js.map +0 -1
@@ -3,9 +3,10 @@ import '@nodaro/shared/apps';
3
3
  import '@nodaro/shared/organizations';
4
4
 
5
5
  /**
6
- * Cast Swap — replace the people, pets, products and/or the location in a
7
- * short video with your own references, keeping its motion, framing, timing
8
- * and sound (the clip's audio is kept, and the result is the clip's length).
6
+ * Nodaro Motion (the `castSwap` resource; routes `/v1/cast-swap`) — replace
7
+ * the people, pets, products and/or the location in a short video with your
8
+ * own references, keeping its motion, framing, timing and sound (the clip's
9
+ * audio is kept, and the result is the clip's length).
9
10
  *
10
11
  * Before the video, each person, pet and product role's photos are turned
11
12
  * into one clean reference picture by an image model. This costs extra
@@ -14,11 +15,16 @@ import '@nodaro/shared/organizations';
14
15
  * photos if it fails, and is turned off with `prepareReferences: false`.
15
16
  * Locations are not prepared.
16
17
  *
17
- * Engines: a run is made on Seedance 2.5 (`engine` left out, or
18
- * `"seedance-2-5"`) or Kling 4 (`"kling-4"`). Kling 4 renders 720p (its
19
- * default) or 1080p and has no draft; it makes a new take guided by the clip
20
- * and pictures, so its Full Quality is a new take at 1080p rather than the
21
- * same take re-rendered (`CastSwapFullQualityEstimate.kind`).
18
+ * Engines: a run is made on Nodaro Motion Pro (`engine` left out, or
19
+ * `"motion-pro"`) or Nodaro Motion Lite (`"motion-lite"`). Lite renders 720p
20
+ * (its default) or 1080p and has no draft; it makes a new take guided by the
21
+ * clip and pictures, so its Full Quality is a new take at 1080p rather than
22
+ * the same take re-rendered (`CastSwapFullQualityEstimate.kind`).
23
+ *
24
+ * How the clip is prepared for the video model (for one, whether faces are
25
+ * hidden first, and whether a refused clip is retried) is set by Nodaro for
26
+ * each engine; a run cannot change it. `faceMasking` is no longer read
27
+ * (deprecated: accepted and ignored).
22
28
  *
23
29
  * Cloud edition only: `/v1/cast-swap` is served by the cloud plugin and 404s
24
30
  * on self-hosted installs. `run()` answers 202 with a job id; follow it with
@@ -34,40 +40,50 @@ import '@nodaro/shared/organizations';
34
40
  * anything is charged: 400 `validation_error` (the body: no role with images,
35
41
  * no reference and no `prePrompt` or `postPrompt`, more roles of a kind
36
42
  * than allowed, more than 30 images in all, `draft: true` above 480p, a
37
- * `prePrompt` or `postPrompt` over 4,000 characters, a `faceMasking` setting
38
- * out of range); on Kling 4, `draft_unsupported` (`draft: true`),
39
- * `resolution_unsupported` (480p), `output_format_unsupported` (a MOV edit
40
- * output) and `too_many_images` (more than 10 images in the run, across every
41
- * role and fixed reference); `raw_reference_token` (also in a reference's `line`),
43
+ * `prePrompt` or `postPrompt` over 4,000 characters); on Nodaro Motion Lite,
44
+ * `draft_unsupported` (`draft: true`), `resolution_unsupported` (480p),
45
+ * `output_format_unsupported` (a MOV edit output) and `too_many_images` (more
46
+ * than 10 images in the run, across every role and fixed reference);
47
+ * `raw_reference_token` (also in a reference's `line`),
42
48
  * `invalid_role_mention` (also any `{role:N}` in a reference's `line`),
43
49
  * `unsafe_url`, `video_unreadable`, `clip_out_of_range` (4–30 s),
44
50
  * `preview_out_of_range`, `no_roles_in_preview` (a preview with every role
45
51
  * `inPreview: false`, always refused even with a prompt, or with no role kept
46
52
  * in it that has images and no `prePrompt` or `postPrompt`), `prompt_too_long`
47
53
  * (the prompt would build too long: a `{role:N}` reads as the role's name when
48
- * it sends no images; Kling 4's cap is 8,000 characters); 401; 402 `insufficient_credits` (`run()` only); 404
54
+ * it sends no images; Nodaro Motion Lite's cap is 8,000 characters); 401; 402 `insufficient_credits` (`run()` only); 404
49
55
  * (a `sessionId` you may not use, `run()` only); 422 `job_blocked` (`run()`
50
56
  * only); 503 `host_too_old` (both); 503 `estimate_unavailable` (`estimate()`
51
57
  * only).
52
58
  */
53
59
  /**
54
- * The video engine a Cast Swap run is made on. Left out = `"seedance-2-5"`.
60
+ * The engine a Nodaro Motion run is made on, by its public id. Left out =
61
+ * `"motion-pro"`.
55
62
  *
56
- * - `"seedance-2-5"`: 480p (the default, a draft unless `draft: false`), 720p
57
- * or 1080p; Full Quality re-renders a draft's own take at 1080p.
58
- * - `"kling-4"`: 720p (the default) or 1080p, never a draft (`draft: true`
59
- * answers 400 `draft_unsupported`); Full Quality makes a new take at 1080p
60
- * from a completed 720p run's inputs. A preview is still 4 s from
61
- * `previewStart`.
63
+ * - `"motion-pro"` (Nodaro Motion Pro): 480p (the default, a draft unless
64
+ * `draft: false`), 720p or 1080p; Full Quality re-renders a draft's own take
65
+ * at 1080p.
66
+ * - `"motion-lite"` (Nodaro Motion Lite): 720p (the default) or 1080p, never a
67
+ * draft (`draft: true` answers 400 `draft_unsupported`); Full Quality makes a
68
+ * new take at 1080p from a completed 720p run's inputs. A preview is still
69
+ * 4 s from `previewStart`.
70
+ */
71
+ type CastSwapEngine = "motion-pro" | "motion-lite";
72
+ /**
73
+ * The engine ids an older client sent (`"seedance-2-5"` = `"motion-pro"`,
74
+ * `"kling-4"` = `"motion-lite"`). Still accepted in a request; never returned.
75
+ * @deprecated use {@link CastSwapEngine}.
62
76
  */
63
- type CastSwapEngine = "seedance-2-5" | "kling-4";
77
+ type CastSwapEngineLegacyId = "seedance-2-5" | "kling-4";
64
78
  /**
65
- * Where a Kling 4 run cuts the clip to whole seconds (Kling renders whole
66
- * seconds; asked for more than the clip, it would stretch the motion):
79
+ * Where a Nodaro Motion Lite run cuts the clip to whole seconds (Lite renders
80
+ * whole seconds; asked for more than the clip, it would stretch the motion):
67
81
  * - `"cut-end"` (the default): drop the fraction of a second at its end;
68
82
  * - `"cut-start"`: drop it at its start.
69
83
  */
70
- type CastSwapKlingLength = "cut-end" | "cut-start";
84
+ type CastSwapMotionLength = "cut-end" | "cut-start";
85
+ /** @deprecated use {@link CastSwapMotionLength}. */
86
+ type CastSwapKlingLength = CastSwapMotionLength;
71
87
  /** Whether a swapped subject takes this trait from the references (`"new"`) or keeps the video's (`"original"`). */
72
88
  type CastSwapTraitSource = "new" | "original";
73
89
  /**
@@ -150,62 +166,26 @@ interface CastSwapReference {
150
166
  line: string;
151
167
  }
152
168
  /**
153
- * Margins of the frame, each 0–49 %: a face whose centre lies in a margin is
154
- * not masked, so only faces inside the inner rectangle are. A margin left out
155
- * of a zone that is given is 0. (A `zone` left out altogether is 10 % at the
156
- * left and right: see `CastSwapFaceMasking.zone`.)
169
+ * @deprecated Nodaro sets this per engine; a run's `faceMasking` is ignored.
157
170
  */
158
171
  interface CastSwapFaceMaskingZone {
159
- /** % of the frame's width from the left edge. Default 0 in a zone that is given. */
160
172
  leftPct?: number;
161
- /** % of the frame's width from the right edge. Default 0 in a zone that is given. */
162
173
  rightPct?: number;
163
- /** % of the frame's height from the top edge. Default 0. */
164
174
  topPct?: number;
165
- /** % of the frame's height from the bottom edge. Default 0. */
166
175
  bottomPct?: number;
167
176
  }
168
177
  /**
169
- * Face masking: the faces in the source clip are covered before the video
170
- * model sees it, keeping their movement and lip timing while the rest of the
171
- * clip is sent as it is.
172
- *
173
- * - `"off"` (the same as leaving `faceMasking` out): the clip is sent as it is.
174
- * - `"always"`: the faces are masked before the first attempt. Its credits are
175
- * in the quote (`breakdown.masking`, counted in `totalCredits`).
176
- * - `"auto"`: the run starts unmasked; only if the video model refuses the
177
- * source clip is it retried once with the faces masked. Any other failure is
178
- * not retried. The extra credits, charged only when that retry runs, are the
179
- * estimate's `maskingCredits` (not in `totalCredits`).
180
- *
181
- * A completed job's output carries `faceMasking: { applied, reason }`:
182
- * `applied` is whether the video was made from the masked clip, and `reason`
183
- * is `"always"` (masked before the first attempt), `"input_refused"` (`auto`
184
- * retried after the source clip was refused), `"no_faces"` (no face was left
185
- * to mask after the filters: an `always` run continues unmasked; an `auto`
186
- * run fails with the original refusal instead) or `"off"`.
178
+ * @deprecated Nodaro sets how the clip is prepared for the video model, per
179
+ * engine; a run cannot change it. A `faceMasking` sent is accepted and
180
+ * ignored (no error), so older code keeps working unchanged.
187
181
  */
188
182
  interface CastSwapFaceMasking {
189
183
  mode: "off" | "always" | "auto";
190
- /** What covers a masked face: `"blur"` (default) or `"depth"` (a depth-color view of it). */
191
184
  fill?: "blur" | "depth";
192
- /** Mask only faces at least this % of the frame's height, 0–100. Default 15. */
193
185
  minFaceHeightPct?: number;
194
- /**
195
- * Mask only faces at most this % of the frame's height, 0–100. Default 0 (no
196
- * limit). When above 0 it must be at least `minFaceHeightPct` (else 400).
197
- */
198
186
  maxFaceHeightPct?: number;
199
- /**
200
- * Leave out faces near the edges of the frame. Default (left out):
201
- * `{ leftPct: 10, rightPct: 10, topPct: 0, bottomPct: 0 }`, so people at the
202
- * left and right edges are not masked. `null`, or all four margins 0, means
203
- * no margins.
204
- */
205
187
  zone?: CastSwapFaceMaskingZone | null;
206
- /** The blur's strength, 0.1–5 % of the frame's width (`fill: "blur"`). Default 2. */
207
188
  blurStrengthPct?: number;
208
- /** How sure the face finder must be, 0.05–0.95: lower finds more faces. Default 0.5. */
209
189
  threshold?: number;
210
190
  }
211
191
  /** The body of `POST /v1/cast-swap` and `POST /v1/cast-swap/estimate`. */
@@ -248,27 +228,30 @@ interface CastSwapParams {
248
228
  /** Where the preview starts, in seconds. Default 0. */
249
229
  previewStart?: number;
250
230
  /**
251
- * The video engine (see {@link CastSwapEngine}). Default `"seedance-2-5"`.
252
- * The job records it in `input_data.engine`, and a completed job's output
253
- * in its `engine`. A Cast Swap engine older than Kling 4 support ignores
254
- * the field and runs Seedance 2.5: a Kling 4 quote names `engine:
255
- * "kling-4"`, so check the estimate's `engine` before running.
231
+ * The engine (see {@link CastSwapEngine}). Default `"motion-pro"`. The job
232
+ * records it in `input_data.engine`, and a completed job's output in its
233
+ * `engine`. The ids an older client sent ({@link CastSwapEngineLegacyId})
234
+ * are still accepted.
256
235
  */
257
- engine?: CastSwapEngine;
236
+ engine?: CastSwapEngine | CastSwapEngineLegacyId;
258
237
  /**
259
- * Kling 4 only (Seedance 2.5 ignores it): which end of the clip is cut to
260
- * whole seconds (see {@link CastSwapKlingLength}). Default `"cut-end"`.
238
+ * Nodaro Motion Lite only (Pro ignores it): which end of the clip is cut to
239
+ * whole seconds (see {@link CastSwapMotionLength}). Default `"cut-end"`.
261
240
  */
241
+ motionLength?: CastSwapMotionLength;
242
+ /** @deprecated use {@link motionLength} (still accepted). */
262
243
  klingLength?: CastSwapKlingLength;
263
244
  /**
264
- * The output resolution. Seedance 2.5: `"480p"` (default), `"720p"` or
265
- * `"1080p"`. Kling 4: `"720p"` (default) or `"1080p"`; `"480p"` answers 400.
245
+ * The output resolution. Nodaro Motion Pro: `"480p"` (default), `"720p"` or
246
+ * `"1080p"`. Nodaro Motion Lite: `"720p"` (default) or `"1080p"`; `"480p"`
247
+ * answers 400.
266
248
  */
267
249
  resolution?: "480p" | "720p" | "1080p";
268
250
  /**
269
- * Render as a draft (Seedance 2.5 only). Defaults to `true` at 480p and
251
+ * Render as a draft (Nodaro Motion Pro only). Defaults to `true` at 480p and
270
252
  * `false` above it; `true` with `"720p"` or `"1080p"` answers 400 (draft is
271
- * 480p only). Kling 4 has no draft: `true` answers 400 `draft_unsupported`.
253
+ * 480p only). Nodaro Motion Lite has no draft: `true` answers 400
254
+ * `draft_unsupported`.
272
255
  */
273
256
  draft?: boolean;
274
257
  /**
@@ -278,7 +261,11 @@ interface CastSwapParams {
278
261
  * Default `true`.
279
262
  */
280
263
  prepareReferences?: boolean;
281
- /** Mask the faces in the source clip (see {@link CastSwapFaceMasking}). Default: off. */
264
+ /**
265
+ * Ignored: Nodaro sets how the clip is prepared, per engine. Accepted (no
266
+ * error) so older code keeps working.
267
+ * @deprecated leave it out.
268
+ */
282
269
  faceMasking?: CastSwapFaceMasking;
283
270
  /**
284
271
  * `"draft"` means 480p draft.
@@ -293,71 +280,58 @@ interface CastSwapParams {
293
280
  /** What a run would cost, in credits. */
294
281
  interface CastSwapEstimate {
295
282
  /**
296
- * The engine the run would use. Sent by an engine that knows Kling 4 on a
297
- * Kling 4 quote (`"kling-4"`); absent = Seedance 2.5.
283
+ * The engine the run would use, by its public id (absent from an older
284
+ * server = `"motion-pro"`).
298
285
  */
299
286
  engine?: CastSwapEngine;
300
287
  /**
301
- * What is held when the run starts: `breakdown.castSwap +
302
- * breakdown.seedance + breakdown.references` (on Kling 4,
303
- * `breakdown.kling` in place of `breakdown.seedance`), plus
304
- * `breakdown.masking` with face masking `"always"`. The run is charged what it actually costs, which
305
- * is expected to be `expectedCredits`.
288
+ * What is held when the run starts. The run is charged what it actually
289
+ * costs, which is expected to be `expectedCredits`.
306
290
  */
307
291
  totalCredits: number;
308
292
  /**
309
- * The charge the run is expected to come to: `breakdown.castSwap +
310
- * breakdown.seedanceExpected + breakdown.references`, plus
311
- * `breakdown.masking` with face masking `"always"` (the hold, with the video
312
- * model's expected charge in place of its hold). Never above `totalCredits`.
313
- * With `"auto"` the masking is in neither total (see `maskingCredits`).
314
- * `totalCredits` is what is held when the run starts; the run is charged
315
- * what it actually costs.
316
- *
317
- * Absent from an older Cast Swap engine: read `totalCredits` then. On
318
- * Kling 4 it equals `totalCredits` (Kling renders exactly the length asked
319
- * for, so the hold is what it settles at).
293
+ * The charge the run is expected to come to. Never above `totalCredits`
294
+ * (on Nodaro Motion Lite it equals it: Lite renders exactly the length
295
+ * asked for, so the hold is what it settles at). Absent from an older
296
+ * server: read `totalCredits` then.
320
297
  */
321
298
  expectedCredits?: number;
322
299
  /**
323
- * The parts of the quote:
300
+ * The parts of the quote, by name, for display only:
324
301
  * - `castSwap`: the run itself;
325
- * - `seedance`: what the video model it calls holds (the video's length is
326
- * left to the model, so it is held at the model's longest output);
327
- * - `seedanceExpected`: what the video model is expected to be charged (the
328
- * clip in and about as much out), never above `seedance`. It takes
329
- * `seedance`'s place in `expectedCredits`; it is not added to it. Absent
330
- * from an older Cast Swap engine, like `expectedCredits`;
331
- * - `kling`: Kling 4 only, in place of `seedance` and `seedanceExpected`:
332
- * what the Kling take costs (held and charged alike);
333
302
  * - `references`: preparing the reference pictures (0 when
334
303
  * `prepareReferences` is off or there is nothing to prepare);
335
- * - `masking`: masking the faces, present only when `faceMasking` is on.
336
- * With `"always"` it is in both totals; with `"auto"` it equals
337
- * `maskingCredits` and is in neither.
304
+ * - `motion`: what the video holds (on Nodaro Motion Lite, what it costs);
305
+ * - `motionExpected`: what the video is expected to be charged, never above
306
+ * `motion` (Nodaro Motion Pro);
307
+ * - `privacy`: preparing the clip, when the engine's setting does. In both
308
+ * totals when it always runs; outside both when it is the retry
309
+ * (`privacyCredits`).
338
310
  *
339
- * So the parts sum to more than either total: `seedance` and
340
- * `seedanceExpected` are alternatives, and `"auto"` masking is outside both.
311
+ * `motion` and `motionExpected` are alternatives, so the parts sum to more
312
+ * than either total: read `totalCredits` and `expectedCredits`, never the
313
+ * sum. Other parts may appear.
341
314
  */
342
315
  breakdown: {
343
316
  castSwap: number;
344
- seedance?: number;
345
317
  references: number;
346
- seedanceExpected?: number;
347
- kling?: number;
348
- masking?: number;
349
- };
318
+ motion?: number;
319
+ motionExpected?: number;
320
+ privacy?: number;
321
+ } & Record<string, number>;
350
322
  /**
351
- * Face masking `"auto"` only: the extra credits charged if the source clip
352
- * is refused and the run is retried with the faces masked. Not in
353
- * `totalCredits` or `expectedCredits`; `run()` needs credits for both the
354
- * hold and this (else 402).
323
+ * The extra credits charged only if the video model refuses the clip and
324
+ * the run is retried (Nodaro's setting for the engine decides whether it
325
+ * does). Not in `totalCredits` or `expectedCredits`; `run()` needs credits
326
+ * for both the hold and this (else 402).
355
327
  */
328
+ privacyCredits?: number;
329
+ /** @deprecated read {@link privacyCredits} (an older server answered this name). */
356
330
  maskingCredits?: number;
357
331
  /**
358
- * `true` when the video is made at Auto length (every Seedance 2.5 run): the
359
- * final charge is expected to come out lower than `totalCredits`, at about
360
- * `expectedCredits`. `false` on Kling 4.
332
+ * `true` when the video is made at Auto length (every Nodaro Motion Pro
333
+ * run): the final charge is expected to come out lower than `totalCredits`,
334
+ * at about `expectedCredits`. `false` on Nodaro Motion Lite.
361
335
  */
362
336
  settlesLower: boolean;
363
337
  }
@@ -374,36 +348,36 @@ interface CastSwapRunOptions {
374
348
  idempotencyKey?: string;
375
349
  }
376
350
  /**
377
- * What a Full Quality version would be: `"same-take"` re-renders a Seedance
378
- * 2.5 draft's own take at 1080p; `"new-take"` makes a new Kling 4 take at
351
+ * What a Full Quality version would be: `"same-take"` re-renders a Nodaro
352
+ * Motion Pro draft's own take at 1080p; `"new-take"` makes a new Nodaro Motion Lite take at
379
353
  * 1080p from a 720p run's inputs (it will not match the 720p run frame for
380
354
  * frame). The 720p run or draft stays either way.
381
355
  */
382
356
  type CastSwapFullQualityKind = "same-take" | "new-take";
383
357
  /**
384
358
  * What a Full Quality version of a run would cost
385
- * (`POST /v1/cast-swap/:jobId/full-quality/estimate`): a Seedance 2.5 draft,
386
- * or a completed Kling 4 run at 720p.
359
+ * (`POST /v1/cast-swap/:jobId/full-quality/estimate`): a Nodaro Motion Pro
360
+ * draft, or a completed Nodaro Motion Lite run at 720p.
387
361
  */
388
362
  interface CastSwapFullQualityEstimate {
389
363
  /**
390
364
  * Which Full Quality this is ({@link CastSwapFullQualityKind}), so it can
391
- * be worded right. Absent from an older Cast Swap engine: `"same-take"`.
365
+ * be worded right. Absent from an older server: `"same-take"`.
392
366
  */
393
367
  kind?: CastSwapFullQualityKind;
394
- /** The quote in credits: `breakdown.castSwap` + `breakdown.seedanceHd` (same take) or `breakdown.kling` (new take). */
368
+ /** The quote in credits: `breakdown.castSwap` plus the 1080p render (same take) or the new take. */
395
369
  totalCredits: number;
396
370
  /**
397
- * `castSwap`: the Full Quality job's own steps; `seedanceHd` (a same take):
398
- * the 1080p render of the draft's take (0 when an earlier try of this draft
399
- * already finished that render, which is then reused); `kling` (a new take,
400
- * in place of `seedanceHd`): the new Kling 4 take at 1080p.
371
+ * The parts of the quote, by name, for display only: `castSwap` (the Full
372
+ * Quality job's own steps), and `motionHd` (a same take: the 1080p render,
373
+ * 0 when an earlier try of this draft already finished that render, which
374
+ * is then reused) or `motion` (a new take).
401
375
  */
402
376
  breakdown: {
403
377
  castSwap: number;
404
- seedanceHd?: number;
405
- kling?: number;
406
- };
378
+ motionHd?: number;
379
+ motion?: number;
380
+ } & Record<string, number>;
407
381
  /** ISO time until which the run can be finished at Full Quality (7 days after it completed). */
408
382
  availableUntil: string;
409
383
  }
@@ -422,11 +396,11 @@ interface CastSwapFullQualityResult {
422
396
  * The `code` of a Full Quality refusal (`NodaroError.code`), all before
423
397
  * anything is charged:
424
398
  * - `unauthorized` (401): no authenticated user;
425
- * - `not_found` (404): not your job, or not a Cast Swap run; also a
399
+ * - `not_found` (404): not your job, or not a Nodaro Motion run; also a
426
400
  * `sessionId` you may not use;
427
401
  * - `not_completed` (409): the run has not finished;
428
- * - `not_a_draft` (409): the run is neither a Seedance 2.5 draft nor a
429
- * Kling 4 run at 720p (a Kling 4 run at 1080p is already Full Quality);
402
+ * - `not_a_draft` (409): the run is neither a Nodaro Motion Pro draft nor a
403
+ * Nodaro Motion Lite run at 720p (a Lite run at 1080p is already Full Quality);
430
404
  * - `draft_expired` (410): more than 7 days after the draft completed, or
431
405
  * the draft can no longer be finished at Full Quality;
432
406
  * - `full_quality_pending` (409, `details.retryable: true`): not final — an
@@ -450,7 +424,7 @@ declare class CastSwapResource {
450
424
  private client;
451
425
  constructor(client: NodaroClientCore);
452
426
  /**
453
- * Start a Cast Swap run (`POST /v1/cast-swap`, 202 `{ jobId }`). Returns the
427
+ * Start a Nodaro Motion run (`POST /v1/cast-swap`, 202 `{ jobId }`). Returns the
454
428
  * job to follow. With `options.idempotencyKey` (sent as the
455
429
  * `Idempotency-Key` header; 8–200 characters, else 400) a repeat with the
456
430
  * same key within about 10 s answers 200 `{ jobId, deduped: true }`, a later
@@ -465,8 +439,8 @@ declare class CastSwapResource {
465
439
  /**
466
440
  * Quote finishing a run at Full Quality (`POST
467
441
  * /v1/cast-swap/:jobId/full-quality/estimate`); spends nothing. `jobId` is a
468
- * finished Seedance 2.5 DRAFT run, or a finished Kling 4 run at 720p (a Cast
469
- * Swap or trend run); the quote's `kind` says whether it is the same take
442
+ * finished Nodaro Motion Pro DRAFT run, or a finished Nodaro Motion Lite
443
+ * run at 720p (a Nodaro Motion or trend run); the quote's `kind` says whether it is the same take
470
444
  * re-rendered or a new take. The quote
471
445
  * does not look for a Full Quality already running: when one is,
472
446
  * {@link fullQuality} answers it (`existing: true`) and charges nothing.
@@ -476,7 +450,7 @@ declare class CastSwapResource {
476
450
  /**
477
451
  * Finish a run at Full Quality (`POST /v1/cast-swap/:jobId/full-quality`):
478
452
  * at 1080p, with the clip's audio, as a new job linked to the run — a
479
- * Seedance 2.5 draft's own take re-rendered, or a new Kling 4 take from a
453
+ * Nodaro Motion Pro draft's own take re-rendered, or a new Nodaro Motion Lite take from a
480
454
  * 720p run's inputs (the quote's `kind`). SPENDS CREDITS: quote it first with
481
455
  * {@link fullQualityEstimate}. Answers 202 `{ jobId }`, or 200
482
456
  * `{ jobId, existing: true }` when this run's Full Quality is already
@@ -488,4 +462,4 @@ declare class CastSwapResource {
488
462
  fullQuality(jobId: string, params?: CastSwapFullQualityParams): Promise<CastSwapFullQualityResult>;
489
463
  }
490
464
 
491
- export { type CastSwapEngine, type CastSwapEstimate, type CastSwapFaceMasking, type CastSwapFaceMaskingZone, type CastSwapFullQualityEstimate, type CastSwapFullQualityKind, type CastSwapFullQualityParams, type CastSwapFullQualityRefusalCode, type CastSwapFullQualityResult, type CastSwapKlingLength, type CastSwapLocationRole, type CastSwapParams, type CastSwapPersonRole, type CastSwapPetRole, type CastSwapProductRole, type CastSwapReference, CastSwapResource, type CastSwapRole, type CastSwapRolePreviewSettings, type CastSwapRunOptions, type CastSwapTraitSource };
465
+ export { type CastSwapEngine, type CastSwapEngineLegacyId, type CastSwapEstimate, type CastSwapFaceMasking, type CastSwapFaceMaskingZone, type CastSwapFullQualityEstimate, type CastSwapFullQualityKind, type CastSwapFullQualityParams, type CastSwapFullQualityRefusalCode, type CastSwapFullQualityResult, type CastSwapKlingLength, type CastSwapLocationRole, type CastSwapMotionLength, type CastSwapParams, type CastSwapPersonRole, type CastSwapPetRole, type CastSwapProductRole, type CastSwapReference, CastSwapResource, type CastSwapRole, type CastSwapRolePreviewSettings, type CastSwapRunOptions, type CastSwapTraitSource };