@acedatacloud/sdk 2026.1101.0 → 2026.1101.1

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
@@ -71,8 +71,55 @@ for await (const chunk of stream) {
71
71
  | `client.files` | File uploads |
72
72
  | `client.platform` | Applications, credentials, models management |
73
73
 
74
+ ## Chat usage and billing
75
+
76
+ Accepted model requests through Chat Completions, Responses, and Messages are
77
+ billed by the selected model's input, output, and cache usage, not a fixed fee
78
+ per request. Switching protocol formats does not change this to per-call billing
79
+ or guarantee that a model accepts that format. Consult current model prices and
80
+ `usage.cost` for the charge; the SDK preserves reported usage without recalculating it.
81
+
82
+ - Chat Completions `prompt_tokens` includes reported cached tokens.
83
+ - Responses `input_tokens` includes reported cached tokens.
84
+ - Messages `input_tokens` excludes separately reported `cache_read_input_tokens`
85
+ and `cache_creation_input_tokens`; those dimensions are charged separately.
86
+
87
+ Do not add cached tokens to the input total again for Chat Completions or
88
+ Responses, or treat Messages input alone as the full input/cache usage.
89
+
90
+ ## Public Chat Completions models
91
+
92
+ Pass these public IDs to `client.openai.chat.completions.create({ model, messages })`;
93
+ use `stream: true` for streaming. The SDK passes model-specific fields through
94
+ without rewriting model IDs or enforcing a catalog.
95
+
96
+ - `gpt-6.1-terra`: supports text/image input, streaming, function tools, and
97
+ structured output. Use `reasoning_effort: 'low'` initially; supported levels are
98
+ `low`, `medium`, `high`, `xhigh`, and `max`, not `none` or `minimal`. Responses uses
99
+ `reasoning: { effort: 'low' }` instead. Inputs over 272,000 tokens use long-context
100
+ pricing; consult current prices and reported usage.
101
+ - `claude-opus-5-5`: supports text and streaming Chat Completions with `n: 1`.
102
+ Omit `temperature` and `top_p` to use model defaults; do not set temperature below
103
+ 1 or a non-default top-p. Use `tool_choice: 'auto'`, not forced tools. For native
104
+ thinking blocks, signatures, and native tool semantics, use `client.chat.messages`.
105
+ - `gemini-4-argon`: supports text and streaming Chat Completions. Thinking can
106
+ consume output budget; Google recommends at least `max_tokens: 32768` for ordinary
107
+ tasks. This does not expose Interactions background long-output functionality.
108
+ - `kimi-k3.1-pro`: always reasons; pass `reasoning_effort: 'low'`, `'high'`, or `'max'`.
109
+ Do not disable reasoning. Keep the full assistant message, including
110
+ `reasoning_content` and `tool_calls`, in multi-turn and tool-call history.
111
+ The existing `kimi-k3` alias remains available; use `reasoning_effort: 'max'` for it.
112
+
113
+ Check current account access and prices before calling. A model's advertised
114
+ context size does not guarantee the platform's per-request limit.
115
+
74
116
  ## Native Claude Messages
75
117
 
118
+ For structured output, pass
119
+ `output_config: { format: { type: 'json_schema', schema: yourSchema } }` to
120
+ `client.chat.messages.create(...)`. Read the generated JSON from Messages `content`
121
+ text blocks; this does not change the response envelope or increase `maxTokens`.
122
+
76
123
  Thinking and output configuration are passed through without SDK model-specific
77
124
  enum or combination checks. The selected model determines which values it accepts.
78
125
  For the beta `display: 'updates'` mode, set the required header on a dedicated
@@ -155,6 +202,14 @@ The public model ID also works with `client.openai.images.generate(...)` and
155
202
  `client.openai.images.edit(...)`; those use the OpenAI-compatible fields
156
203
  (`image` for editing) and return response objects, not task handles.
157
204
 
205
+ ### GPT Image 2.5 quality
206
+
207
+ `client.openai.images.generate(...)` and `.edit(...)` pass `quality` through
208
+ unchanged. GPT Image models accept `auto`, `low`, `medium`, and `high`;
209
+ only `gpt-image-2.5-flare` and `gpt-image-2.5-sunburst` (including `:official`
210
+ variants) additionally accept `xhigh` and `max`. Official-channel requests
211
+ are billed by actual token usage, not a fixed fee per image.
212
+
158
213
  ## Maestro Video Production
159
214
 
160
215
  Use the provider client to request one finished video in one language:
@@ -181,8 +236,74 @@ with integer billed seconds capped at the requested duration (falling back to
181
236
  that duration if it cannot be read). All scenarios, actions, and languages have
182
237
  the same rate; failed tasks and `/maestro/tasks` polling are free.
183
238
 
239
+ `style` accepts a freeform visual hint as well as named presets. `voice` accepts
240
+ named voice presets or a 32-character hexadecimal voice `reference_id`; pass it unchanged.
241
+
242
+ ## Producer action-specific inputs
243
+
244
+ `await client.producer.generate({ action: 'generate', prompt: 'A jazz song' })`
245
+ uses inspiration mode (`custom: false` by default). For custom vocals, set
246
+ `custom: true` and provide `lyric`; for custom instrumental music, set
247
+ `custom: true, instrumental: true` without inventing lyrics or a prompt.
248
+ Extensions require `audioId`, positive `continueAt` (seconds, including fractions),
249
+ and `lyric` unless instrumental. Covers, variations, section replacement,
250
+ vocal/instrument swaps, and stems require the source `audioId`. `lyric` and `prompt`
251
+ are no longer required for every action; generation still returns a task handle.
252
+
253
+ ## WebExtrator navigation and cache
254
+
255
+ `client.webextrator.extract(...)` and `.render(...)` accept `cookies`,
256
+ `bypassCache`, and `cacheTtlSeconds`, mapped to the API's snake_case cache fields.
257
+ Each cookie requires `name`, `value`, and `domain`; optional fields are `path`,
258
+ `expires` (Unix seconds), `httpOnly`, `secure`, and `sameSite` (`Strict`, `Lax`,
259
+ or `None`). Keep cookie values out of logs and Git.
260
+
261
+ The server defaults `waitUntil` to `load`, navigation `timeout` to 30 seconds,
262
+ and cache TTL to 3600 seconds. `timeout` must be a positive integer; `delay` and
263
+ `cacheTtlSeconds` must be nonnegative integers. `bypassCache: true` skips cache
264
+ reads but can still cache the fresh result; `cacheTtlSeconds: 0` disables caching
265
+ that result. Omitted options remain omitted.
266
+
267
+ ## Kling reference-video billing
268
+
269
+ Pass `videoList: [{ videoUrl: referenceUrl, referType: 'feature' }]`
270
+ to `client.kling.generate` with `model: 'kling-o1'` or `'kling-v3-omni'`.
271
+ Reference videos use a separate billing tier: **1.202 Credits/second** in `std`
272
+ mode and **1.602 Credits/second** in `pro` mode. For a 5-second O1 result,
273
+ `std` / `pro` cost **4.005 / 5.340 Credits** without a reference video, or
274
+ **6.010 / 8.010 Credits** with one.
275
+
276
+ `referType: 'base'` (the default) edits may follow the reference video's length;
277
+ billing uses the actual output duration rounded to the nearest integer second.
278
+ `referType: 'feature'` uses the requested `duration`. Read
279
+ `response.usage.reference_video_seconds` for the final billed seconds;
280
+ the request-time estimate can differ from the final charge. This is response
281
+ usage, not a request parameter. Image references and first/last frames alone do
282
+ not trigger reference-video billing. Do not combine `videoList` with
283
+ `generateAudio: true`.
284
+
184
285
  ## Suno music processing
185
286
 
287
+ For a private voice created by `client.suno.voices(...)`, upload the original
288
+ song with `await client.suno.upload({ audioUrl: sourceUrl, personaId })`.
289
+ This field is supported only for standard uploads (the default), not
290
+ `mode: 'enhanced'`. After upload succeeds, use the returned `data.audio_id` as
291
+ `audioId` and the same `personaId` in
292
+ `await client.suno.generate({ action: 'upload_cover', audioId, personaId })`.
293
+ Do not reuse a song ID uploaded without that voice association. Voice creation,
294
+ upload, and cover must use the same service channel. `vocalGender` is not
295
+ required and cannot replace `personaId`.
296
+
297
+ Before a cover or extension, optionally call
298
+ `await client.suno.availability({ audioId })`. Use the song's `audio_id` from a
299
+ completed task, not its `task_id`. This is a synchronous API-token-authenticated
300
+ check, currently without a Credits charge; it returns the response object
301
+ directly, not a task handle to poll. `result.data.available` is only `true` on
302
+ success: it is positive evidence on the current channel, not a guarantee that
303
+ a subsequent operation will work. An inconclusive check returns an error,
304
+ including `503 availability_unknown`; never convert an error into `false`.
305
+ Preserve the error code and trace ID.
306
+
186
307
  Use `client.suno.generate({ custom: true, lyric, style, negativeTags })` for
187
308
  custom-mode music. `negativeTags` describes styles or genres to exclude; there
188
309
  is currently no fixed character limit, but overly long input may still fail,
@@ -194,6 +315,9 @@ for covers, extensions or stem separation. If processing returns
194
315
  `id`, when available) and the error's `traceId` for support. The related codes
