@byte_fluffy/nexra-sdk 0.1.0-alpha.24 → 0.1.0-alpha.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -41,11 +41,34 @@ Static catalog APIs are also available from `@byte_fluffy/nexra-sdk/catalog`.
41
41
  Exact non-negative decimal helpers are available from
42
42
  `@byte_fluffy/nexra-sdk/decimal`.
43
43
 
44
- The static catalog includes the 13 verified Agnes and CTYun image/video model
44
+ The static catalog includes 14 Agnes and CTYun image/video model
45
45
  contracts. A catalog entry describes parameters; it does not grant access to a
46
46
  private model or publish a sale price. Check the selected environment's model
47
47
  listing and current prices before submitting a task.
48
48
 
49
+ Agnes Video 2.5 Flash uses the same video Task input format as Seedance, with
50
+ model-specific limits: `resolution: "720P"`, integer `duration` from 4 to 12,
51
+ up to 5 reference images and 3 reference audio clips, and no video references.
52
+ Keyframes use image content parts with `role: "first_frame"` or `"last_frame"`;
53
+ they cannot be combined with reference media in the same request.
54
+
55
+ ```ts
56
+ const flashInput = {
57
+ content: [{ type: "text", text: "A paper boat floats across a sunlit pond", role: "prompt" }],
58
+ duration: 4,
59
+ resolution: "720P",
60
+ aspect_ratio: "16:9",
61
+ };
62
+ const flashQuote = await nexra.catalog.quote({
63
+ modelId: "agnes/agnes-video-2-5-flash",
64
+ operation: "video.generate",
65
+ input: flashInput,
66
+ });
67
+ const flashResult = await nexra.run("agnes/agnes-video-2-5-flash", flashInput, {
68
+ quoteToken: flashQuote.quoteToken,
69
+ });
70
+ ```
71
+
49
72
  GPT-6 Sol and GPT-6 Luna are included in the language model catalog. Sale prices
50
73
  are not bundled into the SDK; use the current prices published by the selected
51
74
  Nexra environment:
package/dist/catalog.js CHANGED
@@ -6,8 +6,8 @@ import {
6
6
  getModelSpec,
7
7
  listModelSpecs,
8
8
  projectMediaGeometry
9
- } from "./chunk-7V2P2UQD.js";
10
- import "./chunk-TA3YGQQY.js";
9
+ } from "./chunk-RKIOP6VA.js";
10
+ import "./chunk-OPHFEY7Z.js";
11
11
  export {
12
12
  CatalogClient,
13
13
  applyMediaGeometry,
@@ -69,7 +69,7 @@ var NEXRA_MEDIA_OPERATION_DEFINITIONS = Object.freeze([
69
69
  status: "active",
70
70
  outputKind: "video",
71
71
  features: ["text-to-video", "first-frame", "first-last-frame", "image-to-video", "video-to-video", "audio-to-video", "avatar-video", "reference-image", "reference-video", "reference-audio", "omni-reference"],
72
- parameterKeys: ["voice", "aspect_ratio", "resolution", "quality", "duration", "generate_audio", "output_format", "seed"]
72
+ parameterKeys: ["voice", "aspect_ratio", "resolution", "quality", "duration", "fit", "title", "generate_audio", "output_format", "seed", "watermark"]
73
73
  },
74
74
  {
75
75
  operation: "audio.generate",
@@ -148,6 +148,7 @@ function inputSchema(contentItems, properties, contentBounds = {}) {
148
148
  };
149
149
  }
150
150
  var imagePart = mediaPartSchema("image", ["source", "reference", "first_frame", "last_frame", "mask", "control", "subject", "background"]);
151
+ var videoImagePart = mediaPartSchema("image", ["source", "reference", "first_frame", "last_frame", "mask", "control", "subject", "background", "keyframe"]);
151
152
  var videoPart = mediaPartSchema("video", ["source", "reference", "edit", "extend"]);
152
153
  var audioPart = mediaPartSchema("audio", ["source", "reference", "voice_reference"]);
153
154
  var draftPart = {
@@ -172,14 +173,17 @@ var NEXRA_MEDIA_INPUT_SCHEMAS = Object.freeze({
172
173
  }
173
174
  ),
174
175
  "video.generate": inputSchema(
175
- [textPartSchema(["prompt", "negative_prompt", "script"]), imagePart, videoPart, audioPart, draftPart],
176
+ [textPartSchema(["prompt", "negative_prompt", "script"]), videoImagePart, videoPart, audioPart, draftPart],
176
177
  {
177
178
  voice: { type: "string", minLength: 1, "x-ui": { order: 9, control: "resource", resource: "voice" } },
178
179
  draft: { type: "boolean", "x-ui": { control: "switch" } },
180
+ watermark: { type: "boolean", const: false, "x-ui": { hidden: true } },
179
181
  aspect_ratio: { type: "string", minLength: 1, "x-ui": { order: 10 } },
180
182
  resolution: { type: "string", minLength: 1, "x-ui": { order: 11 } },
181
183
  quality: { type: "string", minLength: 1, "x-ui": { order: 12 } },
182
184
  duration: { type: "number", exclusiveMinimum: 0, "x-ui": { order: 13, control: "number" } },
185
+ fit: { type: "string", enum: ["contain", "cover"], "x-ui": { order: 15, control: "segmented" } },
186
+ title: { type: "string", minLength: 1, "x-ui": { order: 16 } },
183
187
  generate_audio: { type: "boolean", "x-ui": { order: 14, control: "switch" } },
184
188
  output_format: { type: "string", minLength: 1, "x-ui": { order: 15 } },
185
189
  seed: { type: "integer", minimum: 0, "x-ui": { order: 16, control: "number" } }
@@ -333,6 +337,10 @@ function isTerminalTaskStatus(status) {
333
337
  return status === "succeeded" || status === "failed" || status === "cancelled";
334
338
  }
335
339
 
340
+ // ../contracts/src/admin-errors.ts
341
+ var CALL_ERROR_STATUSES = ["failed", "rejected", "delivery_failed"];
342
+ var CALL_ANOMALY_STATUSES = [...CALL_ERROR_STATUSES, "cancelled"];
343
+
336
344
  // ../contracts/src/ratio-display-order.ts
337
345
  function parseRatioParts(value) {
338
346
  const matched = /^\s*(\d+(?:\.\d+)?)\s*:\s*(\d+(?:\.\d+)?)\s*$/.exec(value);