@sogni-ai/sogni-client 5.82.0 → 5.84.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 (63) hide show
  1. package/AGENTS.md +9 -2
  2. package/CHANGELOG.md +22 -0
  3. package/README.md +59 -6
  4. package/dist/Changelog/index.d.ts +28 -0
  5. package/dist/Changelog/index.js +81 -0
  6. package/dist/Changelog/index.js.map +1 -0
  7. package/dist/Changelog/types.d.ts +83 -0
  8. package/dist/Changelog/types.js +3 -0
  9. package/dist/Changelog/types.js.map +1 -0
  10. package/dist/Chat/_hostedToolsManifest.generated.js +15 -6
  11. package/dist/Chat/_hostedToolsManifest.generated.js.map +1 -1
  12. package/dist/Chat/hostedToolValidator.js +24 -2
  13. package/dist/Chat/hostedToolValidator.js.map +1 -1
  14. package/dist/Chat/tools.js +1 -1
  15. package/dist/Chat/tools.js.map +1 -1
  16. package/dist/Projects/createJobRequestMessage.js +49 -23
  17. package/dist/Projects/createJobRequestMessage.js.map +1 -1
  18. package/dist/Projects/types/index.d.ts +20 -13
  19. package/dist/Projects/types/index.js.map +1 -1
  20. package/dist/Projects/utils/index.d.ts +24 -6
  21. package/dist/Projects/utils/index.js +34 -9
  22. package/dist/Projects/utils/index.js.map +1 -1
  23. package/dist/index.d.ts +11 -2
  24. package/dist/index.js +16 -11
  25. package/dist/index.js.map +1 -1
  26. package/dist/lib/validation.js +1 -0
  27. package/dist/lib/validation.js.map +1 -1
  28. package/dist/version.d.ts +1 -1
  29. package/dist/version.js +1 -1
  30. package/dist-esm/Changelog/index.js +76 -0
  31. package/dist-esm/Changelog/index.js.map +1 -0
  32. package/dist-esm/Changelog/types.js +2 -0
  33. package/dist-esm/Changelog/types.js.map +1 -0
  34. package/dist-esm/Chat/_hostedToolsManifest.generated.js +15 -6
  35. package/dist-esm/Chat/_hostedToolsManifest.generated.js.map +1 -1
  36. package/dist-esm/Chat/hostedToolValidator.js +24 -2
  37. package/dist-esm/Chat/hostedToolValidator.js.map +1 -1
  38. package/dist-esm/Chat/tools.js +1 -1
  39. package/dist-esm/Chat/tools.js.map +1 -1
  40. package/dist-esm/Projects/createJobRequestMessage.js +50 -24
  41. package/dist-esm/Projects/createJobRequestMessage.js.map +1 -1
  42. package/dist-esm/Projects/types/index.js.map +1 -1
  43. package/dist-esm/Projects/utils/index.js +31 -8
  44. package/dist-esm/Projects/utils/index.js.map +1 -1
  45. package/dist-esm/index.js +4 -2
  46. package/dist-esm/index.js.map +1 -1
  47. package/dist-esm/lib/validation.js +1 -0
  48. package/dist-esm/lib/validation.js.map +1 -1
  49. package/dist-esm/version.js +1 -1
  50. package/llms-full.txt +74 -11
  51. package/llms.txt +46 -7
  52. package/package.json +6 -3
  53. package/src/Changelog/index.ts +75 -0
  54. package/src/Changelog/types.ts +96 -0
  55. package/src/Chat/_hostedToolsManifest.generated.ts +15 -6
  56. package/src/Chat/hostedToolValidator.ts +30 -2
  57. package/src/Chat/tools.ts +1 -1
  58. package/src/Projects/createJobRequestMessage.ts +54 -26
  59. package/src/Projects/types/index.ts +20 -13
  60. package/src/Projects/utils/index.ts +36 -8
  61. package/src/index.ts +24 -0
  62. package/src/lib/validation.ts +1 -0
  63. package/src/version.ts +1 -1
