@acedatacloud/sdk 2026.1011.0 → 2026.1018.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 CHANGED
@@ -1,9 +1,25 @@
1
1
  # AceDataCloud TypeScript SDK
2
2
 
3
- Official TypeScript/Node.js client for the [AceDataCloud API](https://platform.acedata.cloud).
3
+ Official TypeScript/Node.js client for the [AceDataCloud API](https://platform.acedata.cloud?utm_source=opensource&utm_medium=referral&utm_campaign=evergreen&utm_content=sdk_typescript_readme_platform).
4
4
 
5
5
  Requires Node.js 18+ (uses native `fetch`).
6
6
 
7
+ ## Get your Ace Data Cloud API key
8
+
9
+ 1. Open [Ace Data Cloud → Applications](https://platform.acedata.cloud/console/applications?utm_source=opensource&utm_medium=referral&utm_campaign=evergreen&utm_content=sdk_typescript_readme_api_key). Sign in, or register an account first.
10
+ 2. Find **General application**. If it has not been created, choose **Initialize General Application**. A general key can use the services available to your account; a dedicated application's key is limited to its service. Check the required service/model access and [current pricing](https://platform.acedata.cloud/models?utm_source=opensource&utm_medium=referral&utm_campaign=evergreen&utm_content=sdk_typescript_readme_pricing).
11
+ 3. Copy the **API Key** from the application card, or open **Keys / Manage Keys → Create** to create a separate key for this integration. Give it a recognizable name so you can revoke or rotate it independently.
12
+ 4. When creating a key, review **Expiration Time**, **Set Usage Limitation**, and **Allowed APIs**. Enable only the restrictions you need, allow the operations you will call, then click **Create** and copy the token from the key list. Task lookup does not grant permission to submit a generation. Confirm the application's balance can cover your first request; any trial allowance is whatever your account currently displays.
13
+ 5. Copy only the token value, without quotation marks, spaces, or `Bearer `. An API Key / API Token field expects this raw value; only a manually configured HTTP `Authorization` header needs the `Bearer ` prefix. A `platform-...` account-management token cannot replace a generation API key.
14
+
15
+ ![Copy an application API key or open Manage Keys](https://raw.githubusercontent.com/AceDataCloud/NanoBananaDify/2522b2f57210597af2db866445319334a1677a23/_assets/tutorial/get-api-key-en.png)
16
+
17
+ ![Create a separately named key with optional restrictions](https://raw.githubusercontent.com/AceDataCloud/NanoBananaDify/2522b2f57210597af2db866445319334a1677a23/_assets/tutorial/create-api-key-en.png)
18
+
19
+ Save the key in the client's credential store or the environment variable shown below. Never put it in a prompt, shared workflow, screenshot, or Git commit. If authentication fails, check the full copied value, application/service access, expiration, usage limit, and balance before creating another key.
20
+
21
+ Use this application key for API requests. SDK account-management methods require the separate credential described in their management documentation; do not interchange it with the API key. The optional x402 payment flow below is a separate way to pay for supported requests.
22
+
7
23
  ## Installation
8
24
 
9
25
  ```bash
@@ -165,6 +181,38 @@ with integer billed seconds capped at the requested duration (falling back to
165
181
  that duration if it cannot be read). All scenarios, actions, and languages have
166
182
  the same rate; failed tasks and `/maestro/tasks` polling are free.
167
183
 
184
+ ## Fish voice models
185
+
186
+ `client.fish.model({ title, voices: audioUrl })` creates a reusable voice from a
187
+ single publicly downloadable audio URL string, not an array or a multipart
188
+ upload. Prefer a direct URL ending in `.mp3` or `.wav`. Successful creation
189
+ returns the model object directly (HTTP 201); its `_id` can be used as
190
+ `referenceId` in `client.fish.generate`.
191
+
192
+ Created voices are stored publicly long-term and may be searched and used by
193
+ other users. Omit `visibility`: passing `private` or `unlist` does not make the
194
+ voice private. For temporary reference audio without creating a saved model,
195
+ use `client.fish.generate({ text, references: [{ audio: audioUrl, text: transcript }] })`.
196
+
197
+ `client.audio.listFishModels({ selfOnly: true, pageSize: 20, pageNumber: 1 })`
198
+ lists voices created and saved through this platform by the calling account,
199
+ including voices created with its other API tokens. This only filters the list;
200
+ it does not restrict public use. Results are paginated in reverse creation order;
201
+ `sortBy` supports `created_at` and `task_count`, and `authorId` can further filter
202
+ them. Do not combine `selfOnly: true` with `titleLanguage`; that filter is for
203
+ the public library. Responses contain `total`, `items`, and `has_more`;
204
+ `has_more` is boolean for self queries and may be `null` for public-library queries.
205
+
206
+ ## File uploads
207
+
208
+ `client.files.upload(fileBytes, { filename: 'photo.jpg' })` uses the
209
+ management-plane account token, not a generation API key. Use a separate client
210
+ configured with that token. Uploads return `file_url` and `mime`; use the returned
211
+ URL rather than constructing one. The platform assigns an `uploads/<uuid>` path
212
+ and preserves a safe filename extension. Supply a filename matching the actual
213
+ content: MIME inference from the filename does not convert the file. The default
214
+ single-file limit is 100 MB.
215
+
168
216
  ## Multi-Provider Support
169
217
 
170
218
  Image, video, and audio resources support a `provider` parameter to switch between services:
package/dist/index.d.mts CHANGED
@@ -288,6 +288,7 @@ type AudioProvider = 'suno' | 'producer' | 'fish' | (string & {});
288
288
  declare class Audio {
289
289
  private transport;
290
290
  constructor(transport: Transport);
291
+ /** selfOnly filters this account's platform-created voices; it does not make them private. */
291
292
  listFishModels(opts?: {
292
293
  pageSize?: number;
293
294
  pageNumber?: number;
package/dist/index.d.ts CHANGED
@@ -288,6 +288,7 @@ type AudioProvider = 'suno' | 'producer' | 'fish' | (string & {});
288
288
  declare class Audio {
289
289
  private transport;
290
290
  constructor(transport: Transport);
291
+ /** selfOnly filters this account's platform-created voices; it does not make them private. */
291
292
  listFishModels(opts?: {
292
293
  pageSize?: number;
293
294
  pageNumber?: number;
package/dist/index.js CHANGED
@@ -730,6 +730,7 @@ var Audio = class {
730
730
  this.transport = transport;
731
731
  }
732
732
  transport;
733
+ /** selfOnly filters this account's platform-created voices; it does not make them private. */
733
734
  async listFishModels(opts = {}) {
734
735
  const { pageSize, pageNumber, title, tag, selfOnly, authorId, language, titleLanguage, sortBy } = opts;
735
736
  const params = {};