@acedatacloud/sdk 2026.1009.0 → 2026.1011.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/README.md +57 -0
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/resources/providers/maestro.ts +11 -11
package/README.md
CHANGED
|
@@ -108,6 +108,63 @@ const fluxTask = await client.images.generate({
|
|
|
108
108
|
});
|
|
109
109
|
```
|
|
110
110
|
|
|
111
|
+
### Nano Banana 2.1
|
|
112
|
+
|
|
113
|
+
Select `model: 'nano-banana-2.1'` explicitly for generation or editing at
|
|
114
|
+
1K, 2K, or 4K. Omitting `model` still uses `nano-banana`; there is no
|
|
115
|
+
`nano-banana-2.1:official` variant.
|
|
116
|
+
|
|
117
|
+
```typescript
|
|
118
|
+
const task = await client.nanobanana.generate({
|
|
119
|
+
action: 'generate',
|
|
120
|
+
model: 'nano-banana-2.1',
|
|
121
|
+
prompt: 'A blue ceramic vase on a cream background',
|
|
122
|
+
resolution: '2K',
|
|
123
|
+
aspectRatio: '1:1',
|
|
124
|
+
});
|
|
125
|
+
await task.wait();
|
|
126
|
+
const imageUrls = task.urls();
|
|
127
|
+
|
|
128
|
+
const editTask = await client.nanobanana.generate({
|
|
129
|
+
action: 'edit',
|
|
130
|
+
model: 'nano-banana-2.1',
|
|
131
|
+
prompt: 'Change the vase to green; preserve the background',
|
|
132
|
+
imageUrls,
|
|
133
|
+
resolution: '4K',
|
|
134
|
+
});
|
|
135
|
+
await editTask.wait();
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
The public model ID also works with `client.openai.images.generate(...)` and
|
|
139
|
+
`client.openai.images.edit(...)`; those use the OpenAI-compatible fields
|
|
140
|
+
(`image` for editing) and return response objects, not task handles.
|
|
141
|
+
|
|
142
|
+
## Maestro Video Production
|
|
143
|
+
|
|
144
|
+
Use the provider client to request one finished video in one language:
|
|
145
|
+
|
|
146
|
+
```typescript
|
|
147
|
+
const task = await client.maestro.generate({
|
|
148
|
+
prompt: 'Explain vector databases to beginners in 20 seconds',
|
|
149
|
+
langs: ['en'],
|
|
150
|
+
aspect: '9:16',
|
|
151
|
+
duration: 20,
|
|
152
|
+
scenario: 'narrated',
|
|
153
|
+
});
|
|
154
|
+
const result = await task.wait();
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
`langs` defaults to `['zh-cn']` and must contain exactly one language; create
|
|
158
|
+
separate tasks for other languages. The completed result contains one video in
|
|
159
|
+
`response.data.variants`. To revise a video, use `action: 'remix'`, `'edit'`, or
|
|
160
|
+
`'extend'` with `refTaskId: task.id`.
|
|
161
|
+
|
|
162
|
+
There is no quality tier: all videos use 1080p/30fps and target durations of
|
|
163
|
+
5–300 seconds. Successful tasks cost **0.7 Credits per actual delivered second**,
|
|
164
|
+
with integer billed seconds capped at the requested duration (falling back to
|
|
165
|
+
that duration if it cannot be read). All scenarios, actions, and languages have
|
|
166
|
+
the same rate; failed tasks and `/maestro/tasks` polling are free.
|
|
167
|
+
|
|
111
168
|
## Multi-Provider Support
|
|
112
169
|
|
|
113
170
|
Image, video, and audio resources support a `provider` parameter to switch between services:
|
package/dist/index.js
CHANGED
|
@@ -1876,7 +1876,7 @@ var Maestro = class {
|
|
|
1876
1876
|
this.transport = transport;
|
|
1877
1877
|
}
|
|
1878
1878
|
transport;
|
|
1879
|
-
/**
|
|
1879
|
+
/** Maestro Videos */
|
|
1880
1880
|
async generate(options) {
|
|
1881
1881
|
const body = {};
|
|
1882
1882
|
body["prompt"] = options.prompt;
|
|
@@ -1886,15 +1886,17 @@ var Maestro = class {
|
|
|
1886
1886
|
body["langs"] = options.langs ?? ["zh-cn"];
|
|
1887
1887
|
body["aspect"] = options.aspect ?? "9:16";
|
|
1888
1888
|
body["duration"] = options.duration ?? 30;
|
|
1889
|
-
body["quality"] = options.quality ?? "standard";
|
|
1890
1889
|
body["scenario"] = options.scenario ?? "auto";
|
|
1891
1890
|
body["style"] = options.style ?? "auto";
|
|
1892
1891
|
body["voice"] = options.voice ?? "auto";
|
|
1893
1892
|
for (const [key, value] of Object.entries(options)) {
|
|
1894
|
-
if (!["action", "aspect", "async", "callbackUrl", "duration", "fileUrls", "langs", "maxWait", "pollInterval", "prompt", "
|
|
1893
|
+
if (!["action", "aspect", "async", "callbackUrl", "duration", "fileUrls", "langs", "maxWait", "pollInterval", "prompt", "refTaskId", "scenario", "style", "voice", "wait"].includes(key) && value !== void 0) {
|
|
1895
1894
|
body[key] = value;
|
|
1896
1895
|
}
|
|
1897
1896
|
}
|
|
1897
|
+
if (body["langs"].length !== 1) {
|
|
1898
|
+
throw new Error("langs must contain exactly one item");
|
|
1899
|
+
}
|
|
1898
1900
|
if (options.callbackUrl !== void 0) body.callback_url = options.callbackUrl;
|
|
1899
1901
|
body.async = options.async ?? true;
|
|
1900
1902
|
const result = await this.transport.request("POST", "/maestro/videos", { json: body });
|