195
316
  `suno_model_unavailable` and `suno_processing_failed` mean the selected model is
196
317
  unavailable for that operation or processing returned no audio, respectively.
318
+ Suno can also return `api_error` with the message
319
+ `the account may have been offline`; this is a server error, not an SDK
320
+ authentication error.
197
321
  These HTTP 500 errors retain their `code`, `traceId` and `body` on `APIError`.
198
322
  Retrieve an existing task rather than submitting a replacement generation just
199
323
  to check its result.
@@ -282,6 +406,13 @@ const client = new AceDataCloud({
282
406
 
283
407
  The token can also be set via the `ACEDATACLOUD_API_TOKEN` environment variable.
284
408
 
409
+ `await client.platform.config.get()` returns `features` and `region`. `region`
410
+ is the lowercase country/region code detected from the request IP, or `null`
411
+ when unknown. The endpoint accepts no country/region override. Keep any
412
+ user-selected display region in your own application; it does not change
413
+ server-side availability or security policies. Feature keys may change; use
414
+ safe defaults for missing keys and do not share cached config across users.
415
+
285
416
  ## Paying with X402 Instead of a Bearer Token
286
417
 
287
418
  The SDK supports a pluggable `paymentHandler` that is invoked when the
package/dist/index.d.mts CHANGED
@@ -131,7 +131,7 @@ declare class Transport {
131
131
 
132
132
  /** AI Chat resources — aichat/conversations endpoint. */
133
133
 
134
- type AiChatModel = 'mimo-v2.6-pro' | 'mimo-v2.6-flash' | 'gpt-5.6-sol-fast' | 'gpt-5.5' | 'gpt-5.5-pro' | 'gpt-5.4' | 'gpt-5.4-pro' | 'gpt-5.2' | 'gpt-5.1' | 'gpt-5.1-all' | 'gpt-5' | 'gpt-5-mini' | 'gpt-5-nano' | 'gpt-5-all' | 'gpt-4' | 'gpt-4-all' | 'gpt-4-turbo' | 'gpt-4-turbo-preview' | 'gpt-4-vision-preview' | 'gpt-4.1' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-nano' | 'gpt-4.1-nano-2025-04-14' | 'gpt-4.5-preview' | 'gpt-4.5-preview-2025-02-27' | 'gpt-4o' | 'gpt-4o-2024-05-13' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-11-20' | 'gpt-4o-all' | 'gpt-4o-image' | 'gpt-4o-mini' | 'gpt-4o-mini-2024-07-18' | 'gpt-4o-mini-search-preview' | 'gpt-4o-mini-search-preview-2025-03-11' | 'gpt-4o-search-preview' | 'gpt-4o-search-preview-2025-03-11' | 'o1' | 'o1-2024-12-17' | 'o1-all' | 'o1-mini' | 'o1-mini-2024-09-12' | 'o1-mini-all' | 'o1-preview' | 'o1-preview-2024-09-12' | 'o1-preview-all' | 'o1-pro' | 'o1-pro-2025-03-19' | 'o1-pro-all' | 'o3' | 'o3-2025-04-16' | 'o3-all' | 'o3-mini' | 'o3-mini-2025-01-31' | 'o3-mini-2025-01-31-high' | 'o3-mini-2025-01-31-low' | 'o3-mini-2025-01-31-medium' | 'o3-mini-all' | 'o3-mini-high' | 'o3-mini-high-all' | 'o3-mini-low' | 'o3-mini-medium' | 'o3-pro' | 'o3-pro-2025-06-10' | 'o4-mini' | 'o4-mini-2025-04-16' | 'o4-mini-all' | 'o4-mini-high-all' | 'deepseek-r1' | 'deepseek-r1-0528' | 'deepseek-v3' | 'deepseek-v3-250324' | 'deepseek-v4-flash' | 'grok-3' | 'glm-5.1' | 'glm-4.7' | 'glm-4.6' | 'glm-3-turbo' | (string & {});
134
+ type AiChatModel = 'mimo-v2.6-pro' | 'mimo-v2.6-flash' | 'gpt-6.1-terra' | 'gpt-5.6-sol-fast' | 'gpt-5.5' | 'gpt-5.5-pro' | 'gpt-5.4' | 'gpt-5.4-pro' | 'gpt-5.2' | 'gpt-5.1' | 'gpt-5.1-all' | 'gpt-5' | 'gpt-5-mini' | 'gpt-5-nano' | 'gpt-5-all' | 'gpt-4' | 'gpt-4-all' | 'gpt-4-turbo' | 'gpt-4-turbo-preview' | 'gpt-4-vision-preview' | 'gpt-4.1' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-nano' | 'gpt-4.1-nano-2025-04-14' | 'gpt-4.5-preview' | 'gpt-4.5-preview-2025-02-27' | 'gpt-4o' | 'gpt-4o-2024-05-13' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-11-20' | 'gpt-4o-all' | 'gpt-4o-image' | 'gpt-4o-mini' | 'gpt-4o-mini-2024-07-18' | 'gpt-4o-mini-search-preview' | 'gpt-4o-mini-search-preview-2025-03-11' | 'gpt-4o-search-preview' | 'gpt-4o-search-preview-2025-03-11' | 'o1' | 'o1-2024-12-17' | 'o1-all' | 'o1-mini' | 'o1-mini-2024-09-12' | 'o1-mini-all' | 'o1-preview' | 'o1-preview-2024-09-12' | 'o1-preview-all' | 'o1-pro' | 'o1-pro-2025-03-19' | 'o1-pro-all' | 'o3' | 'o3-2025-04-16' | 'o3-all' | 'o3-mini' | 'o3-mini-2025-01-31' | 'o3-mini-2025-01-31-high' | 'o3-mini-2025-01-31-low' | 'o3-mini-2025-01-31-medium' | 'o3-mini-all' | 'o3-mini-high' | 'o3-mini-high-all' | 'o3-mini-low' | 'o3-mini-medium' | 'o3-pro' | 'o3-pro-2025-06-10' | 'o4-mini' | 'o4-mini-2025-04-16' | 'o4-mini-all' | 'o4-mini-high-all' | 'deepseek-r1' | 'deepseek-r1-0528' | 'deepseek-v3' | 'deepseek-v3-250324' | 'deepseek-v4-flash' | 'grok-3' | 'glm-5.1' | 'glm-4.7' | 'glm-4.6' | 'glm-3-turbo' | (string & {});
135
135
  declare class AiChat {
136
136
  private transport;
137
137
  constructor(transport: Transport);
@@ -693,6 +693,16 @@ declare class Kling {
693
693
 
694
694
  /** WebExtrator web render & extract resources. */
695
695
 
696
+ interface WebExtratorCookie {
697
+ name: string;
698
+ value: string;
699
+ domain: string;
700
+ path?: string;
701
+ expires?: number;
702
+ httpOnly?: boolean;
703
+ secure?: boolean;
704
+ sameSite?: 'Strict' | 'Lax' | 'None';
705
+ }
696
706
  declare class WebExtrator {
697
707
  private transport;
698
708
  constructor(transport: Transport);
@@ -709,6 +719,9 @@ declare class WebExtrator {
709
719
  userAgent?: string;
710
720
  callbackUrl?: string;
711
721
  async?: boolean;
722
+ cookies?: WebExtratorCookie[];
723
+ bypassCache?: boolean;
724
+ cacheTtlSeconds?: number;
712
725
  [key: string]: unknown;
713
726
  }): Promise<Record<string, unknown>>;
714
727
  render(opts: {
@@ -722,6 +735,9 @@ declare class WebExtrator {
722
735
  userAgent?: string;
723
736
  callbackUrl?: string;
724
737
  async?: boolean;
738
+ cookies?: WebExtratorCookie[];
739
+ bypassCache?: boolean;
740
+ cacheTtlSeconds?: number;
725
741
  [key: string]: unknown;
726
742
  }): Promise<Record<string, unknown>>;
727
743
  }
package/dist/index.d.ts CHANGED
@@ -131,7 +131,7 @@ declare class Transport {
131
131
 
132
132
  /** AI Chat resources — aichat/conversations endpoint. */
133
133
 
134
- type AiChatModel = 'mimo-v2.6-pro' | 'mimo-v2.6-flash' | 'gpt-5.6-sol-fast' | 'gpt-5.5' | 'gpt-5.5-pro' | 'gpt-5.4' | 'gpt-5.4-pro' | 'gpt-5.2' | 'gpt-5.1' | 'gpt-5.1-all' | 'gpt-5' | 'gpt-5-mini' | 'gpt-5-nano' | 'gpt-5-all' | 'gpt-4' | 'gpt-4-all' | 'gpt-4-turbo' | 'gpt-4-turbo-preview' | 'gpt-4-vision-preview' | 'gpt-4.1' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-nano' | 'gpt-4.1-nano-2025-04-14' | 'gpt-4.5-preview' | 'gpt-4.5-preview-2025-02-27' | 'gpt-4o' | 'gpt-4o-2024-05-13' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-11-20' | 'gpt-4o-all' | 'gpt-4o-image' | 'gpt-4o-mini' | 'gpt-4o-mini-2024-07-18' | 'gpt-4o-mini-search-preview' | 'gpt-4o-mini-search-preview-2025-03-11' | 'gpt-4o-search-preview' | 'gpt-4o-search-preview-2025-03-11' | 'o1' | 'o1-2024-12-17' | 'o1-all' | 'o1-mini' | 'o1-mini-2024-09-12' | 'o1-mini-all' | 'o1-preview' | 'o1-preview-2024-09-12' | 'o1-preview-all' | 'o1-pro' | 'o1-pro-2025-03-19' | 'o1-pro-all' | 'o3' | 'o3-2025-04-16' | 'o3-all' | 'o3-mini' | 'o3-mini-2025-01-31' | 'o3-mini-2025-01-31-high' | 'o3-mini-2025-01-31-low' | 'o3-mini-2025-01-31-medium' | 'o3-mini-all' | 'o3-mini-high' | 'o3-mini-high-all' | 'o3-mini-low' | 'o3-mini-medium' | 'o3-pro' | 'o3-pro-2025-06-10' | 'o4-mini' | 'o4-mini-2025-04-16' | 'o4-mini-all' | 'o4-mini-high-all' | 'deepseek-r1' | 'deepseek-r1-0528' | 'deepseek-v3' | 'deepseek-v3-250324' | 'deepseek-v4-flash' | 'grok-3' | 'glm-5.1' | 'glm-4.7' | 'glm-4.6' | 'glm-3-turbo' | (string & {});
134
+ type AiChatModel = 'mimo-v2.6-pro' | 'mimo-v2.6-flash' | 'gpt-6.1-terra' | 'gpt-5.6-sol-fast' | 'gpt-5.5' | 'gpt-5.5-pro' | 'gpt-5.4' | 'gpt-5.4-pro' | 'gpt-5.2' | 'gpt-5.1' | 'gpt-5.1-all' | 'gpt-5' | 'gpt-5-mini' | 'gpt-5-nano' | 'gpt-5-all' | 'gpt-4' | 'gpt-4-all' | 'gpt-4-turbo' | 'gpt-4-turbo-preview' | 'gpt-4-vision-preview' | 'gpt-4.1' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-nano' | 'gpt-4.1-nano-2025-04-14' | 'gpt-4.5-preview' | 'gpt-4.5-preview-2025-02-27' | 'gpt-4o' | 'gpt-4o-2024-05-13' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-11-20' | 'gpt-4o-all' | 'gpt-4o-image' | 'gpt-4o-mini' | 'gpt-4o-mini-2024-07-18' | 'gpt-4o-mini-search-preview' | 'gpt-4o-mini-search-preview-2025-03-11' | 'gpt-4o-search-preview' | 'gpt-4o-search-preview-2025-03-11' | 'o1' | 'o1-2024-12-17' | 'o1-all' | 'o1-mini' | 'o1-mini-2024-09-12' | 'o1-mini-all' | 'o1-preview' | 'o1-preview-2024-09-12' | 'o1-preview-all' | 'o1-pro' | 'o1-pro-2025-03-19' | 'o1-pro-all' | 'o3' | 'o3-2025-04-16' | 'o3-all' | 'o3-mini' | 'o3-mini-2025-01-31' | 'o3-mini-2025-01-31-high' | 'o3-mini-2025-01-31-low' | 'o3-mini-2025-01-31-medium' | 'o3-mini-all' | 'o3-mini-high' | 'o3-mini-high-all' | 'o3-mini-low' | 'o3-mini-medium' | 'o3-pro' | 'o3-pro-2025-06-10' | 'o4-mini' | 'o4-mini-2025-04-16' | 'o4-mini-all' | 'o4-mini-high-all' | 'deepseek-r1' | 'deepseek-r1-0528' | 'deepseek-v3' | 'deepseek-v3-250324' | 'deepseek-v4-flash' | 'grok-3' | 'glm-5.1' | 'glm-4.7' | 'glm-4.6' | 'glm-3-turbo' | (string & {});
135
135
  declare class AiChat {
136
136
  private transport;
137
137
  constructor(transport: Transport);
@@ -693,6 +693,16 @@ declare class Kling {
693
693
 
694
694
  /** WebExtrator web render & extract resources. */
695
695
 
696
+ interface WebExtratorCookie {
697
+ name: string;
698
+ value: string;
699
+ domain: string;
700
+ path?: string;
701
+ expires?: number;
702
+ httpOnly?: boolean;
703
+ secure?: boolean;
704
+ sameSite?: 'Strict' | 'Lax' | 'None';
705
+ }
696
706
  declare class WebExtrator {
697
707
  private transport;
698
708
  constructor(transport: Transport);
@@ -709,6 +719,9 @@ declare class WebExtrator {
709
719
  userAgent?: string;
710
720
  callbackUrl?: string;
711
721
  async?: boolean;
722
+ cookies?: WebExtratorCookie[];
723
+ bypassCache?: boolean;
724
+ cacheTtlSeconds?: number;
712
725
  [key: string]: unknown;
713
726
  }): Promise<Record<string, unknown>>;
714
727
  render(opts: {
@@ -722,6 +735,9 @@ declare class WebExtrator {
722
735
  userAgent?: string;
723
736
  callbackUrl?: string;
724
737
  async?: boolean;
738
+ cookies?: WebExtratorCookie[];
739
+ bypassCache?: boolean;
740
+ cacheTtlSeconds?: number;
725
741
  [key: string]: unknown;
726
742
  }): Promise<Record<string, unknown>>;
727
743
  }
package/dist/index.js CHANGED
@@ -1408,7 +1408,7 @@ var WebExtrator = class {
1408
1408
  }
1409
1409
  transport;
1410
1410
  async extract(opts) {
1411
- const { url, expectedType, enableLlm, waitUntil, timeout, delay, waitForSelector, blockResources, headers, userAgent, callbackUrl, ...rest } = opts;
1411
+ const { url, expectedType, enableLlm, waitUntil, timeout, delay, waitForSelector, blockResources, headers, userAgent, callbackUrl, cookies, bypassCache, cacheTtlSeconds, ...rest } = opts;
1412
1412
  const body = { url, ...rest };
1413
1413
  if (expectedType !== void 0) body.expected_type = expectedType;
1414
1414
  if (enableLlm !== void 0) body.enable_llm = enableLlm;
@@ -1420,10 +1420,13 @@ var WebExtrator = class {
1420
1420
  if (headers !== void 0) body.headers = headers;
1421
1421
  if (userAgent !== void 0) body.user_agent = userAgent;
1422
1422
  if (callbackUrl !== void 0) body.callback_url = callbackUrl;
1423
+ if (cookies !== void 0) body.cookies = cookies;
1424
+ if (bypassCache !== void 0) body.bypass_cache = bypassCache;
1425
+ if (cacheTtlSeconds !== void 0) body.cache_ttl_seconds = cacheTtlSeconds;
1423
1426
  return this.transport.request("POST", "/webextrator/extract", { json: body });
1424
1427
  }
1425
1428
  async render(opts) {
1426
- const { url, waitUntil, timeout, delay, waitForSelector, blockResources, headers, userAgent, callbackUrl, ...rest } = opts;
1429
+ const { url, waitUntil, timeout, delay, waitForSelector, blockResources, headers, userAgent, callbackUrl, cookies, bypassCache, cacheTtlSeconds, ...rest } = opts;
1427
1430
  const body = { url, ...rest };
1428
1431
  if (waitUntil !== void 0) body.wait_until = waitUntil;
1429
1432
  if (timeout !== void 0) body.timeout = timeout;
@@ -1433,6 +1436,9 @@ var WebExtrator = class {
1433
1436
  if (headers !== void 0) body.headers = headers;
1434
1437
  if (userAgent !== void 0) body.user_agent = userAgent;
1435
1438
  if (callbackUrl !== void 0) body.callback_url = callbackUrl;
1439
+ if (cookies !== void 0) body.cookies = cookies;
1440
+ if (bypassCache !== void 0) body.bypass_cache = bypassCache;
1441
+ if (cacheTtlSeconds !== void 0) body.cache_ttl_seconds = cacheTtlSeconds;
1436
1442
  return this.transport.request("POST", "/webextrator/render", { json: body });
1437
1443
  }
1438
1444
  };
@@ -2034,13 +2040,13 @@ var Producer = class {
2034
2040
  /** Producer AI music generation API, generates 1 song per request. */
2035
2041
  async generate(options) {
2036
2042
  const body = {};
2037
- body["lyric"] = options.lyric;
2038
2043
  body["action"] = options.action;
2039
- body["prompt"] = options.prompt;
2040
2044
  if (options.seed !== void 0) body["seed"] = options.seed;
2045
+ if (options.lyric !== void 0) body["lyric"] = options.lyric;
2041
2046
  if (options.model !== void 0) body["model"] = options.model;
2042
2047
  if (options.title !== void 0) body["title"] = options.title;
2043
- if (options.custom !== void 0) body["custom"] = options.custom;
2048
+ body["custom"] = options.custom ?? false;
2049
+ if (options.prompt !== void 0) body["prompt"] = options.prompt;
2044
2050
  if (options.audioId !== void 0) body["audio_id"] = options.audioId;
2045
2051
  body["weirdness"] = options.weirdness ?? false;
2046
2052
  body["continue_at"] = options.continueAt ?? false;
@@ -2423,8 +2429,9 @@ var Suno = class {
2423
2429
  async upload(options) {
2424
2430
  const body = {};
2425
2431
  body["audio_url"] = options.audioUrl;
2432
+ if (options.personaId !== void 0) body["persona_id"] = options.personaId;
2426
2433
  for (const [key, value] of Object.entries(options)) {
2427
- if (!["async", "audioUrl", "callbackUrl", "maxWait", "pollInterval", "wait"].includes(key) && value !== void 0) {
2434
+ if (!["async", "audioUrl", "callbackUrl", "maxWait", "personaId", "pollInterval", "wait"].includes(key) && value !== void 0) {
2428
2435
  body[key] = value;
2429
2436
  }
2430
2437
  }
@@ -2449,6 +2456,18 @@ var Suno = class {
2449
2456
  }
2450
2457
  return handle;
2451
2458
  }
2459
+ /** Check Suno audio availability. */
2460
+ async availability(options) {
2461
+ const body = {};
2462
+ body["audio_id"] = options.audioId;
2463
+ for (const [key, value] of Object.entries(options)) {
2464
+ if (!["async", "audioId", "callbackUrl", "maxWait", "pollInterval", "wait"].includes(key) && value !== void 0) {
2465
+ body[key] = value;
2466
+ }
2467
+ }
2468
+ if (options.callbackUrl !== void 0) body.callback_url = options.callbackUrl;
2469
+ return await this.transport.request("POST", "/suno/availability", { json: body });
2470
+ }
2452
2471
  };
2453
2472
 
2454
2473
  // src/resources/providers/wan.ts