@@ -806,7 +806,7 @@ export const SOGNI_HOSTED_TOOLS_MANIFEST: unknown = {
806
806
  "type": "function",
807
807
  "function": {
808
808
  "name": "upscale_video",
809
- "description": "Upscale an existing video to 1080p or 1440p with FlashVSR video super-resolution. This is promptless, deterministic enhancement, not a generative edit: it keeps every source frame, the exact frame rate, the full aspect ratio, and the original audio, and it never changes content, trims, crops, restyles, or interpolates frames. Use it when the user asks to upscale, enlarge, sharpen, or increase the resolution of an uploaded or previously generated video, or wants an HD, 1080p, 1440p, or 2K copy of it. Do not use it to create, restyle, extend, or edit a video; when the user explicitly asks a generative model such as Seedance to re-render the clip, use video_to_video. The output is at most twice the source size, so 1080p needs a source whose short edge is 540-768px and 1440p needs 720-768px, and the source can be at most about 1344x768 pixels (768x1344 in portrait). It must also be 1-60 fps and at most 100 MB. The server sets the maximum clip length and rejects a source that is too long; never quote a length limit yourself, and if the tool reports that rejection, relay that error to the user. It cannot produce 4K or any size above 1440p; when the user asks for one, say so and offer 1440p. Each upscale costs credits based on the source video's size and length. Optional detailPreference (stable or sharper), processingSpeed (stable or faster), and seed tune the result; omit them unless the user asks, and none of them changes the price.",
809
+ "description": "Upscale an existing video to 1080p, 1440p or 2160p (4K) with recommended RelayVSR, or to 1080p or 1440p with FlashVSR. This is promptless, deterministic enhancement, not a generative edit: it keeps every source frame, the exact frame rate, the full aspect ratio, and the original audio, and it never changes content, trims, crops, restyles, or interpolates frames. Use it when the user asks to upscale, enlarge, sharpen, or increase the resolution of an uploaded or previously generated video, or wants an HD, 1080p, 1440p, 2K, or 4K copy of it. Do not use it to create, restyle, extend, or edit a video; when the user explicitly asks a generative model such as Seedance to re-render the clip, use video_to_video. Explicitly set model to relayvsr for new upscales. Use flashvsr when the user requests FlashVSR or specifically wants its detailPreference, processingSpeed or seed controls. Omitted model retains FlashVSR for compatibility. With FlashVSR the output is at most twice the source size, so 1080p needs a source whose short edge is 540-768px and 1440p needs 720-768px, and the source can be at most about 1344x768 pixels (768x1344 in portrait). With RelayVSR the output is at most twice the source size for a source up to 1920x1080 pixels (1080x1920 in portrait), or four times for a source up to 1344x768 (768x1344 in portrait), so 2160p needs a source whose short edge is 540-768px or exactly 1080px, and the output's long edge can be at most 3840px. The source must also be 1-60 fps and at most 100 MB. The server sets the maximum clip length and rejects a source that is too long; never quote a length limit yourself, and if the tool reports that rejection, relay that error to the user. FlashVSR cannot produce 4K or any size above 1440p, so a 4K request always uses relayvsr. Nothing here produces a size above 2160p; when the user asks for one, say so and offer 2160p. Each upscale costs credits based on the source video's size and length. With FlashVSR, optional detailPreference (stable or sharper), processingSpeed (stable or faster), and seed tune the result; omit them unless the user asks, and none of them changes the price. RelayVSR refuses all three.",
810
810
  "parameters": {
811
811
  "type": "object",
812
812
  "properties": {
@@ -814,13 +814,22 @@ export const SOGNI_HOSTED_TOOLS_MANIFEST: unknown = {
814
814
  "type": "number",
815
815
  "description": "Source video to upscale. Non-negative values select a prior generated video result by 0-based index. Negative values select uploaded videos: -1 is the first uploaded video, -2 the second, and so on. If omitted, use the latest generated video, falling back to the most recent uploaded video."
816
816
  },
817
+ "model": {
818
+ "type": "string",
819
+ "enum": [
820
+ "flashvsr",
821
+ "relayvsr"
822
+ ],
823
+ "description": "Upscaler. Explicitly select relayvsr, recommended for new upscales to 1080p, 1440p or 2160p. Use flashvsr when requested or for its detailPreference, processingSpeed or seed controls; it reaches 1080p or 1440p. RelayVSR takes none of those options. Omitted model retains FlashVSR for compatibility."
824
+ },
817
825
  "targetResolution": {
818
826
  "type": "number",
819
827
  "enum": [
820
828
  1080,
821
- 1440
829
+ 1440,
830
+ 2160
822
831
  ],
823
- "description": "Output resolution of the short edge in pixels: 1440 for 1440p/2K or 1080 for 1080p/Full HD. The long edge follows the source aspect ratio, so portrait videos stay portrait. Default: 1440, or 1080 when the source's short edge is below 720px. Set 1080 when the user asks for 1080p or Full HD."
832
+ "description": "Output resolution of the short edge in pixels: 2160 for 2160p/4K (relayvsr only), 1440 for 1440p/2K, or 1080 for 1080p/Full HD. The long edge follows the source aspect ratio, so portrait videos stay portrait. Default: 1440, or 1080 when the source is too small for 1440p. Set 1080 when the user asks for 1080p or Full HD, and 2160 with model relayvsr when the user asks for 4K or 2160p."
824
833
  },
825
834
  "detailPreference": {
826
835
  "type": "string",
@@ -828,7 +837,7 @@ export const SOGNI_HOSTED_TOOLS_MANIFEST: unknown = {
828
837
  "stable",
829
838
  "sharper"
830
839
  ],
831
- "description": "Detail preference. stable, the default, gives the most temporally stable result. sharper renders crisper fine detail with a little more risk of shimmer between frames. Set sharper only when the user asks for a sharper, crisper, or more detailed upscale; otherwise omit it. It does not change the price."
840
+ "description": "FlashVSR only. Detail preference. stable, the default, gives the most temporally stable result. sharper renders crisper fine detail with a little more risk of shimmer between frames. Set sharper only when the user asks for a sharper, crisper, or more detailed upscale; otherwise omit it. It does not change the price."
832
841
  },
833
842
  "processingSpeed": {
834
843
  "type": "string",
@@ -836,13 +845,13 @@ export const SOGNI_HOSTED_TOOLS_MANIFEST: unknown = {
836
845
  "stable",
837
846
  "faster"
838
847
  ],
839
- "description": "Processing speed. stable, the default, gives the most stable result. faster finishes sooner with slightly less stable detail. Set faster only when the user asks for a quicker upscale; otherwise omit it. It does not change the price."
848
+ "description": "FlashVSR only. Processing speed. stable, the default, gives the most stable result. faster finishes sooner with slightly less stable detail. Set faster only when the user asks for a quicker upscale; otherwise omit it. It does not change the price."
840
849
  },
841
850
  "seed": {
842
851
  "type": "integer",
843
852
  "minimum": -1,
844
853
  "maximum": 4294967295,
845
- "description": "Seed for the upscaler's fine texture, 0 through 4294967295; different seeds give slightly different fine detail. Omit it to keep the repeatable default of 0. Use -1 for a random seed. Set it only when the user gives a seed or asks for a different or random variation of an upscale."
854
+ "description": "FlashVSR only. Seed for the upscaler's fine texture, 0 through 4294967295; different seeds give slightly different fine detail. Omit it to keep the repeatable default of 0. Use -1 for a random seed. Set it only when the user gives a seed or asks for a different or random variation of an upscale."
846
855
  }
847
856
  },
848
857
  "required": []
@@ -444,12 +444,40 @@ export function validateAndNormalizeHostedToolArguments(
444
444
  warnings: []
445
445
  };
446
446
 
447
+ // upscale_video had no model argument in 5.83.0. A model value other than flashvsr
448
+ // or relayvsr is validated as it was then: kept, or stripped with the same warning.
449
+ let toolSchema = schema;
450
+ if (
451
+ toolName === 'upscale_video' &&
452
+ Object.prototype.hasOwnProperty.call(args, 'model') &&
453
+ args.model !== 'flashvsr' &&
454
+ args.model !== 'relayvsr' &&
455
+ schema.properties?.model
456
+ ) {
457
+ const properties = { ...schema.properties };
458
+ delete properties.model;
459
+ toolSchema = { ...schema, properties };
460
+ }
461
+
447
462
  const normalizedSchema: HostedToolSchema = {
448
- ...schema,
449
- type: schema.type ?? 'object'
463
+ ...toolSchema,
464
+ type: toolSchema.type ?? 'object'
450
465
  };
451
466
  const cleaned = validateValueAgainstSchema('', args, normalizedSchema, context).value;
452
467
 
468
+ // upscale_video: 2160 is RelayVSR only. FlashVSR (model omitted or anything but
469
+ // relayvsr) keeps the 1080/1440 refusal it had before the enum gained 2160.
470
+ if (toolName === 'upscale_video' && isRecord(cleaned)) {
471
+ const flashVsr2160Error = `Argument "targetResolution" must be one of ${formatEnum([1080, 1440])}`;
472
+ if (
473
+ cleaned.model !== 'relayvsr' &&
474
+ cleaned.targetResolution === 2160 &&
475
+ !context.errors.includes(flashVsr2160Error)
476
+ ) {
477
+ context.errors.push(flashVsr2160Error);
478
+ }
479
+ }
480
+
453
481
  return {
454
482
  ok: context.errors.length === 0,
455
483
  errors: context.errors,
package/src/Chat/tools.ts CHANGED
@@ -84,7 +84,7 @@ export const refineResultTool: ToolDefinition = getHostedTool('refine_result');
84
84
  export const changeAngleTool: ToolDefinition = getHostedTool('change_angle');
85
85
  export const animatePhotoTool: ToolDefinition = getHostedTool('animate_photo');
86
86
 
87
- // Promptless upscalers (RTX VSR image enlargement, FlashVSR 1080p/1440p video).
87
+ // Promptless upscalers (RTX VSR image enlargement, FlashVSR and RelayVSR video).
88
88
  export const upscaleImageTool: ToolDefinition = getHostedTool('upscale_image');
89
89
  export const upscaleVideoTool: ToolDefinition = getHostedTool('upscale_video');
90
90
 
@@ -34,6 +34,7 @@ import {
34
34
  getVideoWorkflowType,
35
35
  getVideoAssetRequirements,
36
36
  isVideoModel,
37
+ isRelayVsrModel,
37
38
  isVideoUpscaleModel,
38
39
  isVideoSegmentationModel,
39
40
  calculateVideoFrames,
@@ -48,6 +49,7 @@ import {
48
49
  isMinimaxH3TurboModel,
49
50
  isMinimaxH3BalancedModel,
50
51
  isMinimaxH3FastH3ReferenceModel,
52
+ isMinimaxH3PrismModel,
51
53
  isMinimaxH3ReferenceModel,
52
54
  isMinimaxH3AudioGuideModel,
53
55
  isMinimaxH3KeyframeModel,
@@ -700,19 +702,22 @@ function validateMinimaxH3Params(params: VideoProjectParams): void {
700
702
  invalid('MiniMax H3 fps is fixed at 24. Omit fps or set it to 24.');
701
703
  }
702
704
  // FastH3 Reference ends in `_turbo` but is distilled to 8 steps, so it is
703
- // neither a 4-step Turbo id nor a Balanced one.
705
+ // neither a 4-step Turbo id nor a Balanced one. Prism's recipe is 8 steps too.
704
706
  const isFastH3Reference = isMinimaxH3FastH3ReferenceModel(params.modelId);
707
+ const isPrism = isMinimaxH3PrismModel(params.modelId);
705
708
  const isTurbo = isMinimaxH3TurboModel(params.modelId);
706
709
  const isBalanced = isMinimaxH3BalancedModel(params.modelId);
707
- const expectedSteps = isFastH3Reference ? 8 : isTurbo ? 4 : isBalanced ? 8 : 20;
710
+ const expectedSteps = isFastH3Reference || isPrism ? 8 : isTurbo ? 4 : isBalanced ? 8 : 20;
708
711
  if (params.steps !== undefined && params.steps !== expectedSteps) {
709
712
  const tier = isFastH3Reference
710
713
  ? ' FastH3 Reference'
711
- : isTurbo
712
- ? ' Turbo'
713
- : isBalanced
714
- ? ' Balanced'
715
- : '';
714
+ : isPrism
715
+ ? ' Prism'
716
+ : isTurbo
717
+ ? ' Turbo'
718
+ : isBalanced
719
+ ? ' Balanced'
720
+ : '';
716
721
  invalid(`MiniMax H3${tier} steps are fixed at ${expectedSteps}.`);
717
722
  }
718
723
  if (params.guidance !== undefined && params.guidance !== 1) {
@@ -1688,7 +1693,7 @@ const VIDEO_UPSCALE_TIMING_ERROR =
1688
1693
  'Omit the source timing, or supply the source video’s exact frame count and frame rate.';
1689
1694
 
1690
1695
  /**
1691
- * FlashVSR source timing is optional. The server probes the uploaded video and
1696
+ * Upscale source timing is optional. The server probes the uploaded video and
1692
1697
  * adopts its exact frame count and frame rate when they are omitted; values a
1693
1698
  * caller does send must describe the source and are checked against it.
1694
1699
  *
@@ -1829,27 +1834,48 @@ function applyVideoParams(
1829
1834
  if (params.sam3VideoPrompt !== undefined)
1830
1835
  throw new Error('sam3VideoPrompt requires the SAM 3 video selection model.');
1831
1836
  if (isVideoUpscaleModel(params.modelId)) {
1832
- if (
1833
- params.detailPreference != null &&
1834
- !['stable', 'sharper'].includes(params.detailPreference)
1835
- ) {
1836
- throw new Error('FlashVSR detailPreference must be stable or sharper.');
1837
- }
1838
- if (params.processingSpeed != null && !['stable', 'faster'].includes(params.processingSpeed)) {
1839
- throw new Error('FlashVSR processingSpeed must be stable or faster.');
1840
- }
1841
- const seed = params.seed ?? 0;
1842
- if (!Number.isInteger(seed) || seed < -1 || seed > 4294967295) {
1843
- throw new Error('FlashVSR seed must be -1 (random) or an integer from 0 through 4294967295.');
1837
+ const relayVsr = isRelayVsrModel(params.modelId);
1838
+ const upscalerName = relayVsr ? 'RelayVSR' : 'FlashVSR';
1839
+ if (relayVsr) {
1840
+ if (params.detailPreference != null) throw new Error('RelayVSR has no detailPreference.');
1841
+ if (params.processingSpeed != null) throw new Error('RelayVSR has no processingSpeed.');
1842
+ if (params.seed != null) throw new Error('RelayVSR has no seed.');
1843
+ } else {
1844
+ if (
1845
+ params.detailPreference != null &&
1846
+ !['stable', 'sharper'].includes(params.detailPreference)
1847
+ ) {
1848
+ throw new Error('FlashVSR detailPreference must be stable or sharper.');
1849
+ }
1850
+ if (
1851
+ params.processingSpeed != null &&
1852
+ !['stable', 'faster'].includes(params.processingSpeed)
1853
+ ) {
1854
+ throw new Error('FlashVSR processingSpeed must be stable or faster.');
1855
+ }
1856
+ const seed = params.seed ?? 0;
1857
+ if (!Number.isInteger(seed) || seed < -1 || seed > 4294967295) {
1858
+ throw new Error(
1859
+ 'FlashVSR seed must be -1 (random) or an integer from 0 through 4294967295.'
1860
+ );
1861
+ }
1844
1862
  }
1845
1863
  const resolution =
1846
1864
  params.upscaleResolution ?? Math.min(Number(params.width), Number(params.height));
1847
- if (![1080, 1440].includes(resolution))
1865
+ if (relayVsr) {
1866
+ if (![1080, 1440, 2160].includes(resolution))
1867
+ throw new Error('Choose 1080p, 1440p or 2160p for RelayVSR video upscaling.');
1868
+ // The source is unknown here, so only a size the caller sends can be checked.
1869
+ if (Math.max(Number(params.width) || 0, Number(params.height) || 0) > 3840)
1870
+ throw new Error('RelayVSR output can be at most 3840 pixels on its long edge.');
1871
+ } else if (![1080, 1440].includes(resolution)) {
1848
1872
  throw new Error('Choose 1080p or 1440p for video upscaling.');
1849
- if (!params.referenceVideo) throw new Error('FlashVSR requires an uploaded referenceVideo.');
1873
+ }
1874
+ if (!params.referenceVideo)
1875
+ throw new Error(`${upscalerName} requires an uploaded referenceVideo.`);
1850
1876
  validateVideoUpscaleTiming(params);
1851
1877
  if (params.positivePrompt?.trim() || params.negativePrompt?.trim())
1852
- throw new Error('FlashVSR is promptless.');
1878
+ throw new Error(`${upscalerName} is promptless.`);
1853
1879
  if (
1854
1880
  params.teacacheThreshold != null ||
1855
1881
  params.trimEndFrame ||
@@ -2016,7 +2042,7 @@ function applyVideoParams(
2016
2042
  : isSeedanceModel(params.modelId)
2017
2043
  ? 4
2018
2044
  : 1;
2019
- // FlashVSR has no client-side maximum: the server's admission check owns
2045
+ // Video upscaling has no client-side maximum: the server's admission check owns
2020
2046
  // the longest source it accepts and refuses a longer one itself.
2021
2047
  const duration = isVideoUpscaleModel(params.modelId)
2022
2048
  ? validateNumber(params.duration, { min: minDuration, propertyName: 'Video duration' })
@@ -2107,8 +2133,10 @@ function applyVideoParams(
2107
2133
  params.upscaleResolution ?? Math.min(Number(params.width), Number(params.height));
2108
2134
  keyFrame.steps = 1;
2109
2135
  keyFrame.seed = params.seed ?? 0;
2110
- keyFrame.detailPreference = params.detailPreference ?? 'stable';
2111
- keyFrame.processingSpeed = params.processingSpeed ?? 'stable';
2136
+ if (!isRelayVsrModel(params.modelId)) {
2137
+ keyFrame.detailPreference = params.detailPreference ?? 'stable';
2138
+ keyFrame.processingSpeed = params.processingSpeed ?? 'stable';
2139
+ }
2112
2140
  keyFrame.generateAudio = true;
2113
2141
  keyFrame.interpolation = 'none';
2114
2142
  }
@@ -372,15 +372,20 @@ export interface MinimaxH3Keyframe {
372
372
  * two-stage ID (`minimax-h3-fastvideo-omni-int8_r2v_turbo_2stage`) takes the
373
373
  * same request and delivers twice the canvas, with the same 384/544/768 px
374
374
  * canvas choices as the other Two-Stage IDs.
375
+ * - Prism (`minimax-h3-prism-int8_r2v`) is an optional `r2v` model for mature
376
+ * themes with its recipe fixed at 8 Euler steps. It takes the same
377
+ * references, keyframes, catalog LoRAs, frame grid and canvas as the other
378
+ * one-stage `r2v` IDs, at the 768p class only (no two-stage ID). It is
379
+ * subject to server authorization and needs `disableNSFWFilter: true`.
375
380
  * - The `i2v` model accepts `referenceImage`, `referenceImageEnd`, or both, and
376
381
  * requires at least one of them. The `flf2v` model requires both.
377
382
  *
378
383
  * #### MiniMax H3 intermediate keyframes (every workflow except `t2v`)
379
384
  * - `keyframes` pins up to 8 still images at chosen frames between the first
380
- * and last frame. 23 ids accept it (`isMinimaxH3KeyframeModel()`): `i2v` and
385
+ * and last frame. 24 ids accept it (`isMinimaxH3KeyframeModel()`): `i2v` and
381
386
  * `flf2v` on every tier (Standard, Balanced, LightX2V Turbo, FastH3 Turbo and
382
387
  * FastH3 Two-Stage), the six FastH3 Sound to Video ids (`ia2v`, `flfa2v`,
383
- * `a2v`, one- and two-stage) and the seven `r2v` ids. Text-to-video and
388
+ * `a2v`, one- and two-stage) and the eight `r2v` ids. Text-to-video and
384
389
  * every other model reject a non-empty list.
385
390
  * - Each entry is `{ image, frameIndex }`. `frameIndex` is the 0-based pixel
386
391
  * frame at 24 fps (`Math.round(seconds * 24)`): an integer from 1 to
@@ -446,8 +451,9 @@ export interface MinimaxH3Keyframe {
446
451
  * - `minimax-h3-ref2va-fp8_r2v` (standard) and
447
452
  * `minimax-h3-ref2va-fp8_r2v_turbo` (four-step Turbo), and
448
453
  * `minimax-h3-ref2va-fp8_r2v_balanced` (eight-step Larry v4 Balanced) condition on labelled reference material
449
- * rather than on frame anchors, as does FastH3 Reference
450
- * (`minimax-h3-fastvideo-omni-int8_r2v_turbo`). The checkpoint accepts up to 9 reference
454
+ * rather than on frame anchors, as do FastH3 Reference
455
+ * (`minimax-h3-fastvideo-omni-int8_r2v_turbo`) and Prism
456
+ * (`minimax-h3-prism-int8_r2v`). The checkpoint accepts up to 9 reference
451
457
  * images, 3 reference videos (24fps, 2-15 seconds each), and 3 reference
452
458
  * audio clips, with at most 12 reference files in total.
453
459
  * - All of those ceilings apply, and at least one visual reference (image or
@@ -510,14 +516,15 @@ export interface VideoProjectParams extends BaseProjectParams {
510
516
  /** Track one selected object across an uploaded video, preserving every source frame. */
511
517
  sam3VideoPrompt?: Sam3VideoPrompt;
512
518
  /**
513
- * FlashVSR delivery resolution on the shorter edge. Source timing and audio are preserved.
514
- * With a FlashVSR `referenceVideo`, `frames`, `fps`, `width` and `height` may be omitted: the
515
- * server adopts the verified source's values. Values that are sent must match the source.
519
+ * FlashVSR or RelayVSR delivery resolution on the shorter edge; 2160 is RelayVSR only. Source
520
+ * timing and audio are preserved. With an upscale `referenceVideo`, `frames`, `fps`, `width` and
521
+ * `height` may be omitted: the server adopts the verified source's values. Values that are sent
522
+ * must match the source.
516
523
  */
517
- upscaleResolution?: 1080 | 1440;
518
- /** FlashVSR detail preference. Defaults to stable (More Stable). */
524
+ upscaleResolution?: 1080 | 1440 | 2160;
525
+ /** FlashVSR detail preference. Defaults to stable (More Stable). RelayVSR refuses it. */
519
526
  detailPreference?: 'stable' | 'sharper';
520
- /** FlashVSR processing speed. Defaults to stable (More Stable). */
527
+ /** FlashVSR processing speed. Defaults to stable (More Stable). RelayVSR refuses it. */
521
528
  processingSpeed?: 'stable' | 'faster';
522
529
  /**
523
530
  * Number of frames to generate. Most requests pass `duration` instead and let
@@ -525,7 +532,7 @@ export interface VideoProjectParams extends BaseProjectParams {
525
532
  * it). Pass `frames` when positions inside the clip must be exact, as with
526
533
  * MiniMax H3 `keyframes`, whose `frameIndex` values must fit the count; H3
527
534
  * takes `124 + n*17` (124, 141, 158, ... 362). When both are passed,
528
- * `duration` wins, except on FlashVSR upscales.
535
+ * `duration` wins, except on video upscales.
529
536
  */
530
537
  frames?: number;
531
538
  /**
@@ -697,7 +704,7 @@ export interface VideoProjectParams extends BaseProjectParams {
697
704
  /**
698
705
  * MiniMax H3 intermediate keyframes: up to 8 still images, each pinned at a
699
706
  * chosen frame between the first and last frame. Accepted by every MiniMax H3
700
- * workflow except text-to-video, 23 ids (`isMinimaxH3KeyframeModel()`):
707
+ * workflow except text-to-video, 24 ids (`isMinimaxH3KeyframeModel()`):
701
708
  * image-to-video (`i2v`), first/last-frame (`flf2v`), Sound to Video (`ia2v`,
702
709
  * `flfa2v`, `a2v`) and Reference to Video (`r2v`). Any other model rejects a
703
710
  * non-empty list, and an empty list is the same as omitting the field.
@@ -1599,7 +1606,7 @@ export interface VideoEstimateRequest {
1599
1606
  includeMonthlyFairUse?: boolean;
1600
1607
  /** Include Priority mode's 1.5× usage in the daily-capacity estimate. */
1601
1608
  priorityMode?: boolean;
1602
- /** FlashVSR source geometry for an estimate. The server verifies the uploaded file at admission. */
1609
+ /** Video upscale source geometry for an estimate. The server verifies the uploaded file at admission. */
1603
1610
  sourceWidth?: number;
1604
1611
  sourceHeight?: number;
1605
1612
  tokenType: TokenType;
@@ -71,7 +71,8 @@ const MINIMAX_H3_VIDEO_MODEL_IDS = new Set([
71
71
  'minimax-h3-ref2va-fp8_r2v_2stage',
72
72
  'minimax-h3-ref2va-fp8_r2v_balanced_2stage',
73
73
  'minimax-h3-fastvideo-omni-int8_r2v_turbo',
74
- 'minimax-h3-fastvideo-omni-int8_r2v_turbo_2stage'
74
+ 'minimax-h3-fastvideo-omni-int8_r2v_turbo_2stage',
75
+ 'minimax-h3-prism-int8_r2v'
75
76
  ]);
76
77
 
77
78
  export function getEnhacementStrength(strength: EnhancementStrength): number {
@@ -111,8 +112,18 @@ export function isVideoSegmentationModel(modelId: string): boolean {
111
112
  /** Standalone, promptless enhancement of a finished video. */
112
113
  export const FLASHVSR_VIDEO_UPSCALE_MODEL_ID = 'flashvsr_v1.1_tiny_long_bf16';
113
114
 
115
+ /** RelayVSR: promptless upscaling at a fixed 2x or 4x, up to 2160p. */
116
+ export const RELAYVSR_X2_VIDEO_UPSCALE_MODEL_ID = 'relayvsr_x2_lightx2v_int8_convrot';
117
+ export const RELAYVSR_X4_VIDEO_UPSCALE_MODEL_ID = 'relayvsr_x4_int8_convrot';
118
+
119
+ export function isRelayVsrModel(modelId: string): boolean {
120
+ return (
121
+ modelId === RELAYVSR_X2_VIDEO_UPSCALE_MODEL_ID || modelId === RELAYVSR_X4_VIDEO_UPSCALE_MODEL_ID
122
+ );
123
+ }
124
+
114
125
  export function isVideoUpscaleModel(modelId: string): boolean {
115
- return modelId === FLASHVSR_VIDEO_UPSCALE_MODEL_ID;
126
+ return modelId === FLASHVSR_VIDEO_UPSCALE_MODEL_ID || isRelayVsrModel(modelId);
116
127
  }
117
128
 
118
129
  /**
@@ -439,13 +450,20 @@ export function isWan3EnhancedModel(modelId: string): boolean {
439
450
  * `minimax-h3-fastvideo-omni-int8_r2v_turbo_2stage` takes the same request
440
451
  * and delivers the clip at exactly twice the canvas, like the Ref2VA
441
452
  * two-stage ids.
453
+ * - Prism: `minimax-h3-prism-int8_r2v`, an optional reference-to-video model
454
+ * for mature themes (a community merge of two Ref2VA finetunes) with its
455
+ * recipe fixed at 8 Euler steps (see `isMinimaxH3PrismModel`). It takes the
456
+ * same references, keyframes, catalog LoRAs and limits as the other one-stage
457
+ * r2v ids at the 768p class only: it has no two-stage id. Server
458
+ * authorization applies, and the Sensitive Content Filter must be off
459
+ * (`disableNSFWFilter: true`).
442
460
  *
443
461
  * All H3 paths share fixed 24fps, guidance 1, and the `124 + n*17` frame grid.
444
462
  * Every path except the FastH3 audio guide generates 32kHz stereo audio
445
463
  * jointly; audio-guide output carries the uploaded audio instead. Standard H3 uses 20 steps;
446
464
  * Balanced uses qualified fixed 8-step acceleration: LightX2V for FL2VA and
447
465
  * Larry v4 for Ref2VA; each Turbo family uses its own 4-step distillation LoRA;
448
- * FastH3 Reference is distilled to a fixed 8 steps.
466
+ * FastH3 Reference is distilled to a fixed 8 steps, and so is Prism.
449
467
  */
450
468
  export function isMinimaxH3Model(modelId: string): boolean {
451
469
  return MINIMAX_H3_VIDEO_MODEL_IDS.has(modelId);
@@ -501,6 +519,15 @@ export function isMinimaxH3AudioGuideModel(modelId: string): boolean {
501
519
  return /^minimax-h3-fastvideo-int8_(?:ia2v|flfa2v|a2v)_turbo(?:_2stage)?$/.test(modelId);
502
520
  }
503
521
 
522
+ /**
523
+ * Check if a model ID is MiniMax H3 Prism (`minimax-h3-prism-int8_r2v`): a
524
+ * one-stage reference-to-video id (`isMinimaxH3ReferenceModel`) whose steps are
525
+ * fixed at 8. It is not a Balanced id: it carries no Larry v4 adapter.
526
+ */
527
+ export function isMinimaxH3PrismModel(modelId: string): boolean {
528
+ return modelId === 'minimax-h3-prism-int8_r2v';
529
+ }
530
+
504
531
  /**
505
532
  * Check if a model ID is one of the 8-step MiniMax H3 Balanced workflows.
506
533
  * FL2VA covers t2v/i2v/flf2v; Ref2VA uses its matching Larry v4 adapter for
@@ -517,8 +544,9 @@ export function isMinimaxH3BalancedModel(modelId: string): boolean {
517
544
  /**
518
545
  * Check if a model ID is the MiniMax H3 Ref2VA multi-reference workflow
519
546
  * (`minimax-h3-ref2va-fp8_r2v`, `..._r2v_turbo`, `..._r2v_balanced`, the
520
- * two-stage `..._r2v_2stage` and `..._r2v_balanced_2stage`, or FastH3
521
- * Reference `minimax-h3-fastvideo-omni-int8_r2v_turbo` and its `_2stage` id).
547
+ * two-stage `..._r2v_2stage` and `..._r2v_balanced_2stage`, FastH3
548
+ * Reference `minimax-h3-fastvideo-omni-int8_r2v_turbo` and its `_2stage` id,
549
+ * or Prism `minimax-h3-prism-int8_r2v`).
522
550
  *
523
551
  * This is the only MiniMax H3 workflow that conditions on more than two input
524
552
  * files, and the only video workflow of any family that carries reference
@@ -541,13 +569,13 @@ export const MINIMAX_H3_MAX_KEYFRAMES = 8;
541
569
  * the worker pins (ComfyUI `MiniMaxH3AddGuide`) at chosen frames between the
542
570
  * first and last frame.
543
571
  *
544
- * Every MiniMax H3 workflow except text-to-video accepts them, 23 ids in all:
572
+ * Every MiniMax H3 workflow except text-to-video accepts them, 24 ids in all:
545
573
  * - image-to-video (`i2v`) and first/last-frame (`flf2v`) on every tier
546
574
  * (Standard, Balanced, LightX2V Turbo, FastH3 Turbo and FastH3 Two-Stage);
547
575
  * - the FastH3 Sound to Video audio guide (`ia2v`, `flfa2v`, `a2v`, one-stage
548
576
  * and two-stage; `isMinimaxH3AudioGuideModel`);
549
- * - Reference to Video (`r2v`: Standard, Turbo, Balanced, FastH3 Reference
550
- * and their three two-stage ids; `isMinimaxH3ReferenceModel`).
577
+ * - Reference to Video (`r2v`: Standard, Turbo, Balanced, FastH3 Reference,
578
+ * Prism and the three two-stage ids; `isMinimaxH3ReferenceModel`).
551
579
  */
552
580
  export function isMinimaxH3KeyframeModel(modelId: string): boolean {
553
581
  if (!isMinimaxH3Model(modelId)) return false;
package/src/index.ts CHANGED
@@ -34,6 +34,8 @@ import {
34
34
  MINIMAX_H3_MAX_KEYFRAMES,
35
35
  PIXAL3D_IMAGE_TO_3D_MODEL_ID,
36
36
  PIXAL3D_MULTIVIEW_IMAGE_TO_3D_MODEL_ID,
37
+ RELAYVSR_X2_VIDEO_UPSCALE_MODEL_ID,
38
+ RELAYVSR_X4_VIDEO_UPSCALE_MODEL_ID,
37
39
  PIXAL3D_ORBIT_VIEW_SLOTS,
38
40
  SAM3_IMAGE_SEGMENT_MODEL_ID,
39
41
  SAM3_VIDEO_SEGMENT_MODEL_ID,
@@ -46,6 +48,7 @@ import {
46
48
  isModelArtifactModel,
47
49
  isPixal3dModel,
48
50
  isPixal3dMultiViewModel,
51
+ isRelayVsrModel,
49
52
  isSegmentationModel,
50
53
  isVideoModel,
51
54
  isVideoUpscaleModel,
@@ -278,6 +281,7 @@ import StatsApi from './Stats/index.js';
278
281
  import ReplayApi from './Replay/index.js';
279
282
  import WorldsApi from './Worlds/index.js';
280
283
  import AnnouncementsApi from './Announcements/index.js';
284
+ import ChangelogApi from './Changelog/index.js';
281
285
  import MediaEncryptionApi from './MediaEncryption/index.js';
282
286
  import { MediaEncryptionError } from './lib/mediaEncryption/index.js';
283
287
  import {
@@ -561,6 +565,8 @@ export {
561
565
  PIXAL3D_ORBIT_VIEW_SLOTS,
562
566
  SAM3_IMAGE_SEGMENT_MODEL_ID,
563
567
  SAM3_VIDEO_SEGMENT_MODEL_ID,
568
+ RELAYVSR_X2_VIDEO_UPSCALE_MODEL_ID,
569
+ RELAYVSR_X4_VIDEO_UPSCALE_MODEL_ID,
564
570
  SEEDREAM_5_PRO_UNCENSORED_MODEL_ID,
565
571
  SEEDREAM_5_5_UNCENSORED_MODEL_ID,
566
572
  calculateVideoFrames,
@@ -572,6 +578,7 @@ export {
572
578
  isModelArtifactModel,
573
579
  isPixal3dModel,
574
580
  isPixal3dMultiViewModel,
581
+ isRelayVsrModel,
575
582
  isSegmentationModel,
576
583
  isSeedreamModel,
577
584
  isVideoModel,
@@ -779,6 +786,13 @@ export class SogniClient {
779
786
  * announcement per account so it stays dismissed on every device.
780
787
  */
781
788
  announcements: AnnouncementsApi;
789
+ /**
790
+ * The public Sogni changelog (`/v1/changelog`): what changed for artists,
791
+ * developers and worker operators. `changelog.list(options)` reads one page
792
+ * of entries with filters and a cursor, `changelog.get(id)` one entry, and
793
+ * `changelog.products()` the products entries can name. No sign-in needed.
794
+ */
795
+ changelog: ChangelogApi;
782
796
  /**
783
797
  * Optional media encryption: read encrypted results, video and
784
798
  * audio. Create the client with `mediaEncryption: 'auto'` to encrypt every
@@ -804,6 +818,7 @@ export class SogniClient {
804
818
  this.worlds = new WorldsApi(config);
805
819
  this.replay = new ReplayApi(config);
806
820
  this.announcements = new AnnouncementsApi(config);
821
+ this.changelog = new ChangelogApi(config);
807
822
 
808
823
  this.apiClient = config.client;
809
824
  }
@@ -965,6 +980,15 @@ export type {
965
980
  WorldBuildWaiting,
966
981
  WorldBuildWaitingReason
967
982
  } from './Worlds/types.js';
983
+ export type {
984
+ ChangelogAudience,
985
+ ChangelogEntry,
986
+ ChangelogEntryType,
987
+ ChangelogLink,
988
+ ChangelogProduct,
989
+ ListChangelogOptions,
990
+ ListChangelogResult
991
+ } from './Changelog/types.js';
968
992
 
969
993
  export {
970
994
  getGptImageGifLayouts,
@@ -455,6 +455,7 @@ export function isComfyModel(modelId: string): boolean {
455
455
  'flux3_',
456
456
  'rtx_vsr_',
457
457
  'flashvsr_',
458
+ 'relayvsr_',
458
459
  'wan_',
459
460
  'ace_step',
460
461
  'minimax_music3',
package/src/version.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  // AUTO-GENERATED by scripts/generate-version.mjs — do not edit.
2
2
  // Source of truth: package.json version.
3
- export const LIB_VERSION = '5.82.0';
3
+ export const LIB_VERSION = '5.84.0';