@acedatacloud/sdk 2026.1009.1 → 2026.1012.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acedatacloud/sdk",
3
- "version": "2026.1009.1",
3
+ "version": "2026.1012.0",
4
4
  "description": "Official TypeScript SDK for AceDataCloud — AI-powered data services",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -19,25 +19,23 @@ function taskId(result: Record<string, unknown>): string {
19
19
  export interface MaestroGenerateOptions {
20
20
  /** Natural-language brief describing the video to produce (the topic, what to show, tone, audience). The agent decides the script, visuals, voiceover and edit. */
21
21
  prompt: string;
22
- /** Production action. Lite supports generate/edit; Standard adds remix; Pro adds extend. remix/edit/extend require `ref_task_id`. */
22
+ /** Production action. generate creates a new video; remix/edit/extend require ref_task_id. */
23
23
  action?: "generate" | "remix" | "edit" | "extend";
24
24
  /** Required when `action` is remix / edit / extend: the task_id of the previous video to start from. */
25
25
  refTaskId?: string;
26
26
  /** Optional reference media (image / video / audio URLs) the agent can use — e.g. a product shot or logo to feature, footage to caption. */
27
27
  fileUrls?: string[];
28
- /** Output languages. Lite supports 1, Standard up to 2, and Pro up to 4. The first is primary; each additional delivered language is billed +6 credits. */
28
+ /** Exactly one output language per task. Defaults to zh-cn. The same per-second rate applies to every language. */
29
29
  langs?: string[];
30
- /** Required output aspect ratio. Lite renders 720p/24fps; Standard and Pro render 1080p/30fps. */
30
+ /** Required output aspect ratio. All videos render at 1080p/30fps. */
31
31
  aspect?: "9:16" | "16:9" | "1:1";
32
- /** Target video length in seconds. Lite: 5–30; Standard: 5–120; Pro: 5–300. Successful jobs are billed by actual delivered duration, never above the requested duration. */
32
+ /** Target video length in seconds, from 5 to 300. Successful jobs are billed by actual delivered duration, never above the requested duration. */
33
33
  duration?: number;
34
- /** Production SKU. `lite` = fast 720p short video at 0.20 credits/s (up to 30s); `standard` = balanced 1080p at 0.60 credits/s (up to 120s); `pro` = advanced production at 1.20 credits/s (up to 300s). Default: standard. */
35
- quality?: "lite" | "standard" | "pro";
36
- /** Production route. Lite supports auto/narrated/captions; Standard adds avatar; Pro adds drama. `captions` requires source video in `file_urls`; `avatar` requires a portrait. avatar bills at 1.15× and drama at 1.35×. */
34
+ /** Production route: auto, narrated, captions, avatar, or drama. captions requires source video in file_urls; avatar requires a portrait. All routes use the same per-second rate. */
37
35
  scenario?: "auto" | "narrated" | "captions" | "avatar" | "drama";
38
36
  /** Optional visual-style preset — expressed through typography, palette, motion, image treatment and pacing. Orthogonal to `scenario` (it does NOT change routing). `auto` (default) lets the director pick; every other value adopts a real named look: `cinematic` = dark film-noir (black + blood-red, Oswald); `glass` = Apple / iOS-26 frosted liquid glass; `luxury` = timeless near-black + indigo, huge whitespace; `swiss` = precise grid + electric blue + oversized numerals; `modern` = clean light SaaS; `editorial` = cream magazine + serif; `warm` = intimate cream + amber; `vibrant` = festive folk colour; `neon` = electric neon glow; `mono` = grayscale, type-led; `pastel` = soft candy pastels; `bold` = huge poster type; `industrial` = raw glitch + rust; `futuristic` = particle glow. A freeform string is also accepted as a soft hint. */
39
37
  style?: "auto" | "cinematic" | "glass" | "luxury" | "swiss" | "modern" | "editorial" | "warm" | "vibrant" | "neon" | "mono" | "pastel" | "bold" | "industrial" | "futuristic" | "retro";
40
- /** Optional narration voice — the **timbre** of the voiceover, independent of language. `auto` (default) lets the director pick a fitting voice. Every preset is cross-lingual: the same voice speaks whatever language(s) you set in `langs`, so choose purely by character — `warm-female`, `bright-female`, `anchor-female`, `clean-female`, `calm-male`, `deep-male`, `documentary-male`, `energetic-male`, `storyteller-male`. Advanced: a raw 32-character Fish `reference_id` is also accepted. For `drama` / `avatar` this sets the primary / narrator timbre; distinct characters may still get their own. */
38
+ /** Optional narration voice — the **timbre** of the voiceover, independent of language. `auto` (default) lets the director pick a fitting voice. Every preset can speak the language selected in `langs`, so choose purely by character — `warm-female`, `bright-female`, `anchor-female`, `clean-female`, `calm-male`, `deep-male`, `documentary-male`, `energetic-male`, `storyteller-male`. For `drama` / `avatar` this sets the primary / narrator timbre; distinct characters may still get their own. */
41
39
  voice?: "auto" | "warm-female" | "bright-female" | "anchor-female" | "clean-female" | "calm-male" | "deep-male" | "documentary-male" | "energetic-male" | "storyteller-male";
42
40
  /** Submit asynchronously and poll. Defaults to true. */
43
41
  async?: boolean;
@@ -54,7 +52,7 @@ export interface MaestroGenerateOptions {
54
52
  export class Maestro {
55
53
  constructor(private transport: Transport) {}
56
54
 
57
- /** Call /maestro/videos. */
55
+ /** Maestro Videos */
58
56
  async generate(options: MaestroGenerateOptions): Promise<TaskHandle> {
59
57
  const body: Record<string, unknown> = {};
60
58
  body["prompt"] = options.prompt;
@@ -64,15 +62,17 @@ export class Maestro {
64
62
  body["langs"] = options.langs ?? ["zh-cn"];
65
63
  body["aspect"] = options.aspect ?? "9:16";
66
64
  body["duration"] = options.duration ?? 30;
67
- body["quality"] = options.quality ?? "standard";
68
65
  body["scenario"] = options.scenario ?? "auto";
69
66
  body["style"] = options.style ?? "auto";
70
67
  body["voice"] = options.voice ?? "auto";
71
68
  for (const [key, value] of Object.entries(options)) {
72
- if (!["action", "aspect", "async", "callbackUrl", "duration", "fileUrls", "langs", "maxWait", "pollInterval", "prompt", "quality", "refTaskId", "scenario", "style", "voice", "wait"].includes(key) && value !== undefined) {
69
+ if (!["action", "aspect", "async", "callbackUrl", "duration", "fileUrls", "langs", "maxWait", "pollInterval", "prompt", "refTaskId", "scenario", "style", "voice", "wait"].includes(key) && value !== undefined) {
73
70
  body[key] = value;
74
71
  }
75
72
  }
73
+ if ((body["langs"] as string[]).length !== 1) {
74
+ throw new Error("langs must contain exactly one item");
75
+ }
76
76
  if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;
77
77
  body.async = options.async ?? true;
78
78
  const result = (await this.transport.request('POST', "/maestro/videos", { json: body })) as Record<string, unknown>;