@acedatacloud/sdk 2026.727.0 → 2026.727.2
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/dist/index.d.mts +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +21 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/resources/providers/producer.ts +4 -4
- package/src/runtime/tasks.ts +20 -9
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/runtime/errors.ts","../src/runtime/transport.ts","../src/resources/aichat.ts","../src/resources/chat.ts","../src/runtime/tasks.ts","../src/resources/images.ts","../src/resources/audio.ts","../src/resources/video.ts","../src/resources/search.ts","../src/resources/tasks.ts","../src/resources/files.ts","../src/resources/platform.ts","../src/resources/openai.ts","../src/resources/glm.ts","../src/resources/veo.ts","../src/resources/kling.ts","../src/resources/webextrator.ts","../src/resources/face.ts","../src/resources/shorturl.ts","../src/resources/providers/digitalhuman.ts","../src/resources/providers/dreamina.ts","../src/resources/providers/fish.ts","../src/resources/providers/flux.ts","../src/resources/providers/hailuo.ts","../src/resources/providers/happyhorse.ts","../src/resources/providers/localization.ts","../src/resources/providers/luma.ts","../src/resources/providers/maestro.ts","../src/resources/providers/nano-banana.ts","../src/resources/providers/producer.ts","../src/resources/providers/seedance.ts","../src/resources/providers/seedream.ts","../src/resources/providers/suno.ts","../src/resources/providers/wan.ts","../src/resources/providers/index.ts","../src/client.ts"],"sourcesContent":["/** AceDataCloud SDK errors. */\n\nexport class AceDataCloudError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'AceDataCloudError';\n }\n}\n\nexport class TransportError extends AceDataCloudError {\n constructor(message: string) {\n super(message);\n this.name = 'TransportError';\n }\n}\n\nexport class APIError extends AceDataCloudError {\n statusCode: number;\n code: string;\n traceId?: string;\n body: Record<string, unknown>;\n\n constructor(opts: {\n message: string;\n statusCode: number;\n code: string;\n traceId?: string;\n body?: Record<string, unknown>;\n }) {\n super(opts.message);\n this.name = 'APIError';\n this.statusCode = opts.statusCode;\n this.code = opts.code;\n this.traceId = opts.traceId;\n this.body = opts.body ?? {};\n }\n}\n\nexport class AuthenticationError extends APIError {\n constructor(opts: ConstructorParameters<typeof APIError>[0]) {\n super(opts);\n this.name = 'AuthenticationError';\n }\n}\n\nexport class TokenMismatchError extends APIError {\n constructor(opts: ConstructorParameters<typeof APIError>[0]) {\n super(opts);\n this.name = 'TokenMismatchError';\n }\n}\n\nexport class RateLimitError extends APIError {\n constructor(opts: ConstructorParameters<typeof APIError>[0]) {\n super(opts);\n this.name = 'RateLimitError';\n }\n}\n\nexport class ValidationError extends APIError {\n constructor(opts: ConstructorParameters<typeof APIError>[0]) {\n super(opts);\n this.name = 'ValidationError';\n }\n}\n\nexport class InsufficientBalanceError extends APIError {\n constructor(opts: ConstructorParameters<typeof APIError>[0]) {\n super(opts);\n this.name = 'InsufficientBalanceError';\n }\n}\n\nexport class ResourceDisabledError extends APIError {\n constructor(opts: ConstructorParameters<typeof APIError>[0]) {\n super(opts);\n this.name = 'ResourceDisabledError';\n }\n}\n\nexport class ModerationError extends APIError {\n constructor(opts: ConstructorParameters<typeof APIError>[0]) {\n super(opts);\n this.name = 'ModerationError';\n }\n}\n\nexport class TimeoutError extends APIError {\n constructor(opts: ConstructorParameters<typeof APIError>[0]) {\n super(opts);\n this.name = 'TimeoutError';\n }\n}\n","/** HTTP transport for AceDataCloud SDK. Uses native fetch (Node 18+). */\n\nimport {\n APIError,\n AuthenticationError,\n InsufficientBalanceError,\n ModerationError,\n RateLimitError,\n ResourceDisabledError,\n TimeoutError,\n TokenMismatchError,\n TransportError,\n ValidationError,\n} from './errors';\nimport type {\n PaymentHandler,\n PaymentRequiredBody,\n} from './payment';\n\nfunction parsePaymentRequired(resp: Response, text: string): PaymentRequiredBody {\n const encoded = resp.headers.get('PAYMENT-REQUIRED');\n if (encoded) {\n try {\n return JSON.parse(atob(encoded)) as PaymentRequiredBody;\n } catch {\n throw mapError(402, {\n error: { code: 'invalid_402', message: 'Invalid PAYMENT-REQUIRED header' },\n });\n }\n }\n try {\n return JSON.parse(text) as PaymentRequiredBody;\n } catch {\n throw mapError(402, { error: { code: 'invalid_402', message: text } });\n }\n}\n\nconst ERROR_CODE_MAP: Record<string, typeof APIError> = {\n invalid_token: AuthenticationError,\n token_expired: AuthenticationError,\n no_token: AuthenticationError,\n token_mismatched: TokenMismatchError,\n used_up: InsufficientBalanceError,\n disabled: ResourceDisabledError,\n too_many_requests: RateLimitError,\n bad_request: ValidationError,\n};\n\nconst RETRY_STATUS_CODES = new Set([408, 409, 429, 500, 502, 503, 504]);\n\nexport function mapError(statusCode: number, body: Record<string, unknown>): APIError {\n // The server occasionally returns ``error`` as a bare string (e.g. x402\n // facilitator diagnostics) or omits/nulls it entirely. Normalize to an\n // object so downstream property access is always safe and the message\n // is preserved verbatim.\n let errorData: Record<string, unknown>;\n if (typeof body.error === 'string') {\n errorData = { message: body.error };\n } else if (body.error && typeof body.error === 'object' && !Array.isArray(body.error)) {\n errorData = body.error as Record<string, unknown>;\n } else {\n errorData = {};\n }\n const code = (errorData.code ?? '') as string;\n const message = (errorData.message ?? '') as string;\n const traceId = body.trace_id as string | undefined;\n\n let ErrorClass = ERROR_CODE_MAP[code];\n if (!ErrorClass) {\n if (statusCode === 403) ErrorClass = ModerationError;\n else if (statusCode === 401) ErrorClass = AuthenticationError;\n else if (statusCode === 429) ErrorClass = RateLimitError;\n else if (statusCode === 400) ErrorClass = ValidationError;\n else ErrorClass = APIError;\n }\n\n return new ErrorClass({ message, statusCode, code, traceId, body });\n}\n\nfunction backoffDelay(attempt: number): number {\n const base = Math.min(2 ** attempt, 8);\n return base + Math.random() * 0.5;\n}\n\nfunction sleep(ms: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n\nfunction isAbortError(error: unknown): boolean {\n return typeof error === 'object' && error !== null && 'name' in error && error.name === 'AbortError';\n}\n\nfunction timeoutError(error: unknown): TimeoutError {\n return new TimeoutError({\n message: `Request timed out${error instanceof Error && error.message ? `: ${error.message}` : ''}`,\n statusCode: 0,\n code: 'timeout',\n });\n}\n\nexport interface TransportOptions {\n apiToken?: string;\n baseURL?: string;\n platformBaseURL?: string;\n timeout?: number;\n maxRetries?: number;\n headers?: Record<string, string>;\n /**\n * Optional handler invoked when a request returns `402 Payment Required`.\n * The handler receives the parsed `accepts` list and must return the extra\n * headers (typically `X-Payment`) to attach to the automatic retry.\n *\n * See `@acedatacloud/x402-client` for a drop-in implementation.\n */\n paymentHandler?: PaymentHandler;\n}\n\nexport class Transport {\n private baseURL: string;\n private platformBaseURL: string;\n private timeout: number;\n private maxRetries: number;\n private headers: Record<string, string>;\n private paymentHandler?: PaymentHandler;\n\n constructor(opts: TransportOptions = {}) {\n const token = opts.apiToken ?? process.env.ACEDATACLOUD_API_TOKEN ?? '';\n if (!token && !opts.paymentHandler) {\n throw new AuthenticationError({\n message:\n 'apiToken is required (or provide a paymentHandler, e.g. from @acedatacloud/x402-client). ' +\n 'Pass it to the client or set ACEDATACLOUD_API_TOKEN.',\n statusCode: 0,\n code: 'no_token',\n });\n }\n this.baseURL = (opts.baseURL ?? 'https://x402.acedata.cloud').replace(/\\/+$/, '');\n this.platformBaseURL = (opts.platformBaseURL ?? 'https://platform.acedata.cloud').replace(/\\/+$/, '');\n this.timeout = opts.timeout ?? 300_000;\n this.maxRetries = opts.maxRetries ?? 2;\n this.paymentHandler = opts.paymentHandler;\n const baseHeaders: Record<string, string> = {\n accept: 'application/json',\n 'content-type': 'application/json',\n 'user-agent': 'acedatacloud-node/0.1.0',\n ...(opts.headers ?? {}),\n };\n if (token) {\n baseHeaders.authorization = `Bearer ${token}`;\n }\n this.headers = baseHeaders;\n }\n\n async request(\n method: string,\n path: string,\n opts: {\n json?: Record<string, unknown>;\n params?: Record<string, string>;\n platform?: boolean;\n timeout?: number;\n headers?: Record<string, string>;\n } = {}\n ): Promise<Record<string, unknown>> {\n const base = opts.platform ? this.platformBaseURL : this.baseURL;\n let url = `${base}${path}`;\n if (opts.params) {\n const qs = new URLSearchParams(opts.params).toString();\n url += `?${qs}`;\n }\n const headers = { ...this.headers, ...(opts.headers ?? {}) };\n const timeoutMs = opts.timeout ?? this.timeout;\n\n let lastError: Error | null = null;\n let paymentAttempted = false;\n let extraHeaders: Record<string, string> = {};\n let attempt = 0;\n while (true) {\n const controller = new AbortController();\n const timer = setTimeout(() => controller.abort(), timeoutMs);\n try {\n const resp = await fetch(url, {\n method,\n headers: { ...headers, ...extraHeaders },\n body: opts.json ? JSON.stringify(opts.json) : undefined,\n signal: controller.signal,\n });\n clearTimeout(timer);\n\n if (resp.status === 402 && this.paymentHandler && !paymentAttempted) {\n const text = await resp.text();\n const body = parsePaymentRequired(resp, text);\n if (\n !body ||\n typeof body !== 'object' ||\n !Array.isArray((body as PaymentRequiredBody).accepts) ||\n !(body as PaymentRequiredBody).accepts.length ||\n !(body as PaymentRequiredBody).accepts.every(\n (requirement) => requirement !== null && typeof requirement === 'object'\n )\n ) {\n throw mapError(402, { error: { code: 'invalid_402', message: 'No payment requirements' } });\n }\n const paymentRequired = body as PaymentRequiredBody;\n const result = await this.paymentHandler({\n url,\n method,\n body: opts.json,\n accepts: paymentRequired.accepts,\n });\n extraHeaders = { ...extraHeaders, ...result.headers };\n paymentAttempted = true;\n continue;\n }\n\n if (resp.status >= 400) {\n const text = await resp.text();\n let body: Record<string, unknown>;\n try {\n body = JSON.parse(text) as Record<string, unknown>;\n } catch {\n body = { error: { code: 'unknown', message: text } };\n }\n if (!paymentAttempted && RETRY_STATUS_CODES.has(resp.status) && attempt < this.maxRetries) {\n await sleep(backoffDelay(attempt) * 1000);\n attempt += 1;\n continue;\n }\n throw mapError(resp.status, body);\n }\n\n return (await resp.json()) as Record<string, unknown>;\n } catch (err) {\n clearTimeout(timer);\n if (err instanceof APIError) throw err;\n if (isAbortError(err)) {\n lastError = timeoutError(err);\n } else {\n lastError = err as Error;\n }\n if (!paymentAttempted && attempt < this.maxRetries) {\n await sleep(backoffDelay(attempt) * 1000);\n attempt += 1;\n continue;\n }\n throw lastError;\n }\n }\n }\n\n async *requestStream(\n method: string,\n path: string,\n opts: { json?: Record<string, unknown>; timeout?: number } = {}\n ): AsyncGenerator<string, void, unknown> {\n const url = `${this.baseURL}${path}`;\n const headers = { ...this.headers, accept: 'text/event-stream' };\n let paymentAttempted = false;\n let extraHeaders: Record<string, string> = {};\n\n while (true) {\n const controller = new AbortController();\n const timeoutMs = opts.timeout ?? this.timeout;\n const connectionTimer = setTimeout(() => controller.abort(), timeoutMs);\n try {\n let resp: Response;\n try {\n resp = await fetch(url, {\n method,\n headers: { ...headers, ...extraHeaders },\n body: opts.json ? JSON.stringify(opts.json) : undefined,\n signal: controller.signal,\n });\n } catch (error) {\n if (isAbortError(error)) throw timeoutError(error);\n throw error;\n } finally {\n clearTimeout(connectionTimer);\n }\n\n if (resp.status === 402 && this.paymentHandler && !paymentAttempted) {\n const text = await resp.text();\n const body = parsePaymentRequired(resp, text);\n if (\n !body ||\n typeof body !== 'object' ||\n !Array.isArray((body as PaymentRequiredBody).accepts) ||\n !(body as PaymentRequiredBody).accepts.length ||\n !(body as PaymentRequiredBody).accepts.every(\n (requirement) => requirement !== null && typeof requirement === 'object'\n )\n ) {\n throw mapError(402, { error: { code: 'invalid_402', message: 'No payment requirements' } });\n }\n const paymentRequired = body as PaymentRequiredBody;\n const result = await this.paymentHandler({\n url,\n method,\n body: opts.json,\n accepts: paymentRequired.accepts,\n });\n extraHeaders = { ...extraHeaders, ...result.headers };\n paymentAttempted = true;\n continue;\n }\n\n if (resp.status >= 400) {\n const text = await resp.text();\n let body: Record<string, unknown>;\n try {\n body = JSON.parse(text) as Record<string, unknown>;\n } catch {\n body = { error: { code: 'unknown', message: text } };\n }\n throw mapError(resp.status, body);\n }\n\n if (!resp.body) throw new TransportError('No response body for stream');\n\n const reader = resp.body.getReader();\n const decoder = new TextDecoder();\n let buffer = '';\n\n try {\n while (true) {\n const idleTimer = setTimeout(() => controller.abort(), timeoutMs);\n let result: Awaited<ReturnType<typeof reader.read>>;\n try {\n result = await reader.read();\n } catch (error) {\n if (isAbortError(error)) throw timeoutError(error);\n throw error;\n } finally {\n clearTimeout(idleTimer);\n }\n const { done, value } = result;\n if (done) break;\n buffer += decoder.decode(value, { stream: true });\n\n const lines = buffer.split('\\n');\n buffer = lines.pop() ?? '';\n\n for (const line of lines) {\n if (line.startsWith('data: ')) {\n const data = line.slice(6);\n if (data === '[DONE]') return;\n yield data;\n }\n }\n }\n } finally {\n try {\n await reader.cancel();\n } catch {\n // Preserve the original stream error, especially SDK TimeoutError.\n }\n }\n return;\n } finally {\n clearTimeout(connectionTimer);\n }\n }\n }\n\n async upload(\n path: string,\n fileData: Buffer | Uint8Array,\n filename: string,\n opts: { timeout?: number } = {}\n ): Promise<Record<string, unknown>> {\n const url = `${this.platformBaseURL}${path}`;\n const boundary = `----AceDataCloudBoundary${Date.now()}`;\n const headers = {\n ...this.headers,\n 'content-type': `multipart/form-data; boundary=${boundary}`,\n };\n delete (headers as Record<string, string>)['content-type'];\n\n const body = new FormData();\n body.append('file', new Blob([fileData]), filename);\n\n const authHeaders: Record<string, string> = {\n authorization: this.headers.authorization,\n 'user-agent': this.headers['user-agent'],\n };\n\n const controller = new AbortController();\n const timer = setTimeout(() => controller.abort(), opts.timeout ?? this.timeout);\n try {\n let resp: Response;\n try {\n resp = await fetch(url, {\n method: 'POST',\n headers: authHeaders,\n body,\n signal: controller.signal,\n });\n } catch (error) {\n if (isAbortError(error)) throw timeoutError(error);\n throw error;\n }\n clearTimeout(timer);\n\n if (resp.status >= 400) {\n const text = await resp.text();\n let respBody: Record<string, unknown>;\n try {\n respBody = JSON.parse(text) as Record<string, unknown>;\n } catch {\n respBody = { error: { code: 'unknown', message: text } };\n }\n throw mapError(resp.status, respBody);\n }\n return (await resp.json()) as Record<string, unknown>;\n } finally {\n clearTimeout(timer);\n }\n }\n}\n","/** AI Chat resources — aichat/conversations endpoint. */\n\nimport { Transport } from '../runtime/transport';\n\nexport type AiChatModel =\n | 'gpt-5.5'\n | 'gpt-5.5-pro'\n | 'gpt-5.4'\n | 'gpt-5.4-pro'\n | 'gpt-5.2'\n | 'gpt-5.1'\n | 'gpt-5.1-all'\n | 'gpt-5'\n | 'gpt-5-mini'\n | 'gpt-5-nano'\n | 'gpt-5-all'\n | 'gpt-4'\n | 'gpt-4-all'\n | 'gpt-4-turbo'\n | 'gpt-4-turbo-preview'\n | 'gpt-4-vision-preview'\n | 'gpt-4.1'\n | 'gpt-4.1-2025-04-14'\n | 'gpt-4.1-mini'\n | 'gpt-4.1-mini-2025-04-14'\n | 'gpt-4.1-nano'\n | 'gpt-4.1-nano-2025-04-14'\n | 'gpt-4.5-preview'\n | 'gpt-4.5-preview-2025-02-27'\n | 'gpt-4o'\n | 'gpt-4o-2024-05-13'\n | 'gpt-4o-2024-08-06'\n | 'gpt-4o-2024-11-20'\n | 'gpt-4o-all'\n | 'gpt-4o-image'\n | 'gpt-4o-mini'\n | 'gpt-4o-mini-2024-07-18'\n | 'gpt-4o-mini-search-preview'\n | 'gpt-4o-mini-search-preview-2025-03-11'\n | 'gpt-4o-search-preview'\n | 'gpt-4o-search-preview-2025-03-11'\n | 'o1'\n | 'o1-2024-12-17'\n | 'o1-all'\n | 'o1-mini'\n | 'o1-mini-2024-09-12'\n | 'o1-mini-all'\n | 'o1-preview'\n | 'o1-preview-2024-09-12'\n | 'o1-preview-all'\n | 'o1-pro'\n | 'o1-pro-2025-03-19'\n | 'o1-pro-all'\n | 'o3'\n | 'o3-2025-04-16'\n | 'o3-all'\n | 'o3-mini'\n | 'o3-mini-2025-01-31'\n | 'o3-mini-2025-01-31-high'\n | 'o3-mini-2025-01-31-low'\n | 'o3-mini-2025-01-31-medium'\n | 'o3-mini-all'\n | 'o3-mini-high'\n | 'o3-mini-high-all'\n | 'o3-mini-low'\n | 'o3-mini-medium'\n | 'o3-pro'\n | 'o3-pro-2025-06-10'\n | 'o4-mini'\n | 'o4-mini-2025-04-16'\n | 'o4-mini-all'\n | 'o4-mini-high-all'\n | 'deepseek-r1'\n | 'deepseek-r1-0528'\n | 'deepseek-v3'\n | 'deepseek-v3-250324'\n | 'deepseek-v4-flash'\n | 'grok-3'\n | 'glm-5.1'\n | 'glm-4.7'\n | 'glm-4.6'\n | 'glm-3-turbo'\n | (string & {});\n\nexport class AiChat {\n constructor(private transport: Transport) {}\n\n async create(opts: {\n model: AiChatModel;\n question: string;\n id?: string;\n preset?: string;\n stateful?: boolean;\n references?: string[];\n [key: string]: unknown;\n }): Promise<Record<string, unknown>> {\n const { model, question, id, preset, stateful, references, ...rest } = opts;\n const body: Record<string, unknown> = { model, question, ...rest };\n if (id !== undefined) body.id = id;\n if (preset !== undefined) body.preset = preset;\n if (stateful !== undefined) body.stateful = stateful;\n if (references !== undefined) body.references = references;\n return this.transport.request('POST', '/aichat/conversations', { json: body });\n }\n}\n","/** Chat resources — native provider APIs (Claude Messages). */\n\nimport { Transport } from '../runtime/transport';\n\nexport class Messages {\n constructor(private transport: Transport) {}\n\n async create(opts: {\n model: string;\n messages: Array<Record<string, unknown>>;\n maxTokens?: number;\n stream?: false;\n [key: string]: unknown;\n }): Promise<Record<string, unknown>>;\n async create(opts: {\n model: string;\n messages: Array<Record<string, unknown>>;\n maxTokens?: number;\n stream: true;\n [key: string]: unknown;\n }): Promise<AsyncGenerator<Record<string, unknown>>>;\n async create(opts: {\n model: string;\n messages: Array<Record<string, unknown>>;\n maxTokens?: number;\n stream?: boolean;\n [key: string]: unknown;\n }): Promise<Record<string, unknown> | AsyncGenerator<Record<string, unknown>>> {\n const { model, messages, maxTokens = 4096, stream, ...rest } = opts;\n const body: Record<string, unknown> = { model, messages, max_tokens: maxTokens, ...rest };\n\n if (stream) {\n body.stream = true;\n return this.stream(body);\n }\n return this.transport.request('POST', '/v1/messages', { json: body });\n }\n\n private async *stream(body: Record<string, unknown>): AsyncGenerator<Record<string, unknown>> {\n for await (const chunk of this.transport.requestStream('POST', '/v1/messages', { json: body })) {\n yield JSON.parse(chunk);\n }\n }\n\n async countTokens(opts: {\n model: string;\n messages: Array<Record<string, unknown>>;\n [key: string]: unknown;\n }): Promise<Record<string, unknown>> {\n const { model, messages, ...rest } = opts;\n return this.transport.request('POST', '/v1/messages/count_tokens', {\n json: { model, messages, ...rest },\n });\n }\n}\n\nexport class Chat {\n readonly messages: Messages;\n\n constructor(transport: Transport) {\n this.messages = new Messages(transport);\n }\n}\n","/**\n * Task polling for long-running operations.\n *\n * A generation call always returns a handle, never sometimes a handle and\n * sometimes a plain object — the caller decides whether to wait. When the server\n * answers synchronously (some endpoints do for fast or cached results) the\n * handle is born already complete, so `wait()` returns immediately rather than\n * polling for something that has already arrived.\n *\n * Kept behaviourally identical to the Python and Go implementations; a\n * divergence here is a cross-language bug that only shows up in production.\n */\n\nimport { Transport } from './transport';\n\nexport interface TaskHandleOptions {\n pollInterval?: number;\n maxWait?: number;\n}\n\nconst DONE = new Set(['succeed', 'succeeded', 'success', 'completed', 'complete', 'finished']);\nconst FAILED = new Set(['failed', 'failure', 'error', 'cancelled', 'canceled', 'rejected']);\n\nfunction statusWords(node: unknown, depth = 0): string[] {\n if (depth > 6) return [];\n const out: string[] = [];\n if (Array.isArray(node)) {\n for (const item of node) out.push(...statusWords(item, depth + 1));\n } else if (node && typeof node === 'object') {\n for (const [key, value] of Object.entries(node as Record<string, unknown>)) {\n if ((key === 'state' || key === 'status') && typeof value === 'string') {\n out.push(value.toLowerCase());\n } else {\n out.push(...statusWords(value, depth + 1));\n }\n }\n }\n return out;\n}\n\nfunction collectUrls(node: unknown, out: string[], depth = 0): void {\n if (depth > 6) return;\n if (Array.isArray(node)) {\n for (const item of node) collectUrls(item, out, depth + 1);\n } else if (node && typeof node === 'object') {\n for (const [key, value] of Object.entries(node as Record<string, unknown>)) {\n const looksLikeUrl = key.endsWith('_url') || key === 'url' || key.endsWith('_urls');\n if (typeof value === 'string' && value.startsWith('http') && looksLikeUrl) {\n out.push(value);\n } else {\n collectUrls(value, out, depth + 1);\n }\n }\n }\n}\n\n/**\n * Every artifact URL in a task response, outermost first.\n *\n * Where the artifact lives is not derivable from the OpenAPI spec — `response`\n * is typed as a bare object and the key differs per service (`video_url`,\n * `image_url`, `data[].image_url`). Rather than keep a per-service table that\n * goes stale, collect anything URL-shaped.\n */\nexport function artifactUrls(state: Record<string, unknown> | null): string[] {\n if (!state) return [];\n const found: string[] = [];\n collectUrls(state.response ?? state, found);\n return [...new Set(found)];\n}\n\n/** Percent complete when the service reports it, else null. */\nexport function taskProgress(state: Record<string, unknown> | null): number | null {\n if (!state) return null;\n for (const value of findKeys(state.response ?? state, ['progress', 'percent', 'percentage'])) {\n if (typeof value === 'boolean') continue;\n if (typeof value === 'number') {\n const pct = value > 0 && value <= 1 ? Math.round(value * 100) : Math.round(value);\n return Math.max(0, Math.min(100, pct));\n }\n if (typeof value === 'string') {\n const parsed = Number.parseFloat(value.trim().replace(/%$/, ''));\n if (!Number.isNaN(parsed)) return Math.max(0, Math.min(100, Math.round(parsed)));\n }\n }\n return null;\n}\n\nfunction* findKeys(node: unknown, names: string[], depth = 0): Generator<unknown> {\n if (depth > 6) return;\n if (Array.isArray(node)) {\n for (const item of node) yield* findKeys(item, names, depth + 1);\n } else if (node && typeof node === 'object') {\n for (const [key, value] of Object.entries(node as Record<string, unknown>)) {\n if (names.includes(key)) yield value;\n else yield* findKeys(value, names, depth + 1);\n }\n }\n}\n\n/** The upstream's own words for why a task failed. */\nexport function failureReason(state: Record<string, unknown> | null): string {\n if (!state) return 'Task failed.';\n const response = (state.response ?? state) as Record<string, unknown>;\n const error = response.error;\n if (error && typeof error === 'object') {\n const message = (error as Record<string, unknown>).message ?? (error as Record<string, unknown>).detail;\n if (typeof message === 'string' && message) return message;\n } else if (typeof error === 'string' && error) {\n return error;\n }\n for (const key of ['message', 'failure_reason', 'fail_reason']) {\n const value = response[key];\n if (typeof value === 'string' && value) return value;\n }\n return 'Task failed.';\n}\n\n/**\n * Reduce a poll response to succeeded | failed | '' (still running).\n *\n * Services report completion inconsistently. A status word is the strongest\n * signal and outranks the `success` flag, since a response can carry\n * `success: false` for a retryable hiccup while the task is still running.\n * This normaliser is deliberately broad; narrowing it silently hangs whichever\n * service it drops.\n */\nexport function taskStatus(state: Record<string, unknown>): 'succeeded' | 'failed' | '' {\n const response = (state.response ?? state) as Record<string, unknown> | null;\n if (!response || typeof response !== 'object') return '';\n\n const words = statusWords(response);\n if (words.some((w) => FAILED.has(w))) return 'failed';\n if (words.some((w) => DONE.has(w))) {\n // A terminal word with no artifact means the job ended without output.\n return artifactUrls(state).length > 0 ? 'succeeded' : 'failed';\n }\n if (words.length > 0) return '';\n\n const finished =\n (response.finished_at !== undefined && response.finished_at !== null) ||\n (state.finished_at !== undefined && state.finished_at !== null);\n if (finished) {\n if (response.success === true) return 'succeeded';\n if (response.success === false) return 'failed';\n if (artifactUrls(state).length > 0) return 'succeeded';\n }\n\n return artifactUrls(state).length > 0 ? 'succeeded' : '';\n}\n\nexport class TaskHandle {\n readonly id: string;\n private pollEndpoint: string;\n private transport: Transport;\n private _result: Record<string, unknown> | null = null;\n\n constructor(\n taskId: string,\n pollEndpoint: string,\n transport: Transport,\n submitted?: Record<string, unknown>,\n ) {\n this.id = taskId;\n this.pollEndpoint = pollEndpoint;\n this.transport = transport;\n // A submission that already carried the artifact is a finished task. The\n // caller should not have to detect that and skip wait() themselves.\n if (submitted && artifactUrls({ response: submitted }).length > 0) {\n this._result = { response: submitted };\n }\n }\n\n get done(): boolean {\n return this._result !== null;\n }\n\n /** Artifact URLs, once completed. */\n urls(): string[] {\n return artifactUrls(this._result);\n }\n\n progress(): number | null {\n return taskProgress(this._result);\n }\n\n async get(): Promise<Record<string, unknown>> {\n return this.transport.request('POST', this.pollEndpoint, {\n json: { id: this.id, action: 'retrieve' },\n });\n }\n\n async isCompleted(): Promise<boolean> {\n if (this.done) return true;\n const status = taskStatus(await this.get());\n return status === 'succeeded' || status === 'failed';\n }\n\n async wait(opts: TaskHandleOptions = {}): Promise<Record<string, unknown>> {\n if (this._result !== null) return this._result;\n\n const pollInterval = opts.pollInterval ?? 3000;\n const maxWait = opts.maxWait ?? 600_000;\n const start = Date.now();\n\n while (Date.now() - start < maxWait) {\n const state = await this.get();\n const status = taskStatus(state);\n\n if (status === 'succeeded' || status === 'failed') {\n this._result = state;\n return state;\n }\n await new Promise((resolve) => setTimeout(resolve, pollInterval));\n }\n throw new Error(`Task ${this.id} did not complete within ${maxWait}ms`);\n }\n\n get result(): Record<string, unknown> | null {\n return this._result;\n }\n}\n","/** Image generation resources. */\n\nimport { Transport } from '../runtime/transport';\nimport { TaskHandle } from '../runtime/tasks';\n\nexport type ImageProvider = 'nano-banana' | 'flux' | 'seedream' | (string & {});\n\nexport class Images {\n constructor(private transport: Transport) {}\n\n async generate(opts: {\n prompt: string;\n provider?: ImageProvider;\n action?: 'generate' | 'edit';\n model?: string;\n negativePrompt?: string;\n imageUrl?: string;\n imageUrls?: string[];\n aspectRatio?: string;\n resolution?: string;\n callbackUrl?: string;\n async?: boolean;\n wait?: boolean;\n pollInterval?: number;\n maxWait?: number;\n [key: string]: unknown;\n }): Promise<Record<string, unknown> | TaskHandle> {\n const { prompt, provider = 'nano-banana', action, model, negativePrompt, imageUrl, imageUrls, aspectRatio, resolution, callbackUrl, wait: shouldWait, pollInterval, maxWait, ...rest } = opts;\n const body: Record<string, unknown> = { prompt, ...rest };\n if (action !== undefined) body.action = action;\n if (model !== undefined) body.model = model;\n if (negativePrompt !== undefined) body.negative_prompt = negativePrompt;\n if (imageUrl !== undefined) body.image_url = imageUrl;\n if (imageUrls !== undefined) body.image_urls = imageUrls;\n if (aspectRatio !== undefined) body.aspect_ratio = aspectRatio;\n if (resolution !== undefined) body.resolution = resolution;\n if (callbackUrl !== undefined) body.callback_url = callbackUrl;\n\n const endpoint = `/${provider}/images`;\n const result = await this.transport.request('POST', endpoint, { json: body });\n const taskId = result.task_id as string | undefined;\n\n if (!taskId || (result.data && !shouldWait)) return result;\n\n const handle = new TaskHandle(taskId, `/${provider}/tasks`, this.transport);\n if (shouldWait) return handle.wait({ pollInterval, maxWait });\n return handle;\n }\n}\n","/** Audio/music generation resources. */\n\nimport { Transport } from '../runtime/transport';\nimport { TaskHandle } from '../runtime/tasks';\n\nexport type AudioProvider = 'suno' | 'producer' | 'fish' | (string & {});\n\nexport class Audio {\n constructor(private transport: Transport) {}\n\n async listFishModels(opts: {\n pageSize?: number;\n pageNumber?: number;\n title?: string;\n tag?: string;\n selfOnly?: boolean;\n authorId?: string;\n language?: string;\n titleLanguage?: string;\n sortBy?: string;\n } = {}): Promise<Record<string, unknown>> {\n const { pageSize, pageNumber, title, tag, selfOnly, authorId, language, titleLanguage, sortBy } = opts;\n const params: Record<string, string> = {};\n if (pageSize !== undefined) params.page_size = String(pageSize);\n if (pageNumber !== undefined) params.page_number = String(pageNumber);\n if (title !== undefined) params.title = title;\n if (tag !== undefined) params.tag = tag;\n if (selfOnly !== undefined) params.self = String(selfOnly);\n if (authorId !== undefined) params.author_id = authorId;\n if (language !== undefined) params.language = language;\n if (titleLanguage !== undefined) params.title_language = titleLanguage;\n if (sortBy !== undefined) params.sort_by = sortBy;\n return this.transport.request('GET', '/fish/model', { params });\n }\n\n async getFishModel(id: string): Promise<Record<string, unknown>> {\n return this.transport.request('GET', `/fish/model/${id}`);\n }\n\n async generate(opts: {\n prompt: string;\n provider?: AudioProvider;\n model?: string;\n tags?: string;\n callbackUrl?: string;\n async?: boolean;\n wait?: boolean;\n pollInterval?: number;\n maxWait?: number;\n [key: string]: unknown;\n }): Promise<Record<string, unknown> | TaskHandle> {\n const { prompt, provider = 'suno', model, tags, callbackUrl, wait: shouldWait, pollInterval, maxWait, ...rest } = opts;\n let result: Record<string, unknown>;\n if (provider === 'fish') {\n const body: Record<string, unknown> = { text: prompt, ...rest };\n if (callbackUrl !== undefined) body.callback_url = callbackUrl;\n result = await this.transport.request('POST', '/fish/tts', {\n json: body,\n headers: model !== undefined ? { model } : undefined,\n });\n } else {\n const body: Record<string, unknown> = { prompt, ...rest };\n if (model !== undefined) body.model = model;\n if (tags !== undefined) body.tags = tags;\n if (callbackUrl !== undefined) body.callback_url = callbackUrl;\n result = await this.transport.request('POST', `/${provider}/audios`, { json: body });\n }\n const taskId = result.task_id as string | undefined;\n\n if (!taskId || (result.data && !shouldWait)) return result;\n\n const handle = new TaskHandle(taskId, `/${provider}/tasks`, this.transport);\n if (shouldWait) return handle.wait({ pollInterval, maxWait });\n return handle;\n }\n}\n","/** Video generation resources. */\n\nimport { Transport } from '../runtime/transport';\nimport { TaskHandle } from '../runtime/tasks';\n\nexport type VideoProvider = 'sora' | 'luma' | 'veo' | 'kling' | 'hailuo' | 'seedance' | 'wan' | 'pika' | 'pixverse' | (string & {});\n\nexport class Video {\n constructor(private transport: Transport) {}\n\n async generate(opts: {\n prompt: string;\n provider?: VideoProvider;\n model?: string;\n imageUrl?: string;\n callbackUrl?: string;\n async?: boolean;\n wait?: boolean;\n pollInterval?: number;\n maxWait?: number;\n [key: string]: unknown;\n }): Promise<Record<string, unknown> | TaskHandle> {\n const { prompt, provider = 'sora', model, imageUrl, callbackUrl, wait: shouldWait, pollInterval, maxWait, ...rest } = opts;\n const body: Record<string, unknown> = { prompt, ...rest };\n if (model !== undefined) body.model = model;\n if (imageUrl !== undefined) body.image_url = imageUrl;\n if (callbackUrl !== undefined) body.callback_url = callbackUrl;\n\n const result = await this.transport.request('POST', `/${provider}/videos`, { json: body });\n const taskId = result.task_id as string | undefined;\n\n if (!taskId || (result.data && !shouldWait)) return result;\n\n const handle = new TaskHandle(taskId, `/${provider}/tasks`, this.transport);\n if (shouldWait) return handle.wait({ pollInterval, maxWait });\n return handle;\n }\n}\n","/** Search resources. */\n\nimport { Transport } from '../runtime/transport';\n\nexport class Search {\n constructor(private transport: Transport) {}\n\n async google(opts: {\n query: string;\n type?: string;\n country?: string;\n language?: string;\n page?: number;\n [key: string]: unknown;\n }): Promise<Record<string, unknown>> {\n const { query, type = 'search', country, language, page, ...rest } = opts;\n const body: Record<string, unknown> = { query, type, ...rest };\n if (country !== undefined) body.country = country;\n if (language !== undefined) body.language = language;\n if (page !== undefined) body.page = page;\n return this.transport.request('POST', '/serp/google', { json: body });\n }\n}\n","/** Cross-service task retrieval. */\n\nimport { Transport } from '../runtime/transport';\nimport { TaskHandle } from '../runtime/tasks';\n\nconst SERVICE_TASK_ENDPOINTS: Record<string, string> = {\n suno: '/suno/tasks',\n producer: '/producer/tasks',\n fish: '/fish/tasks',\n 'nano-banana': '/nano-banana/tasks',\n seedream: '/seedream/tasks',\n seedance: '/seedance/tasks',\n sora: '/sora/tasks',\n luma: '/luma/tasks',\n veo: '/veo/tasks',\n flux: '/flux/tasks',\n kling: '/kling/tasks',\n hailuo: '/hailuo/tasks',\n wan: '/wan/tasks',\n pika: '/pika/tasks',\n pixverse: '/pixverse/tasks',\n webextrator: '/webextrator/tasks',\n};\n\nexport class Tasks {\n constructor(private transport: Transport) {}\n\n async get(taskId: string, opts: { service?: string } = {}): Promise<Record<string, unknown>> {\n const service = opts.service ?? 'suno';\n const endpoint = SERVICE_TASK_ENDPOINTS[service] ?? `/${service}/tasks`;\n return this.transport.request('POST', endpoint, {\n json: { id: taskId, action: 'retrieve' },\n });\n }\n\n async wait(\n taskId: string,\n opts: { service?: string; pollInterval?: number; maxWait?: number } = {}\n ): Promise<Record<string, unknown>> {\n const service = opts.service ?? 'suno';\n const endpoint = SERVICE_TASK_ENDPOINTS[service] ?? `/${service}/tasks`;\n const handle = new TaskHandle(taskId, endpoint, this.transport);\n return handle.wait({ pollInterval: opts.pollInterval, maxWait: opts.maxWait });\n }\n}\n","/** File upload resources. */\n\nimport { Transport } from '../runtime/transport';\nimport * as fs from 'fs';\nimport * as path from 'path';\n\nexport class Files {\n constructor(private transport: Transport) {}\n\n async upload(\n file: string | Buffer | Uint8Array,\n opts: { filename?: string } = {}\n ): Promise<Record<string, unknown>> {\n let data: Buffer | Uint8Array;\n let filename: string;\n\n if (typeof file === 'string') {\n data = fs.readFileSync(file);\n filename = opts.filename ?? path.basename(file);\n } else {\n data = file;\n filename = opts.filename ?? 'upload';\n }\n\n return this.transport.upload('/api/v1/files/', data, filename);\n }\n}\n","/** Management-plane resources. */\n\nimport { Transport } from '../runtime/transport';\n\nclass Applications {\n constructor(private transport: Transport) {}\n\n async list(params?: Record<string, string>): Promise<Record<string, unknown>> {\n return this.transport.request('GET', '/api/v1/applications/', { params, platform: true });\n }\n\n async create(opts: { serviceId: string; [key: string]: unknown }): Promise<Record<string, unknown>> {\n const { serviceId, ...rest } = opts;\n return this.transport.request('POST', '/api/v1/applications/', {\n json: { service_id: serviceId, ...rest },\n platform: true,\n });\n }\n\n async get(applicationId: string): Promise<Record<string, unknown>> {\n return this.transport.request('GET', `/api/v1/applications/${applicationId}/`, { platform: true });\n }\n}\n\nclass Credentials {\n constructor(private transport: Transport) {}\n\n async list(params?: Record<string, string>): Promise<Record<string, unknown>> {\n return this.transport.request('GET', '/api/v1/credentials/', { params, platform: true });\n }\n\n async create(opts: { applicationId: string; [key: string]: unknown }): Promise<Record<string, unknown>> {\n const { applicationId, ...rest } = opts;\n return this.transport.request('POST', '/api/v1/credentials/', {\n json: { application_id: applicationId, ...rest },\n platform: true,\n });\n }\n\n async rotate(credentialId: string): Promise<Record<string, unknown>> {\n return this.transport.request('POST', `/api/v1/credentials/${credentialId}/rotate/`, { platform: true });\n }\n\n async delete(credentialId: string): Promise<Record<string, unknown>> {\n return this.transport.request('DELETE', `/api/v1/credentials/${credentialId}/`, { platform: true });\n }\n}\n\nclass Models {\n constructor(private transport: Transport) {}\n\n async list(params?: Record<string, string>): Promise<Record<string, unknown>> {\n return this.transport.request('GET', '/api/v1/models/', { params, platform: true });\n }\n}\n\nclass Config {\n constructor(private transport: Transport) {}\n\n async get(): Promise<Record<string, unknown>> {\n return this.transport.request('GET', '/api/v1/config/', { platform: true });\n }\n}\n\nexport class Platform {\n readonly applications: Applications;\n readonly credentials: Credentials;\n readonly models: Models;\n readonly config: Config;\n\n constructor(transport: Transport) {\n this.applications = new Applications(transport);\n this.credentials = new Credentials(transport);\n this.models = new Models(transport);\n this.config = new Config(transport);\n }\n}\n","/** OpenAI-compatible facade resources. */\n\nimport { Transport } from '../runtime/transport';\n\nclass Completions {\n constructor(private transport: Transport) {}\n\n async create(opts: {\n model: string;\n messages: Array<Record<string, unknown>>;\n stream?: false;\n [key: string]: unknown;\n }): Promise<Record<string, unknown>>;\n async create(opts: {\n model: string;\n messages: Array<Record<string, unknown>>;\n stream: true;\n [key: string]: unknown;\n }): Promise<AsyncGenerator<Record<string, unknown>>>;\n async create(opts: {\n model: string;\n messages: Array<Record<string, unknown>>;\n stream?: boolean;\n [key: string]: unknown;\n }): Promise<Record<string, unknown> | AsyncGenerator<Record<string, unknown>>> {\n const { model, messages, stream, ...rest } = opts;\n const body: Record<string, unknown> = { model, messages, ...rest };\n\n if (stream) {\n body.stream = true;\n return this.streamResponse(body);\n }\n return this.transport.request('POST', '/openai/chat/completions', { json: body });\n }\n\n private async *streamResponse(body: Record<string, unknown>): AsyncGenerator<Record<string, unknown>> {\n for await (const chunk of this.transport.requestStream('POST', '/openai/chat/completions', { json: body })) {\n yield JSON.parse(chunk);\n }\n }\n}\n\nclass ChatNamespace {\n readonly completions: Completions;\n constructor(transport: Transport) {\n this.completions = new Completions(transport);\n }\n}\n\nclass Responses {\n constructor(private transport: Transport) {}\n\n async create(opts: {\n model: string;\n input: string | Array<Record<string, unknown>>;\n stream?: false;\n [key: string]: unknown;\n }): Promise<Record<string, unknown>>;\n async create(opts: {\n model: string;\n input: string | Array<Record<string, unknown>>;\n stream: true;\n [key: string]: unknown;\n }): Promise<AsyncGenerator<Record<string, unknown>>>;\n async create(opts: {\n model: string;\n input: string | Array<Record<string, unknown>>;\n stream?: boolean;\n [key: string]: unknown;\n }): Promise<Record<string, unknown> | AsyncGenerator<Record<string, unknown>>> {\n const { model, input, stream, ...rest } = opts;\n const body: Record<string, unknown> = { model, input, ...rest };\n\n if (stream) {\n body.stream = true;\n return this.streamResponse(body);\n }\n return this.transport.request('POST', '/openai/responses', { json: body });\n }\n\n private async *streamResponse(body: Record<string, unknown>): AsyncGenerator<Record<string, unknown>> {\n for await (const chunk of this.transport.requestStream('POST', '/openai/responses', { json: body })) {\n yield JSON.parse(chunk);\n }\n }\n}\n\nclass Images {\n constructor(private transport: Transport) {}\n\n async generate(opts: {\n prompt: string;\n model: string;\n background?: string;\n moderation?: string;\n n?: number;\n outputCompression?: number;\n outputFormat?: string;\n partialImages?: number;\n size?: string;\n quality?: string;\n responseFormat?: string;\n style?: string;\n callbackUrl?: string;\n async?: boolean;\n [key: string]: unknown;\n }): Promise<Record<string, unknown>> {\n const { prompt, model, outputCompression, outputFormat, partialImages, responseFormat, callbackUrl, ...rest } = opts;\n const body: Record<string, unknown> = { prompt, model, ...rest };\n if (outputCompression !== undefined) body.output_compression = outputCompression;\n if (outputFormat !== undefined) body.output_format = outputFormat;\n if (partialImages !== undefined) body.partial_images = partialImages;\n if (responseFormat !== undefined) body.response_format = responseFormat;\n if (callbackUrl !== undefined) body.callback_url = callbackUrl;\n return this.transport.request('POST', '/openai/images/generations', { json: body });\n }\n\n async edit(opts: {\n image: string | string[];\n prompt: string;\n model?: string;\n n?: number;\n background?: string;\n inputFidelity?: string;\n mask?: string;\n outputFormat?: string;\n outputCompression?: number;\n partialImages?: number;\n quality?: string;\n size?: string;\n responseFormat?: string;\n callbackUrl?: string;\n async?: boolean;\n [key: string]: unknown;\n }): Promise<Record<string, unknown>> {\n const { image, prompt, inputFidelity, mask, outputFormat, outputCompression, partialImages, responseFormat, callbackUrl, ...rest } = opts;\n const body: Record<string, unknown> = { image, prompt, ...rest };\n if (inputFidelity !== undefined) body.input_fidelity = inputFidelity;\n if (mask !== undefined) body.mask = mask;\n if (outputFormat !== undefined) body.output_format = outputFormat;\n if (outputCompression !== undefined) body.output_compression = outputCompression;\n if (partialImages !== undefined) body.partial_images = partialImages;\n if (responseFormat !== undefined) body.response_format = responseFormat;\n if (callbackUrl !== undefined) body.callback_url = callbackUrl;\n return this.transport.request('POST', '/openai/images/edits', { json: body });\n }\n}\n\nclass Embeddings {\n constructor(private transport: Transport) {}\n\n async create(opts: {\n model: string;\n input: string | string[];\n encodingFormat?: string;\n dimensions?: number;\n [key: string]: unknown;\n }): Promise<Record<string, unknown>> {\n const { model, input, encodingFormat, dimensions, ...rest } = opts;\n const body: Record<string, unknown> = { model, input, ...rest };\n if (encodingFormat !== undefined) body.encoding_format = encodingFormat;\n if (dimensions !== undefined) body.dimensions = dimensions;\n return this.transport.request('POST', '/openai/embeddings', { json: body });\n }\n}\n\nclass Tasks {\n constructor(private transport: Transport) {}\n\n async retrieve(opts: {\n id?: string;\n traceId?: string;\n [key: string]: unknown;\n }): Promise<Record<string, unknown>> {\n const { id, traceId, ...rest } = opts;\n const body: Record<string, unknown> = { action: 'retrieve', ...rest };\n if (id !== undefined) body.id = id;\n if (traceId !== undefined) body.trace_id = traceId;\n return this.transport.request('POST', '/openai/tasks', { json: body });\n }\n\n async retrieveBatch(opts: {\n ids?: string[];\n traceIds?: string[];\n applicationId?: string;\n userId?: string;\n type?: string;\n offset?: number;\n limit?: number;\n createdAtMin?: number;\n createdAtMax?: number;\n [key: string]: unknown;\n } = {}): Promise<Record<string, unknown>> {\n const { ids, traceIds, applicationId, userId, type, offset, limit, createdAtMin, createdAtMax, ...rest } = opts;\n const body: Record<string, unknown> = { action: 'retrieve_batch', ...rest };\n if (ids !== undefined) body.ids = ids;\n if (traceIds !== undefined) body.trace_ids = traceIds;\n if (applicationId !== undefined) body.application_id = applicationId;\n if (userId !== undefined) body.user_id = userId;\n if (type !== undefined) body.type = type;\n if (offset !== undefined) body.offset = offset;\n if (limit !== undefined) body.limit = limit;\n if (createdAtMin !== undefined) body.created_at_min = createdAtMin;\n if (createdAtMax !== undefined) body.created_at_max = createdAtMax;\n return this.transport.request('POST', '/openai/tasks', { json: body });\n }\n}\n\nexport class OpenAI {\n readonly chat: ChatNamespace;\n readonly responses: Responses;\n readonly images: Images;\n readonly embeddings: Embeddings;\n readonly tasks: Tasks;\n\n constructor(transport: Transport) {\n this.chat = new ChatNamespace(transport);\n this.responses = new Responses(transport);\n this.images = new Images(transport);\n this.embeddings = new Embeddings(transport);\n this.tasks = new Tasks(transport);\n }\n}\n","/** GLM chat completions resource. */\n\nimport { Transport } from '../runtime/transport';\n\nexport type GlmModel = 'glm-5.1' | 'glm-4.7' | 'glm-4.6' | 'glm-3-turbo' | (string & {});\n\nclass Completions {\n constructor(private transport: Transport) {}\n\n async create(opts: {\n model: GlmModel;\n messages: Array<Record<string, unknown>>;\n stream?: false;\n [key: string]: unknown;\n }): Promise<Record<string, unknown>>;\n async create(opts: {\n model: GlmModel;\n messages: Array<Record<string, unknown>>;\n stream: true;\n [key: string]: unknown;\n }): Promise<AsyncGenerator<Record<string, unknown>>>;\n async create(opts: {\n model: GlmModel;\n messages: Array<Record<string, unknown>>;\n stream?: boolean;\n [key: string]: unknown;\n }): Promise<Record<string, unknown> | AsyncGenerator<Record<string, unknown>>> {\n const { model, messages, stream, ...rest } = opts;\n const body: Record<string, unknown> = { model, messages, ...rest };\n\n if (stream) {\n body.stream = true;\n return this.streamResponse(body);\n }\n return this.transport.request('POST', '/glm/chat/completions', { json: body });\n }\n\n private async *streamResponse(body: Record<string, unknown>): AsyncGenerator<Record<string, unknown>> {\n for await (const chunk of this.transport.requestStream('POST', '/glm/chat/completions', { json: body })) {\n yield JSON.parse(chunk);\n }\n }\n}\n\nclass ChatNamespace {\n readonly completions: Completions;\n constructor(transport: Transport) {\n this.completions = new Completions(transport);\n }\n}\n\nexport class Glm {\n readonly chat: ChatNamespace;\n\n constructor(transport: Transport) {\n this.chat = new ChatNamespace(transport);\n }\n}\n","/** Veo-specific video generation and editing resources. */\n\nimport { Transport } from '../runtime/transport';\n\nexport type VeoModel = 'veo3' | 'veo3-fast' | 'veo31-fast' | 'veo31' | 'veo31-fast-ingredients' | (string & {});\n\nexport class Veo {\n constructor(private transport: Transport) {}\n\n async generate(opts: {\n action: 'text2video' | 'image2video' | 'ingredients2video' | 'get1080p';\n prompt?: string;\n model?: VeoModel;\n resolution?: '4k' | '1080p' | 'gif';\n videoId?: string;\n translation?: boolean;\n aspectRatio?: '16:9' | '9:16';\n imageUrls?: string[];\n callbackUrl?: string;\n async?: boolean;\n [key: string]: unknown;\n }): Promise<Record<string, unknown>> {\n const { action, prompt, model, resolution, videoId, translation, aspectRatio, imageUrls, callbackUrl, ...rest } = opts;\n const body: Record<string, unknown> = { action, ...rest };\n if (prompt !== undefined) body.prompt = prompt;\n if (model !== undefined) body.model = model;\n if (resolution !== undefined) body.resolution = resolution;\n if (videoId !== undefined) body.video_id = videoId;\n if (translation !== undefined) body.translation = translation;\n if (aspectRatio !== undefined) body.aspect_ratio = aspectRatio;\n if (imageUrls !== undefined) body.image_urls = imageUrls;\n if (callbackUrl !== undefined) body.callback_url = callbackUrl;\n return this.transport.request('POST', '/veo/videos', { json: body });\n }\n\n async upsample(opts: {\n videoId: string;\n action: '1080p' | '4k' | 'gif';\n callbackUrl?: string;\n async?: boolean;\n [key: string]: unknown;\n }): Promise<Record<string, unknown>> {\n const { videoId, action, callbackUrl, ...rest } = opts;\n const body: Record<string, unknown> = { video_id: videoId, action, ...rest };\n if (callbackUrl !== undefined) body.callback_url = callbackUrl;\n return this.transport.request('POST', '/veo/upsample', { json: body });\n }\n\n async extend(opts: {\n videoId: string;\n model: 'veo31-fast' | 'veo31' | (string & {});\n prompt?: string;\n callbackUrl?: string;\n async?: boolean;\n [key: string]: unknown;\n }): Promise<Record<string, unknown>> {\n const { videoId, model, prompt, callbackUrl, ...rest } = opts;\n const body: Record<string, unknown> = { video_id: videoId, model, ...rest };\n if (prompt !== undefined) body.prompt = prompt;\n if (callbackUrl !== undefined) body.callback_url = callbackUrl;\n return this.transport.request('POST', '/veo/extend', { json: body });\n }\n\n async reshoot(opts: {\n videoId: string;\n motionType: 'STATIONARY' | 'STATIONARY_UP' | 'STATIONARY_DOWN' | 'STATIONARY_LEFT' | 'STATIONARY_RIGHT' | 'STATIONARY_DOLLY_IN_ZOOM_OUT' | 'STATIONARY_DOLLY_OUT_ZOOM_IN' | 'UP' | 'DOWN' | 'LEFT_TO_RIGHT' | 'RIGHT_TO_LEFT' | 'FORWARD' | 'BACKWARD' | 'DOLLY_IN_ZOOM_OUT' | 'DOLLY_OUT_ZOOM_IN' | (string & {});\n callbackUrl?: string;\n async?: boolean;\n [key: string]: unknown;\n }): Promise<Record<string, unknown>> {\n const { videoId, motionType, callbackUrl, ...rest } = opts;\n const body: Record<string, unknown> = { video_id: videoId, motion_type: motionType, ...rest };\n if (callbackUrl !== undefined) body.callback_url = callbackUrl;\n return this.transport.request('POST', '/veo/reshoot', { json: body });\n }\n\n async objects(opts: {\n videoId: string;\n action: 'insert' | 'remove';\n prompt?: string;\n imageMask?: string;\n callbackUrl?: string;\n async?: boolean;\n [key: string]: unknown;\n }): Promise<Record<string, unknown>> {\n const { videoId, action, prompt, imageMask, callbackUrl, ...rest } = opts;\n const body: Record<string, unknown> = { video_id: videoId, action, ...rest };\n if (prompt !== undefined) body.prompt = prompt;\n if (imageMask !== undefined) body.image_mask = imageMask;\n if (callbackUrl !== undefined) body.callback_url = callbackUrl;\n return this.transport.request('POST', '/veo/objects', { json: body });\n }\n}\n","/** Kling-specific video generation resources. */\n\nimport { Transport } from '../runtime/transport';\n\nexport const KLING_MODELS = [\n 'kling-v1',\n 'kling-v1-6',\n 'kling-v2-master',\n 'kling-v2-1-master',\n 'kling-v2-5-turbo',\n 'kling-v2-6',\n 'kling-v3',\n 'kling-v3-omni',\n 'kling-o1',\n] as const;\n\nexport type KlingModel = (typeof KLING_MODELS)[number];\n\nexport interface KlingCameraControl {\n type: 'simple' | 'down_back' | 'forward_up' | 'left_turn_forward' | 'right_turn_forward';\n config?: {\n horizontal?: number;\n vertical?: number;\n pan?: number;\n tilt?: number;\n roll?: number;\n zoom?: number;\n };\n}\n\nexport interface KlingReferenceImage {\n imageUrl: string;\n type?: 'first_frame' | 'end_frame';\n}\n\nexport interface KlingReferenceVideo {\n videoUrl: string;\n referType?: 'base' | 'feature';\n keepOriginalSound?: 'yes' | 'no';\n}\n\nexport interface KlingGenerateOptions {\n action: 'text2video' | 'image2video' | 'extend';\n mode?: 'std' | 'pro' | '4k';\n model: KlingModel;\n prompt?: string;\n duration?: number;\n generateAudio?: boolean;\n videoId?: string;\n cfgScale?: number;\n aspectRatio?: '16:9' | '9:16' | '1:1';\n callbackUrl?: string;\n async?: boolean;\n timeout?: number;\n endImageUrl?: string;\n cameraControl?: KlingCameraControl;\n imageList?: KlingReferenceImage[];\n videoList?: KlingReferenceVideo[];\n negativePrompt?: string;\n startImageUrl?: string;\n}\n\nfunction isHttpUrl(value: string): boolean {\n try {\n const url = new URL(value);\n return url.protocol === 'http:' || url.protocol === 'https:';\n } catch {\n return false;\n }\n}\n\nfunction validateGenerateOptions(opts: KlingGenerateOptions): void {\n if (!KLING_MODELS.includes(opts.model)) {\n throw new Error(`model must be one of: ${KLING_MODELS.join(', ')}`);\n }\n const isV3 = opts.model === 'kling-v3' || opts.model === 'kling-v3-omni';\n const hasReferences = Boolean(opts.imageList?.length || opts.videoList?.length);\n\n if (opts.imageList !== undefined && opts.imageList.length === 0) {\n throw new Error('imageList must be non-empty or omitted');\n }\n if (opts.videoList !== undefined && opts.videoList.length === 0) {\n throw new Error('videoList must be non-empty or omitted');\n }\n\n if ((opts.action === 'text2video' || opts.action === 'image2video') && !opts.prompt) {\n throw new Error('prompt is required for text2video and image2video');\n }\n if (opts.action === 'image2video' && !opts.startImageUrl) {\n throw new Error('startImageUrl is required for image2video');\n }\n if (opts.action === 'extend' && !opts.videoId) {\n throw new Error('videoId is required for extend');\n }\n if (opts.endImageUrl && !opts.startImageUrl) {\n throw new Error('startImageUrl is required with endImageUrl');\n }\n if (opts.startImageUrl && !isHttpUrl(opts.startImageUrl)) {\n throw new Error('startImageUrl must be an HTTP URL');\n }\n if (opts.endImageUrl && !isHttpUrl(opts.endImageUrl)) {\n throw new Error('endImageUrl must be an HTTP URL');\n }\n if (opts.callbackUrl && !isHttpUrl(opts.callbackUrl)) {\n throw new Error('callbackUrl must be an HTTP URL');\n }\n if (opts.cfgScale !== undefined && (opts.cfgScale < 0 || opts.cfgScale > 1)) {\n throw new Error('cfgScale must be between 0 and 1');\n }\n if (opts.duration !== undefined && !Number.isInteger(opts.duration)) {\n throw new Error('duration must be an integer');\n }\n if (isV3 && opts.duration !== undefined && (opts.duration < 3 || opts.duration > 15)) {\n throw new Error('Kling V3 duration must be between 3 and 15 seconds');\n }\n if (!isV3 && opts.model !== 'kling-o1' && opts.duration !== undefined && ![5, 10].includes(opts.duration)) {\n throw new Error('This Kling model supports only 5- or 10-second generation');\n }\n if (opts.model === 'kling-o1' && opts.duration !== undefined && opts.duration !== 5) {\n throw new Error('kling-o1 supports only 5-second generation');\n }\n if (opts.model === 'kling-o1' && opts.mode !== undefined && !['std', 'pro'].includes(opts.mode)) {\n throw new Error('kling-o1 supports only std and pro modes');\n }\n if (opts.mode === '4k' && !isV3) {\n throw new Error('4k mode requires kling-v3 or kling-v3-omni');\n }\n if (opts.action === 'extend' && !['kling-v1', 'kling-v1-6', 'kling-v2-5-turbo'].includes(opts.model)) {\n throw new Error('extend requires kling-v1, kling-v1-6, or kling-v2-5-turbo');\n }\n if (opts.action === 'extend' && hasReferences) {\n throw new Error('imageList and videoList are not supported with extend');\n }\n if (hasReferences && opts.model !== 'kling-o1' && opts.model !== 'kling-v3-omni') {\n throw new Error('Omni references require kling-o1 or kling-v3-omni');\n }\n if (hasReferences && opts.mode === '4k') {\n throw new Error('4k cannot be combined with Omni references');\n }\n if ((opts.model === 'kling-o1' || hasReferences) && (opts.negativePrompt !== undefined || opts.cameraControl !== undefined || opts.cfgScale !== undefined)) {\n throw new Error('Kling O1 and Omni references do not support negativePrompt, cameraControl, or cfgScale');\n }\n if (opts.model === 'kling-o1' && opts.generateAudio) {\n throw new Error('kling-o1 does not support generateAudio');\n }\n if (opts.generateAudio && !isV3 && opts.model !== 'kling-v2-6') {\n throw new Error('generateAudio requires a V3 model or kling-v2-6 pro mode');\n }\n if (opts.generateAudio && opts.model === 'kling-v2-6' && opts.mode !== 'pro') {\n throw new Error('kling-v2-6 supports generateAudio only in pro mode');\n }\n if (opts.generateAudio && opts.videoList?.length) {\n throw new Error('generateAudio cannot be used with videoList');\n }\n if (opts.videoList && (opts.videoList.length === 0 || opts.videoList.length > 1)) {\n throw new Error('videoList must contain exactly one reference video');\n }\n\n for (const image of opts.imageList ?? []) {\n if (!isHttpUrl(image.imageUrl)) throw new Error('Every reference image requires an HTTP imageUrl');\n if (image.type !== undefined && !['first_frame', 'end_frame'].includes(image.type)) {\n throw new Error('Reference image type must be first_frame or end_frame');\n }\n }\n for (const video of opts.videoList ?? []) {\n if (!isHttpUrl(video.videoUrl)) throw new Error('Every reference video requires an HTTP videoUrl');\n if (video.referType !== undefined && !['base', 'feature'].includes(video.referType)) {\n throw new Error('Reference video referType must be base or feature');\n }\n if (video.keepOriginalSound !== undefined && !['yes', 'no'].includes(video.keepOriginalSound)) {\n throw new Error('Reference video keepOriginalSound must be yes or no');\n }\n }\n\n const firstFrames = Number(Boolean(opts.startImageUrl)) + (opts.imageList ?? []).filter((item) => item.type === 'first_frame').length;\n const endFrames = Number(Boolean(opts.endImageUrl)) + (opts.imageList ?? []).filter((item) => item.type === 'end_frame').length;\n if (firstFrames > 1 || endFrames > 1) {\n throw new Error('Only one first frame and one end frame are allowed');\n }\n if (endFrames > 0 && firstFrames === 0) {\n throw new Error('A first frame is required with an end frame');\n }\n if ((opts.videoList?.[0]?.referType ?? 'base') === 'base' && opts.videoList?.length && (firstFrames > 0 || endFrames > 0)) {\n throw new Error('A base reference video cannot be combined with first or end frames');\n }\n\n const imageCount = (opts.imageList?.length ?? 0) + Number(Boolean(opts.startImageUrl)) + Number(Boolean(opts.endImageUrl));\n const imageLimit = opts.videoList?.length ? 4 : 7;\n if (imageCount > imageLimit) {\n throw new Error(`Reference images cannot exceed ${imageLimit} for this request`);\n }\n}\n\nexport class Kling {\n constructor(private transport: Transport) {}\n\n async generate(opts: KlingGenerateOptions): Promise<Record<string, unknown>> {\n validateGenerateOptions(opts);\n const {\n action,\n mode,\n model,\n prompt,\n duration,\n generateAudio,\n videoId,\n cfgScale,\n aspectRatio,\n callbackUrl,\n async: asyncMode,\n timeout,\n endImageUrl,\n cameraControl,\n imageList,\n videoList,\n negativePrompt,\n startImageUrl,\n } = opts;\n const body: Record<string, unknown> = { action };\n if (mode !== undefined) body.mode = mode;\n if (model !== undefined) body.model = model;\n if (prompt !== undefined) body.prompt = prompt;\n if (duration !== undefined) body.duration = duration;\n if (generateAudio !== undefined) body.generate_audio = generateAudio;\n if (videoId !== undefined) body.video_id = videoId;\n if (cfgScale !== undefined) body.cfg_scale = cfgScale;\n if (aspectRatio !== undefined) body.aspect_ratio = aspectRatio;\n if (callbackUrl !== undefined) body.callback_url = callbackUrl;\n if (asyncMode !== undefined) body.async = asyncMode;\n if (timeout !== undefined) body.timeout = timeout;\n if (endImageUrl !== undefined) body.end_image_url = endImageUrl;\n if (cameraControl !== undefined) body.camera_control = cameraControl;\n if (imageList !== undefined) {\n body.image_list = imageList.map(({ imageUrl, type }) => ({ image_url: imageUrl, ...(type ? { type } : {}) }));\n }\n if (videoList !== undefined) {\n body.video_list = videoList.map(({ videoUrl, referType, keepOriginalSound }) => ({\n video_url: videoUrl,\n ...(referType ? { refer_type: referType } : {}),\n ...(keepOriginalSound ? { keep_original_sound: keepOriginalSound } : {}),\n }));\n }\n if (negativePrompt !== undefined) body.negative_prompt = negativePrompt;\n if (startImageUrl !== undefined) body.start_image_url = startImageUrl;\n return this.transport.request('POST', '/kling/videos', { json: body });\n }\n\n async motion(opts: {\n mode: 'std' | 'pro';\n imageUrl: string;\n videoUrl: string;\n characterOrientation: 'image' | 'video';\n keepOriginalSound?: 'yes' | 'no';\n prompt?: string;\n callbackUrl?: string;\n async?: boolean;\n }): Promise<Record<string, unknown>> {\n const { mode, imageUrl, videoUrl, characterOrientation, keepOriginalSound, prompt, callbackUrl } = opts;\n if (!['std', 'pro'].includes(mode)) throw new Error('mode must be std or pro');\n if (!isHttpUrl(imageUrl)) throw new Error('imageUrl must be an HTTP URL');\n if (!isHttpUrl(videoUrl)) throw new Error('videoUrl must be an HTTP URL');\n if (!['image', 'video'].includes(characterOrientation)) {\n throw new Error('characterOrientation must be image or video');\n }\n if (keepOriginalSound !== undefined && !['yes', 'no'].includes(keepOriginalSound)) {\n throw new Error('keepOriginalSound must be yes or no');\n }\n if (callbackUrl && !isHttpUrl(callbackUrl)) throw new Error('callbackUrl must be an HTTP URL');\n const body: Record<string, unknown> = {\n mode,\n image_url: imageUrl,\n video_url: videoUrl,\n character_orientation: characterOrientation,\n };\n if (keepOriginalSound !== undefined) body.keep_original_sound = keepOriginalSound;\n if (prompt !== undefined) body.prompt = prompt;\n if (callbackUrl !== undefined) body.callback_url = callbackUrl;\n if (opts.async !== undefined) body.async = opts.async;\n return this.transport.request('POST', '/kling/motion', { json: body });\n }\n}\n","/** WebExtrator web render & extract resources. */\n\nimport { Transport } from '../runtime/transport';\n\nexport class WebExtrator {\n constructor(private transport: Transport) {}\n\n async extract(opts: {\n url: string;\n expectedType?: 'product' | 'article' | 'general';\n enableLlm?: boolean;\n waitUntil?: 'load' | 'domcontentloaded' | 'networkidle' | 'commit';\n timeout?: number;\n delay?: number;\n waitForSelector?: string;\n blockResources?: string[];\n headers?: Record<string, string>;\n userAgent?: string;\n callbackUrl?: string;\n async?: boolean;\n [key: string]: unknown;\n }): Promise<Record<string, unknown>> {\n const { url, expectedType, enableLlm, waitUntil, timeout, delay, waitForSelector, blockResources, headers, userAgent, callbackUrl, ...rest } = opts;\n const body: Record<string, unknown> = { url, ...rest };\n if (expectedType !== undefined) body.expected_type = expectedType;\n if (enableLlm !== undefined) body.enable_llm = enableLlm;\n if (waitUntil !== undefined) body.wait_until = waitUntil;\n if (timeout !== undefined) body.timeout = timeout;\n if (delay !== undefined) body.delay = delay;\n if (waitForSelector !== undefined) body.wait_for_selector = waitForSelector;\n if (blockResources !== undefined) body.block_resources = blockResources;\n if (headers !== undefined) body.headers = headers;\n if (userAgent !== undefined) body.user_agent = userAgent;\n if (callbackUrl !== undefined) body.callback_url = callbackUrl;\n return this.transport.request('POST', '/webextrator/extract', { json: body });\n }\n\n async render(opts: {\n url: string;\n waitUntil?: 'load' | 'domcontentloaded' | 'networkidle' | 'commit';\n timeout?: number;\n delay?: number;\n waitForSelector?: string;\n blockResources?: string[];\n headers?: Record<string, string>;\n userAgent?: string;\n callbackUrl?: string;\n async?: boolean;\n [key: string]: unknown;\n }): Promise<Record<string, unknown>> {\n const { url, waitUntil, timeout, delay, waitForSelector, blockResources, headers, userAgent, callbackUrl, ...rest } = opts;\n const body: Record<string, unknown> = { url, ...rest };\n if (waitUntil !== undefined) body.wait_until = waitUntil;\n if (timeout !== undefined) body.timeout = timeout;\n if (delay !== undefined) body.delay = delay;\n if (waitForSelector !== undefined) body.wait_for_selector = waitForSelector;\n if (blockResources !== undefined) body.block_resources = blockResources;\n if (headers !== undefined) body.headers = headers;\n if (userAgent !== undefined) body.user_agent = userAgent;\n if (callbackUrl !== undefined) body.callback_url = callbackUrl;\n return this.transport.request('POST', '/webextrator/render', { json: body });\n }\n}\n","/** Face transformation resources (`/face/*`). */\n\nimport { Transport } from '../runtime/transport';\n\nexport class Face {\n constructor(private transport: Transport) {}\n\n private call(action: string, body: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.transport.request('POST', `/face/${action}`, { json: body });\n }\n\n analyze(opts: { imageUrl: string; [key: string]: unknown }): Promise<Record<string, unknown>> {\n const { imageUrl, ...rest } = opts;\n return this.call('analyze', { image_url: imageUrl, ...rest });\n }\n\n beautify(opts: { imageUrl: string; [key: string]: unknown }): Promise<Record<string, unknown>> {\n const { imageUrl, ...rest } = opts;\n return this.call('beautify', { image_url: imageUrl, ...rest });\n }\n\n changeAge(opts: { imageUrl: string; [key: string]: unknown }): Promise<Record<string, unknown>> {\n const { imageUrl, ...rest } = opts;\n return this.call('change-age', { image_url: imageUrl, ...rest });\n }\n\n changeGender(opts: { imageUrl: string; [key: string]: unknown }): Promise<Record<string, unknown>> {\n const { imageUrl, ...rest } = opts;\n return this.call('change-gender', { image_url: imageUrl, ...rest });\n }\n\n detectLive(opts: { imageUrl: string; [key: string]: unknown }): Promise<Record<string, unknown>> {\n const { imageUrl, ...rest } = opts;\n return this.call('detect-live', { image_url: imageUrl, ...rest });\n }\n\n swap(opts: { sourceImageUrl: string; targetImageUrl: string; [key: string]: unknown }): Promise<Record<string, unknown>> {\n const { sourceImageUrl, targetImageUrl, ...rest } = opts;\n return this.call('swap', { source_image_url: sourceImageUrl, target_image_url: targetImageUrl, ...rest });\n }\n\n cartoon(opts: { imageUrl: string; [key: string]: unknown }): Promise<Record<string, unknown>> {\n const { imageUrl, ...rest } = opts;\n return this.call('cartoon', { image_url: imageUrl, ...rest });\n }\n}\n","/** Short URL resource (`/shorturl`). */\n\nimport { Transport } from '../runtime/transport';\n\nexport class ShortUrl {\n constructor(private transport: Transport) {}\n\n async create(opts: { url: string; slug?: string; [key: string]: unknown }): Promise<Record<string, unknown>> {\n const { url, slug, ...rest } = opts;\n const body: Record<string, unknown> = { url, ...rest };\n if (slug !== undefined) body.slug = slug;\n return this.transport.request('POST', '/shorturl', { json: body });\n }\n}\n","/**\n * Digitalhuman (digitalhuman) — generated from the platform OpenAPI spec.\n *\n * Do not edit by hand: run `python scripts/generate_providers.py`. Parameter\n * names, types, enums and required-ness all come from the live spec.\n */\n\nimport { Transport } from '../../runtime/transport';\nimport { TaskHandle } from '../../runtime/tasks';\n\n\nfunction taskId(result: Record<string, unknown>): string {\n if (typeof result?.task_id === 'string') return result.task_id;\n const data = result?.data as Record<string, unknown> | undefined;\n if (data && typeof data.task_id === 'string') return data.task_id;\n return typeof result?.id === 'string' ? result.id : '';\n}\n\nexport interface DigitalhumanGenerateOptions {\n /** Public URL of the source face video (preferred). One of video_url/image_url required. */\n videoUrl: string;\n /** Spoken text -> TTS (requires voice_id). */\n text?: string;\n /** Audio tempo multiplier. */\n speed?: number;\n /** Diffusion steps (LatentSync). */\n steps?: number;\n /** latentsync = quality (default); heygem = fast tier. */\n engine?: \"latentsync\" | \"heygem\";\n /** Lip-sync strength (LatentSync). Lower loosens sync. */\n guidance?: number;\n /** Apply the mouth-seam reduction blend. */\n seamFix?: boolean;\n /** A cloned voice from POST /digital-human/voices. */\n voiceId?: string;\n /** Public URL of the driving audio (.wav/.mp3/.m4a). OR supply text(+voice_id). */\n audioUrl?: string;\n /** Public URL of a source face photo (photo-driven path). */\n imageUrl?: string;\n resolution?: \"720p\" | \"540p\";\n /** Submit asynchronously and poll. Defaults to true. */\n async?: boolean;\n /** Wait for completion before returning the handle. */\n wait?: boolean;\n pollInterval?: number;\n maxWait?: number;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\nexport interface DigitalhumanVoicesOptions {\n /** Public URL of a clean 10-20s voice sample. */\n audioUrl: string;\n lang?: \"zh\" | \"en\";\n /** Optional label. */\n name?: string;\n /** Submit asynchronously and poll. Defaults to true. */\n async?: boolean;\n /** Wait for completion before returning the handle. */\n wait?: boolean;\n pollInterval?: number;\n maxWait?: number;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\n/** digitalhuman client. */\nexport class Digitalhuman {\n constructor(private transport: Transport) {}\n\n /** Digital Human video generation API — turn a portrait plus audio or text into a talking-head video. */\n async generate(options: DigitalhumanGenerateOptions): Promise<TaskHandle> {\n const body: Record<string, unknown> = {};\n body[\"video_url\"] = options.videoUrl;\n body[\"text\"] = options.text ?? \"\\u5927\\u5bb6\\u597d\\uff0c\\u8fd9\\u662f\\u79bb\\u7ebf\\u751f\\u6210\\u7684\\u6570\\u5b57\\u4eba\\u3002\";\n body[\"speed\"] = options.speed ?? 1.0;\n body[\"steps\"] = options.steps ?? 40;\n body[\"engine\"] = options.engine ?? \"latentsync\";\n body[\"guidance\"] = options.guidance ?? 2.0;\n body[\"seam_fix\"] = options.seamFix ?? true;\n if (options.voiceId !== undefined) body[\"voice_id\"] = options.voiceId;\n if (options.audioUrl !== undefined) body[\"audio_url\"] = options.audioUrl;\n if (options.imageUrl !== undefined) body[\"image_url\"] = options.imageUrl;\n body[\"resolution\"] = options.resolution ?? \"720p\";\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"audioUrl\", \"callbackUrl\", \"engine\", \"guidance\", \"imageUrl\", \"maxWait\", \"pollInterval\", \"resolution\", \"seamFix\", \"speed\", \"steps\", \"text\", \"videoUrl\", \"voiceId\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n body.async = options.async ?? true;\n const result = (await this.transport.request('POST', \"/digital-human/videos\", { json: body })) as Record<string, unknown>;\n const handle = new TaskHandle(taskId(result), \"/digital-human/tasks\", this.transport, result);\n if (options.wait) {\n await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });\n }\n return handle;\n }\n\n /** Digital Human voice-clone API — upload an audio sample to clone a custom voice for speech synthesis. */\n async voices(options: DigitalhumanVoicesOptions): Promise<TaskHandle> {\n const body: Record<string, unknown> = {};\n body[\"audio_url\"] = options.audioUrl;\n body[\"lang\"] = options.lang ?? \"zh\";\n if (options.name !== undefined) body[\"name\"] = options.name;\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"audioUrl\", \"callbackUrl\", \"lang\", \"maxWait\", \"name\", \"pollInterval\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n body.async = options.async ?? true;\n const result = (await this.transport.request('POST', \"/digital-human/voices\", { json: body })) as Record<string, unknown>;\n const handle = new TaskHandle(taskId(result), \"/digital-human/tasks\", this.transport, result);\n if (options.wait) {\n await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });\n }\n return handle;\n }\n\n}\n","/**\n * Dreamina (dreamina) — generated from the platform OpenAPI spec.\n *\n * Do not edit by hand: run `python scripts/generate_providers.py`. Parameter\n * names, types, enums and required-ness all come from the live spec.\n */\n\nimport { Transport } from '../../runtime/transport';\nimport { TaskHandle } from '../../runtime/tasks';\n\n\nfunction taskId(result: Record<string, unknown>): string {\n if (typeof result?.task_id === 'string') return result.task_id;\n const data = result?.data as Record<string, unknown> | undefined;\n if (data && typeof data.task_id === 'string') return data.task_id;\n return typeof result?.id === 'string' ? result.id : '';\n}\n\nexport interface DreaminaGenerateOptions {\n /** Public URL for audio (mp3/wav). The character will lip-sync to it, and it is recommended that the duration be controlled within 60 seconds. */\n audioUrl: string;\n /** Public URL of portrait images. Clear frontal face effects are best. */\n imageUrl: string;\n /** The model being used is OmniHuman 1.5. */\n model?: \"omnihuman-1.5\";\n /** Optional text prompts for guiding expressions, emotions, stability, and style. */\n prompt?: string;\n /** Optional subject mask URL (from object detection) to specify and drive a particular person in a multi-person image. */\n maskUrl?: string[];\n /** Submit asynchronously and poll. Defaults to true. */\n async?: boolean;\n /** Wait for completion before returning the handle. */\n wait?: boolean;\n pollInterval?: number;\n maxWait?: number;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\n/** dreamina client. */\nexport class Dreamina {\n constructor(private transport: Transport) {}\n\n /** Audio-driven talking-photo digital human video generation (OmniHuman 1.5) */\n async generate(options: DreaminaGenerateOptions): Promise<TaskHandle> {\n const body: Record<string, unknown> = {};\n body[\"audio_url\"] = options.audioUrl;\n body[\"image_url\"] = options.imageUrl;\n body[\"model\"] = options.model ?? \"omnihuman-1.5\";\n if (options.prompt !== undefined) body[\"prompt\"] = options.prompt;\n if (options.maskUrl !== undefined) body[\"mask_url\"] = options.maskUrl;\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"audioUrl\", \"callbackUrl\", \"imageUrl\", \"maskUrl\", \"maxWait\", \"model\", \"pollInterval\", \"prompt\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n body.async = options.async ?? true;\n const result = (await this.transport.request('POST', \"/dreamina/videos\", { json: body })) as Record<string, unknown>;\n const handle = new TaskHandle(taskId(result), \"/dreamina/tasks\", this.transport, result);\n if (options.wait) {\n await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });\n }\n return handle;\n }\n\n}\n","/**\n * Fish (fish) — generated from the platform OpenAPI spec.\n *\n * Do not edit by hand: run `python scripts/generate_providers.py`. Parameter\n * names, types, enums and required-ness all come from the live spec.\n */\n\nimport { Transport } from '../../runtime/transport';\nimport { TaskHandle } from '../../runtime/tasks';\n\n\nfunction taskId(result: Record<string, unknown>): string {\n if (typeof result?.task_id === 'string') return result.task_id;\n const data = result?.data as Record<string, unknown> | undefined;\n if (data && typeof data.task_id === 'string') return data.task_id;\n return typeof result?.id === 'string' ? result.id : '';\n}\n\nexport interface FishGenerateOptions {\n /** Text content to be synthesized. Required, must be a non-empty string. */\n text: string;\n /** Top-p nucleus sampling parameter, controls output diversity. */\n topP?: number;\n /** Output audio format, default is `mp3`. */\n format?: \"mp3\" | \"wav\" | \"pcm\" | \"opus\";\n /** Delay mode. The upstream rejects null values, and defaults to `normal` when omitted. */\n latency?: \"normal\" | \"balanced\";\n /** Rhythm coverage parameters, forwarded as is to upstream (such as speech rate, volume, etc.). */\n prosody?: Record<string, unknown>;\n /** Is the input text subjected to text normalization processing by the upstream? */\n normalize?: boolean;\n /** Inline reference audio samples will be forwarded upstream as is, for zero-shot voice cloning. */\n references?: unknown[];\n /** MP3 bitrate when `format=mp3`. */\n mp3Bitrate?: number;\n /** Output the audio sampling rate (e.g., 16000, 22050, 44100). */\n sampleRate?: number;\n /** Sampling temperature (0.0–1.0). The higher the value, the more diverse the output; the lower the value, the more stable and consistent it is. */\n temperature?: number;\n /** The chunk length passed to the upstream synthesizer. */\n chunkLength?: number;\n /** Opus bitrate when `format=opus`. */\n opusBitrate?: number;\n /** Voice model ID (single speaker). A string array can also be passed in multi-speaker scenarios. */\n referenceId?: string;\n /** Maximum number of new tokens generated. */\n maxNewTokens?: number;\n /** Minimum block length. */\n minChunkLength?: number;\n /** The repetition penalty coefficient applied during the generation process. */\n repetitionPenalty?: number;\n /** Submit asynchronously and poll. Defaults to true. */\n async?: boolean;\n /** Wait for completion before returning the handle. */\n wait?: boolean;\n pollInterval?: number;\n maxWait?: number;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\nexport interface FishModelOptions {\n /** Name of the voice model. */\n title: string;\n /** The HTTP(S) URL of the audio file for cloning must be a single URL string. This interface does not support multipart/binary file uploads. */\n voices: string;\n /** Tags used for retrieval in public repositories (optional). */\n tags?: string[];\n /** Reference text corresponding to the audio sample (optional). */\n texts?: string[];\n /** The visibility of the model is set to `private` by default. */\n visibility?: \"public\" | \"private\";\n /** HTTP(S) URL of the voice model cover image (optional). */\n coverImage?: string;\n /** Description of the voice model (optional). */\n description?: string;\n /** If it is `true`, the upstream service will generate a sample voice after the training is completed. */\n generateSample?: boolean;\n /** If it is `true`, the upstream service will perform quality enhancement processing on the audio samples before training. */\n enhanceAudioQuality?: boolean;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\n/** fish client. */\nexport class Fish {\n constructor(private transport: Transport) {}\n\n /** Fish Audio text-to-speech API — convert text into natural speech using a chosen voice model. */\n async generate(options: FishGenerateOptions): Promise<TaskHandle> {\n const body: Record<string, unknown> = {};\n body[\"text\"] = options.text;\n if (options.topP !== undefined) body[\"top_p\"] = options.topP;\n if (options.format !== undefined) body[\"format\"] = options.format;\n if (options.latency !== undefined) body[\"latency\"] = options.latency;\n if (options.prosody !== undefined) body[\"prosody\"] = options.prosody;\n if (options.normalize !== undefined) body[\"normalize\"] = options.normalize;\n if (options.references !== undefined) body[\"references\"] = options.references;\n if (options.mp3Bitrate !== undefined) body[\"mp3_bitrate\"] = options.mp3Bitrate;\n if (options.sampleRate !== undefined) body[\"sample_rate\"] = options.sampleRate;\n if (options.temperature !== undefined) body[\"temperature\"] = options.temperature;\n if (options.chunkLength !== undefined) body[\"chunk_length\"] = options.chunkLength;\n if (options.opusBitrate !== undefined) body[\"opus_bitrate\"] = options.opusBitrate;\n body[\"reference_id\"] = options.referenceId ?? \"d7900c21663f485ab63ebdb7e5905036\";\n if (options.maxNewTokens !== undefined) body[\"max_new_tokens\"] = options.maxNewTokens;\n if (options.minChunkLength !== undefined) body[\"min_chunk_length\"] = options.minChunkLength;\n if (options.repetitionPenalty !== undefined) body[\"repetition_penalty\"] = options.repetitionPenalty;\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"callbackUrl\", \"chunkLength\", \"format\", \"latency\", \"maxNewTokens\", \"maxWait\", \"minChunkLength\", \"mp3Bitrate\", \"normalize\", \"opusBitrate\", \"pollInterval\", \"prosody\", \"referenceId\", \"references\", \"repetitionPenalty\", \"sampleRate\", \"temperature\", \"text\", \"topP\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n body.async = options.async ?? true;\n const result = (await this.transport.request('POST', \"/fish/tts\", { json: body })) as Record<string, unknown>;\n const handle = new TaskHandle(taskId(result), \"/fish/tasks\", this.transport, result);\n if (options.wait) {\n await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });\n }\n return handle;\n }\n\n /** Fish Audio model creation API — upload reference audio to create a custom voice-clone model. */\n async model(options: FishModelOptions): Promise<Record<string, unknown>> {\n const body: Record<string, unknown> = {};\n body[\"title\"] = options.title;\n body[\"voices\"] = options.voices;\n if (options.tags !== undefined) body[\"tags\"] = options.tags;\n if (options.texts !== undefined) body[\"texts\"] = options.texts;\n if (options.visibility !== undefined) body[\"visibility\"] = options.visibility;\n if (options.coverImage !== undefined) body[\"cover_image\"] = options.coverImage;\n if (options.description !== undefined) body[\"description\"] = options.description;\n if (options.generateSample !== undefined) body[\"generate_sample\"] = options.generateSample;\n if (options.enhanceAudioQuality !== undefined) body[\"enhance_audio_quality\"] = options.enhanceAudioQuality;\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"callbackUrl\", \"coverImage\", \"description\", \"enhanceAudioQuality\", \"generateSample\", \"maxWait\", \"pollInterval\", \"tags\", \"texts\", \"title\", \"visibility\", \"voices\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n return (await this.transport.request('POST', \"/fish/model\", { json: body })) as Record<string, unknown>;\n }\n\n}\n","/**\n * Flux (flux) — generated from the platform OpenAPI spec.\n *\n * Do not edit by hand: run `python scripts/generate_providers.py`. Parameter\n * names, types, enums and required-ness all come from the live spec.\n */\n\nimport { Transport } from '../../runtime/transport';\nimport { TaskHandle } from '../../runtime/tasks';\n\n\nfunction taskId(result: Record<string, unknown>): string {\n if (typeof result?.task_id === 'string') return result.task_id;\n const data = result?.data as Record<string, unknown> | undefined;\n if (data && typeof data.task_id === 'string') return data.task_id;\n return typeof result?.id === 'string' ? result.id : '';\n}\n\nexport interface FluxGenerateOptions {\n /** Types of operations for generating images. If it is `generate`, a new image will be created based on the prompt; if it is `edit`, the original image will be edited according to the prompt and `image_url`. */\n action: \"generate\" | \"edit\";\n /** Prompts for generating images. */\n prompt: string;\n /** Image size specifications. */\n size?: string;\n /** Number of generated images. */\n count?: number;\n /** Model used for generating images. */\n model?: \"flux-dev\" | \"flux-pro\" | \"flux-kontext-pro\" | \"flux-kontext-max\" | \"flux-2-flex\" | \"flux-2-pro\" | \"flux-2-max\" | \"flux-2-klein\";\n /** Link to the original image that needs editing. */\n imageUrl?: string;\n /** Submit asynchronously and poll. Defaults to true. */\n async?: boolean;\n /** Wait for completion before returning the handle. */\n wait?: boolean;\n pollInterval?: number;\n maxWait?: number;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\n/** flux client. */\nexport class Flux {\n constructor(private transport: Transport) {}\n\n /** Flux AI image generation API, generates 1 image per request. */\n async generate(options: FluxGenerateOptions): Promise<TaskHandle> {\n const body: Record<string, unknown> = {};\n body[\"action\"] = options.action;\n body[\"prompt\"] = options.prompt;\n body[\"size\"] = options.size ?? \"1024x1024\";\n if (options.count !== undefined) body[\"count\"] = options.count;\n if (options.model !== undefined) body[\"model\"] = options.model;\n if (options.imageUrl !== undefined) body[\"image_url\"] = options.imageUrl;\n for (const [key, value] of Object.entries(options)) {\n if (![\"action\", \"async\", \"callbackUrl\", \"count\", \"imageUrl\", \"maxWait\", \"model\", \"pollInterval\", \"prompt\", \"size\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n body.async = options.async ?? true;\n const result = (await this.transport.request('POST', \"/flux/images\", { json: body })) as Record<string, unknown>;\n const handle = new TaskHandle(taskId(result), \"/flux/tasks\", this.transport, result);\n if (options.wait) {\n await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });\n }\n return handle;\n }\n\n}\n","/**\n * Hailuo (hailuo) — generated from the platform OpenAPI spec.\n *\n * Do not edit by hand: run `python scripts/generate_providers.py`. Parameter\n * names, types, enums and required-ness all come from the live spec.\n */\n\nimport { Transport } from '../../runtime/transport';\nimport { TaskHandle } from '../../runtime/tasks';\n\n\nfunction taskId(result: Record<string, unknown>): string {\n if (typeof result?.task_id === 'string') return result.task_id;\n const data = result?.data as Record<string, unknown> | undefined;\n if (data && typeof data.task_id === 'string') return data.task_id;\n return typeof result?.id === 'string' ? result.id : '';\n}\n\nexport interface HailuoGenerateOptions {\n /** The operation type for video generation. When set to `generate`, it will generate a video based on the prompt. */\n action: \"generate\";\n /** The model used for generating videos has a default value of `minimax-t2v`. */\n model?: \"minimax-i2v\" | \"minimax-t2v\" | \"minimax-i2v-director\";\n /** Prompts for generating videos. */\n prompt?: string;\n /** You can specify the URL of the first frame image to generate a video from the image. */\n firstImageUrl?: string;\n /** Submit asynchronously and poll. Defaults to true. */\n async?: boolean;\n /** Wait for completion before returning the handle. */\n wait?: boolean;\n pollInterval?: number;\n maxWait?: number;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\n/** hailuo client. */\nexport class Hailuo {\n constructor(private transport: Transport) {}\n\n /** Minimax Hailuo AI video generation API. Supports minimax-t2v for text-to-video, minimax-i2v for image-to-video, and minimax-i2v-director for director mode with camera/movement instructions. */\n async generate(options: HailuoGenerateOptions): Promise<TaskHandle> {\n const body: Record<string, unknown> = {};\n body[\"action\"] = options.action;\n if (options.model !== undefined) body[\"model\"] = options.model;\n body[\"prompt\"] = options.prompt ?? \"\\u706b\\u6c14\";\n if (options.firstImageUrl !== undefined) body[\"first_image_url\"] = options.firstImageUrl;\n for (const [key, value] of Object.entries(options)) {\n if (![\"action\", \"async\", \"callbackUrl\", \"firstImageUrl\", \"maxWait\", \"model\", \"pollInterval\", \"prompt\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n body.async = options.async ?? true;\n const result = (await this.transport.request('POST', \"/hailuo/videos\", { json: body })) as Record<string, unknown>;\n const handle = new TaskHandle(taskId(result), \"/hailuo/tasks\", this.transport, result);\n if (options.wait) {\n await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });\n }\n return handle;\n }\n\n}\n","/**\n * Happyhorse (happyhorse) — generated from the platform OpenAPI spec.\n *\n * Do not edit by hand: run `python scripts/generate_providers.py`. Parameter\n * names, types, enums and required-ness all come from the live spec.\n */\n\nimport { Transport } from '../../runtime/transport';\nimport { TaskHandle } from '../../runtime/tasks';\n\n\nfunction taskId(result: Record<string, unknown>): string {\n if (typeof result?.task_id === 'string') return result.task_id;\n const data = result?.data as Record<string, unknown> | undefined;\n if (data && typeof data.task_id === 'string') return data.task_id;\n return typeof result?.id === 'string' ? result.id : '';\n}\n\nexport interface HappyhorseGenerateOptions {\n /** Random seed, range 0–2147483647. */\n seed?: number;\n /** HappyHorse model name. Different actions only support the corresponding model family. */\n model?: \"happyhorse-1.0-t2v\" | \"happyhorse-1.1-t2v\" | \"happyhorse-1.0-i2v\" | \"happyhorse-1.1-i2v\" | \"happyhorse-1.0-r2v\" | \"happyhorse-1.1-r2v\" | \"happyhorse-1.0-video-edit\";\n /** Output video aspect ratio. Text-to-video and reference image-to-video support this parameter; the first frame image-to-video will follow the aspect ratio of the first frame image. */\n ratio?: \"16:9\" | \"9:16\" | \"1:1\" | \"4:3\" | \"3:4\";\n /** Operation types. `generate` is for generating video from text, `image_to_video` is for generating video from the first frame image, `reference_to_video` is for generating video from reference images, and `video_edit` is for video editing based on video and reference images. */\n action?: \"generate\" | \"image_to_video\" | \"reference_to_video\" | \"video_edit\";\n /** Text prompt words. Text-to-video, reference image to video, and video editing scenarios are required. */\n prompt?: string;\n /** Output video duration (seconds), value range 3–15. The output duration of `video_edit` is determined by the input video. */\n duration?: number;\n /** The input image URL for the first frame of the video. Only used by `image_to_video`. */\n imageUrl?: string;\n /** URL of the video to be edited. For `video_edit` use only. */\n videoUrl?: string;\n /** Whether to add the HappyHorse watermark. Default is off. */\n watermark?: boolean;\n /** Reference image URL array. `reference_to_video` supports 1–9 images, `video_edit` supports 0–5 images. */\n imageUrls?: string[];\n /** Output video resolution, optional 720P or 1080P. */\n resolution?: \"720P\" | \"1080P\";\n /** Audio strategy for video editing. `auto` is determined by the model, `origin` retains the original audio of the input video. */\n audioSetting?: \"auto\" | \"origin\";\n /** Submit asynchronously and poll. Defaults to true. */\n async?: boolean;\n /** Wait for completion before returning the handle. */\n wait?: boolean;\n pollInterval?: number;\n maxWait?: number;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\n/** happyhorse client. */\nexport class Happyhorse {\n constructor(private transport: Transport) {}\n\n /** Call /happyhorse/videos. */\n async generate(options: HappyhorseGenerateOptions = {}): Promise<TaskHandle> {\n const body: Record<string, unknown> = {};\n if (options.seed !== undefined) body[\"seed\"] = options.seed;\n body[\"model\"] = options.model ?? \"happyhorse-1.1-t2v\";\n body[\"ratio\"] = options.ratio ?? \"16:9\";\n body[\"action\"] = options.action ?? \"generate\";\n body[\"prompt\"] = options.prompt ?? \"A cinematic white horse lifts its head, the mane moves gently in the sunrise wind, slow camera push in, warm film lighting\";\n body[\"duration\"] = options.duration ?? 5;\n body[\"image_url\"] = options.imageUrl ?? \"https://cdn.acedata.cloud/b1c82e4937.png\";\n body[\"video_url\"] = options.videoUrl ?? \"https://platform2.cdn.acedata.cloud/happyhorse/27837f92-d1c1-4db4-ad9a-4e6e81d9f6c1.mp4\";\n body[\"watermark\"] = options.watermark ?? false;\n if (options.imageUrls !== undefined) body[\"image_urls\"] = options.imageUrls;\n body[\"resolution\"] = options.resolution ?? \"1080P\";\n body[\"audio_setting\"] = options.audioSetting ?? \"auto\";\n for (const [key, value] of Object.entries(options)) {\n if (![\"action\", \"async\", \"audioSetting\", \"callbackUrl\", \"duration\", \"imageUrl\", \"imageUrls\", \"maxWait\", \"model\", \"pollInterval\", \"prompt\", \"ratio\", \"resolution\", \"seed\", \"videoUrl\", \"wait\", \"watermark\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n body.async = options.async ?? true;\n const result = (await this.transport.request('POST', \"/happyhorse/videos\", { json: body })) as Record<string, unknown>;\n const handle = new TaskHandle(taskId(result), \"/happyhorse/tasks\", this.transport, result);\n if (options.wait) {\n await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });\n }\n return handle;\n }\n\n}\n","/**\n * Localization (localization) — generated from the platform OpenAPI spec.\n *\n * Do not edit by hand: run `python scripts/generate_providers.py`. Parameter\n * names, types, enums and required-ness all come from the live spec.\n */\n\nimport { Transport } from '../../runtime/transport';\n\n\nexport interface LocalizationTranslateOptions {\n /** Please provide the content that needs to be translated. */\n input: Record<string, unknown>;\n /** The target language area to be translated to. */\n locale: \"en\" | \"de\" | \"pt\" | \"es\" | \"fr\" | \"zh-CN\" | \"zh-TW\" | \"it\" | \"ko\" | \"ja\" | \"ru\" | \"pl\" | \"fi\" | \"sv\" | \"el\" | \"uk\" | \"ar\" | \"sr\";\n /** The file type of the input text (such as `json` or `md`). */\n extension: \"json\" | \"md\";\n /** The large language model used for translation is `gpt-3.5` by default. */\n model?: \"gpt-3.5\" | \"gpt-4\";\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\n/** localization client. */\nexport class Localization {\n constructor(private transport: Transport) {}\n\n /** Translate a JSON input into any localized file */\n async translate(options: LocalizationTranslateOptions): Promise<Record<string, unknown>> {\n const body: Record<string, unknown> = {};\n body[\"input\"] = options.input;\n body[\"locale\"] = options.locale;\n body[\"extension\"] = options.extension;\n if (options.model !== undefined) body[\"model\"] = options.model;\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"callbackUrl\", \"extension\", \"input\", \"locale\", \"maxWait\", \"model\", \"pollInterval\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n return (await this.transport.request('POST', \"/localization/translate\", { json: body })) as Record<string, unknown>;\n }\n\n}\n","/**\n * Luma (luma) — generated from the platform OpenAPI spec.\n *\n * Do not edit by hand: run `python scripts/generate_providers.py`. Parameter\n * names, types, enums and required-ness all come from the live spec.\n */\n\nimport { Transport } from '../../runtime/transport';\nimport { TaskHandle } from '../../runtime/tasks';\n\n\nfunction taskId(result: Record<string, unknown>): string {\n if (typeof result?.task_id === 'string') return result.task_id;\n const data = result?.data as Record<string, unknown> | undefined;\n if (data && typeof data.task_id === 'string') return data.task_id;\n return typeof result?.id === 'string' ? result.id : '';\n}\n\nexport interface LumaGenerateOptions {\n /** Whether to enable loop playback for the generated video. */\n loop?: boolean;\n /** Operation type. Use `generate` when creating a video for the first time, and use `extend` when continuing an existing video. */\n action?: \"generate\" | \"extend\";\n /** Text prompts for generating videos. */\n prompt?: string;\n /** The timeout for the API return data (unit: seconds). */\n timeout?: number;\n /** The unique identifier of the generated video used for the continuation operation (`extend`). If both are specified, `video_id` takes precedence over `video_url`. */\n videoId?: string;\n /** The original video URL used for the extend operation (`extend`). If `video_id` is specified at the same time, then `video_id` shall prevail. */\n videoUrl?: string;\n /** Whether to enable automatic optimization enhancement for the input prompt text, suitable for use when unsure how to write prompt words. */\n enhancement?: boolean;\n /** Generate the aspect ratio of the video, for example `16:9`. */\n aspectRatio?: string;\n /** The URL of the ending frame image, which will be used as the last frame of the generated video. */\n endImageUrl?: string;\n /** The URL of the starting frame image, which will be used as the first frame of the generated video. */\n startImageUrl?: string;\n /** Submit asynchronously and poll. Defaults to true. */\n async?: boolean;\n /** Wait for completion before returning the handle. */\n wait?: boolean;\n pollInterval?: number;\n maxWait?: number;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\n/** luma client. */\nexport class Luma {\n constructor(private transport: Transport) {}\n\n /** Generate videos based on prompt and image frames */\n async generate(options: LumaGenerateOptions = {}): Promise<TaskHandle> {\n const body: Record<string, unknown> = {};\n body[\"loop\"] = options.loop ?? false;\n body[\"action\"] = options.action ?? \"generate\";\n body[\"prompt\"] = options.prompt ?? \"Astronauts shuttle from space to volcano\";\n body[\"timeout\"] = options.timeout ?? 300;\n if (options.videoId !== undefined) body[\"video_id\"] = options.videoId;\n if (options.videoUrl !== undefined) body[\"video_url\"] = options.videoUrl;\n body[\"enhancement\"] = options.enhancement ?? true;\n if (options.aspectRatio !== undefined) body[\"aspect_ratio\"] = options.aspectRatio;\n body[\"end_image_url\"] = options.endImageUrl ?? \"https://cdn.acedata.cloud/0iad3k.png\";\n body[\"start_image_url\"] = options.startImageUrl ?? \"https://cdn.acedata.cloud/r9vsv9.png\";\n for (const [key, value] of Object.entries(options)) {\n if (![\"action\", \"aspectRatio\", \"async\", \"callbackUrl\", \"endImageUrl\", \"enhancement\", \"loop\", \"maxWait\", \"pollInterval\", \"prompt\", \"startImageUrl\", \"timeout\", \"videoId\", \"videoUrl\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n body.async = options.async ?? true;\n const result = (await this.transport.request('POST', \"/luma/videos\", { json: body })) as Record<string, unknown>;\n const handle = new TaskHandle(taskId(result), \"/luma/tasks\", this.transport, result);\n if (options.wait) {\n await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });\n }\n return handle;\n }\n\n}\n","/**\n * Maestro (maestro) — generated from the platform OpenAPI spec.\n *\n * Do not edit by hand: run `python scripts/generate_providers.py`. Parameter\n * names, types, enums and required-ness all come from the live spec.\n */\n\nimport { Transport } from '../../runtime/transport';\n\n\nexport interface MaestroGenerateOptions {\n /** Natural-language brief describing the video to produce (the topic, what to show, tone, audience). The agent decides the script, visuals, voiceover and edit. */\n prompt: string;\n /** Output languages, e.g. [\"zh-cn\", \"en\"]. The first is the primary language; each additional one reuses the visuals with a localized voiceover + render and is billed +6 credits. */\n langs?: string[];\n /** 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. */\n style?: \"auto\" | \"cinematic\" | \"glass\" | \"luxury\" | \"swiss\" | \"modern\" | \"editorial\" | \"warm\" | \"vibrant\" | \"neon\" | \"mono\" | \"pastel\" | \"bold\" | \"industrial\" | \"futuristic\" | \"retro\";\n /** 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. */\n voice?: \"auto\" | \"warm-female\" | \"bright-female\" | \"anchor-female\" | \"clean-female\" | \"calm-male\" | \"deep-male\" | \"documentary-male\" | \"energetic-male\" | \"storyteller-male\";\n /** generate = a new video. remix / edit / extend = iterate on a previous video (require `ref_task_id`). */\n action?: \"generate\" | \"remix\" | \"edit\" | \"extend\";\n /** Output aspect ratio (hint — the agent may follow the prompt). */\n aspect?: \"9:16\" | \"16:9\" | \"1:1\";\n /** Production tier, a multiplier on the duration-based price. `draft` = a fast rough cut for previewing the idea (~0.5× the standard credits); `standard` = balanced (default, 1×); `premium` = richer, more detailed and polished (~2× the standard credits). Affects turnaround, detail and price. */\n quality?: \"draft\" | \"standard\" | \"premium\";\n /** Target video length in seconds (1–600, i.e. up to 10 minutes). Billed by duration: credits ≈ 0.85 × duration × quality multiplier × scenario multiplier, so a longer or video-native workflow costs proportionally more. */\n duration?: number;\n /** How to route the video — a hint; the AI director still decides the final structure. `auto` (default) = the director chooses from your brief. `narrated` = multi-scene narrated video with real photos + voiceover + data cards (people / brands / explainers / history / products). `drama` = acted short drama with characters + dialogue (短剧) and bills at 1.35×. `avatar` = talking-head / digital human (needs a portrait image via `file_urls`, or a chosen digital human) and bills at 1.15×. `motion` = abstract kinetic-typography / data / logo motion graphic. `slideshow` = presentation deck / pitch. Legacy values `general` / `explainer` / `product` / `website` / `changelog` / `captions` are still accepted (mapped to `auto`), and `slides` maps to `slideshow`. */\n scenario?: \"auto\" | \"narrated\" | \"drama\" | \"avatar\" | \"motion\" | \"slideshow\";\n /** Optional reference media (image / video / audio URLs) the agent can use — e.g. a product shot or logo to feature, footage to caption. */\n fileUrls?: string[];\n /** Required when `action` is remix / edit / extend: the task_id of the previous video to start from. */\n refTaskId?: string;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\nexport interface MaestroEstimatesOptions {\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\n/** maestro client. */\nexport class Maestro {\n constructor(private transport: Transport) {}\n\n /** Maestro Video Generation API */\n async generate(options: MaestroGenerateOptions): Promise<Record<string, unknown>> {\n const body: Record<string, unknown> = {};\n body[\"prompt\"] = options.prompt;\n body[\"langs\"] = options.langs ?? [\"zh-cn\"];\n body[\"style\"] = options.style ?? \"auto\";\n body[\"voice\"] = options.voice ?? \"auto\";\n body[\"action\"] = options.action ?? \"generate\";\n body[\"aspect\"] = options.aspect ?? \"9:16\";\n body[\"quality\"] = options.quality ?? \"standard\";\n body[\"duration\"] = options.duration ?? 30;\n body[\"scenario\"] = options.scenario ?? \"auto\";\n if (options.fileUrls !== undefined) body[\"file_urls\"] = options.fileUrls;\n if (options.refTaskId !== undefined) body[\"ref_task_id\"] = options.refTaskId;\n for (const [key, value] of Object.entries(options)) {\n if (![\"action\", \"aspect\", \"async\", \"callbackUrl\", \"duration\", \"fileUrls\", \"langs\", \"maxWait\", \"pollInterval\", \"prompt\", \"quality\", \"refTaskId\", \"scenario\", \"style\", \"voice\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n return (await this.transport.request('POST', \"/maestro/videos\", { json: body })) as Record<string, unknown>;\n }\n\n /** Call /maestro/estimates. */\n async estimates(options: MaestroEstimatesOptions = {}): Promise<Record<string, unknown>> {\n const body: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"callbackUrl\", \"maxWait\", \"pollInterval\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n return (await this.transport.request('POST', \"/maestro/estimates\", { json: body })) as Record<string, unknown>;\n }\n\n}\n","/**\n * NanoBanana (nano-banana) — generated from the platform OpenAPI spec.\n *\n * Do not edit by hand: run `python scripts/generate_providers.py`. Parameter\n * names, types, enums and required-ness all come from the live spec.\n */\n\nimport { Transport } from '../../runtime/transport';\nimport { TaskHandle } from '../../runtime/tasks';\n\n\nfunction taskId(result: Record<string, unknown>): string {\n if (typeof result?.task_id === 'string') return result.task_id;\n const data = result?.data as Record<string, unknown> | undefined;\n if (data && typeof data.task_id === 'string') return data.task_id;\n return typeof result?.id === 'string' ? result.id : '';\n}\n\nexport interface NanoBananaGenerateOptions {\n /** Image operation type. If it is `generate`, then generate an image based on the prompt; if it is `edit`, then edit the image based on the prompt and `image_urls`. */\n action: \"generate\" | \"edit\";\n /** Prompts for generating images. */\n prompt: string;\n /** The number of images to be generated or edited supports 1 to 4, with a default of 1. If some images fail to generate, the corresponding `data` only contains the successfully generated images and charges based on the number of successful ones. */\n count?: number;\n /** Models used for generating images. If not specified, the default is `nano-banana`. `nano-banana-2-lite` is an alias for `gemini-3.1-flash-lite-image` (only 1K, fast generation speed), `nano-banana-2` is an alias for `gemini-3.1-flash-image` (provides professional-level quality at flash speed), `nano-banana-pro` is an alias for `gemini-3-pro-image`, and `nano-banana` is an alias for `gemini-2.5-flash-image`. Models with the `:official` suffix (`nano-banana:official`, `nano-banana-2-lite:official`, `nano-banana-2:official`, `nano-banana-pro:official`) are provided through official channels, offering better image quality and stability, with different billing. */\n model?: \"nano-banana\" | \"nano-banana-2-lite\" | \"nano-banana-2\" | \"nano-banana-pro\" | \"nano-banana:official\" | \"nano-banana-2-lite:official\" | \"nano-banana-2:official\" | \"nano-banana-pro:official\";\n /** Link to the image that needs to be edited. It can be an accessible http or https URL, or a Base64 encoded image string in the format `data:image/png;base64,iVBORw0KG...`. Each image must not exceed 10MB in size. This parameter is required when `action` is `edit`. */\n imageUrls?: string[];\n /** Resolution of generated images. Supported values are `1K`, `2K`, `4K`, with a default of `1K`. If this parameter is specified, images will be generated at the specified resolution regardless of whether the `action` is `generate` or `edit` (smaller reference images can be redrawn at a higher resolution); if not specified, the default value of `1K` will be used. `nano-banana` and `nano-banana-2-lite` only support `1K`; `2K` / `4K` are only applicable to models that support high resolution. */\n resolution?: \"1K\" | \"2K\" | \"4K\";\n /** Aspect ratio for generating images. Supported values are `1:1`, `3:2`, `2:3`, `16:9`, `9:16`, `4:3`, `3:4`. If this parameter is specified, the specified aspect ratio will be used for generation regardless of whether `action` is `generate` or `edit`; if not specified, the default for `action` as `generate` is `1:1`, and for `action` as `edit`, it will automatically adopt the aspect ratio of the first image in `image_urls` to preserve the original composition. Note: In `edit` mode, specifying an aspect ratio that differs significantly from the original image will cause the model to redraw according to the new ratio, which may deviate from the reference image. */\n aspectRatio?: \"1:1\" | \"3:2\" | \"2:3\" | \"16:9\" | \"9:16\" | \"4:3\" | \"3:4\";\n /** Submit asynchronously and poll. Defaults to true. */\n async?: boolean;\n /** Wait for completion before returning the handle. */\n wait?: boolean;\n pollInterval?: number;\n maxWait?: number;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\n/** nano-banana client. */\nexport class NanoBanana {\n constructor(private transport: Transport) {}\n\n /** Google Nano Banana image generation and editing API. Supports nano-banana, nano-banana-2, and nano-banana-pro for text-to-image generation and reference-image editing. */\n async generate(options: NanoBananaGenerateOptions): Promise<TaskHandle> {\n const body: Record<string, unknown> = {};\n body[\"action\"] = options.action;\n body[\"prompt\"] = options.prompt;\n body[\"count\"] = options.count ?? 1;\n if (options.model !== undefined) body[\"model\"] = options.model;\n if (options.imageUrls !== undefined) body[\"image_urls\"] = options.imageUrls;\n if (options.resolution !== undefined) body[\"resolution\"] = options.resolution;\n body[\"aspect_ratio\"] = options.aspectRatio ?? \"1:1\";\n for (const [key, value] of Object.entries(options)) {\n if (![\"action\", \"aspectRatio\", \"async\", \"callbackUrl\", \"count\", \"imageUrls\", \"maxWait\", \"model\", \"pollInterval\", \"prompt\", \"resolution\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n body.async = options.async ?? true;\n const result = (await this.transport.request('POST', \"/nano-banana/images\", { json: body })) as Record<string, unknown>;\n const handle = new TaskHandle(taskId(result), \"/nano-banana/tasks\", this.transport, result);\n if (options.wait) {\n await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });\n }\n return handle;\n }\n\n}\n","/**\n * Producer (producer) — generated from the platform OpenAPI spec.\n *\n * Do not edit by hand: run `python scripts/generate_providers.py`. Parameter\n * names, types, enums and required-ness all come from the live spec.\n */\n\nimport { Transport } from '../../runtime/transport';\nimport { TaskHandle } from '../../runtime/tasks';\n\n\nfunction taskId(result: Record<string, unknown>): string {\n if (typeof result?.task_id === 'string') return result.task_id;\n const data = result?.data as Record<string, unknown> | undefined;\n if (data && typeof data.task_id === 'string') return data.task_id;\n return typeof result?.id === 'string' ? result.id : '';\n}\n\nexport interface ProducerUploadOptions {\n /** The CDN address for the custom audio files to be uploaded. */\n audioUrl: string;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\nexport interface ProducerGenerateOptions {\n /** Reference audio ID. */\n audioId: string;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\nexport interface ProducerWavOptions {\n /** Reference audio ID. */\n audioId: string;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\nexport interface ProducerProducerAudiosOptions {\n /** Lyrics content for generating audio. */\n lyric: string;\n /** Types of audio generation operations. Supported values include `generate` (generate based on prompts), `cover` (cover song), `extend` (continue writing), `variation` (variant), `swap_vocals` (replace vocals), `swap_instrumentals` (replace instrumentals), `replace_section` (replace section), `stems` (separate tracks). */\n action: \"generate\" | \"cover\" | \"extend\" | \"variation\" | \"swap_vocals\" | \"swap_instrumentals\" | \"replace_section\" | \"stems\";\n /** Prompts for generating audio should not exceed 200 characters in length. */\n prompt: string;\n /** Random seed used for audio generation. */\n seed?: string;\n /** The model used for generating music is `FUZZ-2.0` by default. */\n model?: \"FUZZ-2.0 Pro\" | \"FUZZ-2.0\" | \"FUZZ-2.0 Raw\" | \"FUZZ-1.1 Pro\" | \"FUZZ-1.0 Pro\" | \"FUZZ-1.0\" | \"FUZZ-1.1\" | \"FUZZ-0.8\";\n /** Title used for generating songs. */\n title?: string;\n /** Is it a custom mode? If `true`, the audio will be generated based on the `lyric`; otherwise, it will be generated based on the `prompt`. */\n custom?: boolean;\n /** The unique ID of the reference song. */\n audioId?: string;\n /** The degree of uniqueness of style can be selected between 0 and 1, with a default value of 0.5. */\n weirdness?: number;\n /** Specify the time point (in seconds) from which to continue writing the song. */\n continueAt?: number;\n /** If `true`, the generated audio will only contain the accompaniment, without vocal lyrics. */\n instrumental?: boolean;\n /** The impact intensity of the audio prompt words can be selected between 0.2 and 1, with a default value of 0.5. */\n soundStrength?: number;\n /** The degree of influence of lyrics on audio generation can be selected between 0 and 1, with a default value of 0.5. */\n lyricsStrength?: number;\n /** Replace the end time point of the segment (seconds). */\n replaceSectionEnd?: number;\n /** Replace the starting time point of the segment (seconds). */\n replaceSectionStart?: number;\n /** Submit asynchronously and poll. Defaults to true. */\n async?: boolean;\n /** Wait for completion before returning the handle. */\n wait?: boolean;\n pollInterval?: number;\n maxWait?: number;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\nexport interface ProducerLyricsOptions {\n /** Prompts for generating lyrics. */\n prompt: Record<string, unknown>;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\n/** producer client. */\nexport class Producer {\n constructor(private transport: Transport) {}\n\n /** Producer reference audio upload API, upload audio to get an audio_id for generation. */\n async upload(options: ProducerUploadOptions): Promise<Record<string, unknown>> {\n const body: Record<string, unknown> = {};\n body[\"audio_url\"] = options.audioUrl;\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"audioUrl\", \"callbackUrl\", \"maxWait\", \"pollInterval\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n return (await this.transport.request('POST', \"/producer/upload\", { json: body })) as Record<string, unknown>;\n }\n\n /** AceData Producer MP4 retrieval API. Pass an audio_id to receive an MP4 video download link with cover art. */\n async generate(options: ProducerGenerateOptions): Promise<Record<string, unknown>> {\n const body: Record<string, unknown> = {};\n body[\"audio_id\"] = options.audioId;\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"audioId\", \"callbackUrl\", \"maxWait\", \"pollInterval\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n return (await this.transport.request('POST', \"/producer/videos\", { json: body })) as Record<string, unknown>;\n }\n\n /** AceData Producer WAV (lossless) retrieval API. Pass an audio_id to receive a WAV-format download link. */\n async wav(options: ProducerWavOptions): Promise<Record<string, unknown>> {\n const body: Record<string, unknown> = {};\n body[\"audio_id\"] = options.audioId;\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"audioId\", \"callbackUrl\", \"maxWait\", \"pollInterval\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n return (await this.transport.request('POST', \"/producer/wav\", { json: body })) as Record<string, unknown>;\n }\n\n /** Producer AI music generation API, generates 1 song per request. */\n async producer_audios(options: ProducerProducerAudiosOptions): Promise<TaskHandle> {\n const body: Record<string, unknown> = {};\n body[\"lyric\"] = options.lyric;\n body[\"action\"] = options.action;\n body[\"prompt\"] = options.prompt;\n if (options.seed !== undefined) body[\"seed\"] = options.seed;\n if (options.model !== undefined) body[\"model\"] = options.model;\n if (options.title !== undefined) body[\"title\"] = options.title;\n if (options.custom !== undefined) body[\"custom\"] = options.custom;\n if (options.audioId !== undefined) body[\"audio_id\"] = options.audioId;\n body[\"weirdness\"] = options.weirdness ?? false;\n body[\"continue_at\"] = options.continueAt ?? false;\n body[\"instrumental\"] = options.instrumental ?? false;\n body[\"sound_strength\"] = options.soundStrength ?? false;\n body[\"lyrics_strength\"] = options.lyricsStrength ?? false;\n body[\"replace_section_end\"] = options.replaceSectionEnd ?? false;\n body[\"replace_section_start\"] = options.replaceSectionStart ?? false;\n for (const [key, value] of Object.entries(options)) {\n if (![\"action\", \"async\", \"audioId\", \"callbackUrl\", \"continueAt\", \"custom\", \"instrumental\", \"lyric\", \"lyricsStrength\", \"maxWait\", \"model\", \"pollInterval\", \"prompt\", \"replaceSectionEnd\", \"replaceSectionStart\", \"seed\", \"soundStrength\", \"title\", \"wait\", \"weirdness\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n body.async = options.async ?? true;\n const result = (await this.transport.request('POST', \"/producer/audios\", { json: body })) as Record<string, unknown>;\n const handle = new TaskHandle(taskId(result), \"/producer/tasks\", this.transport, result);\n if (options.wait) {\n await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });\n }\n return handle;\n }\n\n /** Producer AI lyrics generation API, input a prompt to generate lyrics. */\n async lyrics(options: ProducerLyricsOptions): Promise<Record<string, unknown>> {\n const body: Record<string, unknown> = {};\n body[\"prompt\"] = options.prompt;\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"callbackUrl\", \"maxWait\", \"pollInterval\", \"prompt\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n return (await this.transport.request('POST', \"/producer/lyrics\", { json: body })) as Record<string, unknown>;\n }\n\n}\n","/**\n * Seedance (seedance) — generated from the platform OpenAPI spec.\n *\n * Do not edit by hand: run `python scripts/generate_providers.py`. Parameter\n * names, types, enums and required-ness all come from the live spec.\n */\n\nimport { Transport } from '../../runtime/transport';\nimport { TaskHandle } from '../../runtime/tasks';\n\n\nfunction taskId(result: Record<string, unknown>): string {\n if (typeof result?.task_id === 'string') return result.task_id;\n const data = result?.data as Record<string, unknown> | undefined;\n if (data && typeof data.task_id === 'string') return data.task_id;\n return typeof result?.id === 'string' ? result.id : '';\n}\n\nexport interface SeedanceGenerateOptions {\n /** Model ID for video generation */\n model: \"doubao-seedance-1-0-pro-250528\" | \"doubao-seedance-1-0-pro-fast-251015\" | \"doubao-seedance-1-5-pro-251215\" | \"doubao-seedance-1-0-lite-t2v-250428\" | \"doubao-seedance-1-0-lite-i2v-250428\" | \"doubao-seedance-2-0-260128\" | \"doubao-seedance-2-0-fast-260128\" | \"doubao-seedance-2-0-mini-260615\";\n /** Input content for video generation. Each entry must include one of `text`, `image_url`, `audio_url`, or `video_url` corresponding to the `type`. The meaning of other fields and whether they are required depends on the value of `type`. */\n content: unknown[];\n /** The random seed used for reproducible generation has a value range from -1 to 4294967295; -1 indicates randomness. */\n seed?: number;\n /** Aspect ratio of the generated video */\n ratio?: \"16:9\" | \"4:3\" | \"1:1\" | \"3:4\" | \"9:16\" | \"21:9\" | \"adaptive\";\n /** The frame count for generating a video must meet 25 + 4n (such as 29, 33, 37... 361). Either duration or frames can be specified; if both are specified, frames take priority over duration. */\n frames?: number;\n /** The duration of the generated video, in seconds. Either duration or frames can be specified; if both are specified, frames take priority over duration. The duration range varies for each model: Seedance 2.0 series is 4 to 15 seconds or -1, Seedance 1.5 Pro is 4 to 12 seconds or -1, and Seedance 1.0 series is 2 to 12 seconds. -1 indicates automatic duration. */\n duration?: number;\n /** Whether to add a watermark to the generated video. */\n watermark?: boolean;\n /** Video resolution. The default value depends on the model used: most models default to 720p, while the lite model defaults to 480p. Note that the supported resolutions vary by model: `4k` is only supported by doubao-seedance-2-0 (standard version); doubao-seedance-2-0-fast and doubao-seedance-2-0-mini do not support 1080p and 4k. */\n resolution?: \"480p\" | \"720p\" | \"1080p\" | \"4k\";\n /** Is the camera position fixed during the generation process? */\n camerafixed?: boolean;\n /** Whether to generate audio from video. The `doubao-seedance-1-5-pro-251215` and `doubao-seedance-2-0` series models support this parameter, while other models will ignore this parameter. */\n generateAudio?: boolean;\n /** Whether to return the last frame of the generated video. */\n returnLastFrame?: boolean;\n /** Task timeout threshold, unit in seconds */\n executionExpiresAfter?: number;\n /** Submit asynchronously and poll. Defaults to true. */\n async?: boolean;\n /** Wait for completion before returning the handle. */\n wait?: boolean;\n pollInterval?: number;\n maxWait?: number;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\n/** seedance client. */\nexport class Seedance {\n constructor(private transport: Transport) {}\n\n /** ByteDance Seedance video generation API. Supports doubao-seedance-1-0-pro-250528, doubao-seedance-1-0-pro-fast-251015, doubao-seedance-1-5-pro-251215, doubao-seedance-1-0-lite-t2v-250428, and doubao-s */\n async generate(options: SeedanceGenerateOptions): Promise<TaskHandle> {\n const body: Record<string, unknown> = {};\n body[\"model\"] = options.model;\n body[\"content\"] = options.content;\n if (options.seed !== undefined) body[\"seed\"] = options.seed;\n body[\"ratio\"] = options.ratio ?? \"16:9\";\n if (options.frames !== undefined) body[\"frames\"] = options.frames;\n if (options.duration !== undefined) body[\"duration\"] = options.duration;\n if (options.watermark !== undefined) body[\"watermark\"] = options.watermark;\n if (options.resolution !== undefined) body[\"resolution\"] = options.resolution;\n if (options.camerafixed !== undefined) body[\"camerafixed\"] = options.camerafixed;\n body[\"generate_audio\"] = options.generateAudio ?? false;\n body[\"return_last_frame\"] = options.returnLastFrame ?? false;\n body[\"execution_expires_after\"] = options.executionExpiresAfter ?? 172800;\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"callbackUrl\", \"camerafixed\", \"content\", \"duration\", \"executionExpiresAfter\", \"frames\", \"generateAudio\", \"maxWait\", \"model\", \"pollInterval\", \"ratio\", \"resolution\", \"returnLastFrame\", \"seed\", \"wait\", \"watermark\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n body.async = options.async ?? true;\n const result = (await this.transport.request('POST', \"/seedance/videos\", { json: body })) as Record<string, unknown>;\n const handle = new TaskHandle(taskId(result), \"/seedance/tasks\", this.transport, result);\n if (options.wait) {\n await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });\n }\n return handle;\n }\n\n}\n","/**\n * Seedream (seedream) — generated from the platform OpenAPI spec.\n *\n * Do not edit by hand: run `python scripts/generate_providers.py`. Parameter\n * names, types, enums and required-ness all come from the live spec.\n */\n\nimport { Transport } from '../../runtime/transport';\nimport { TaskHandle } from '../../runtime/tasks';\n\n\nfunction taskId(result: Record<string, unknown>): string {\n if (typeof result?.task_id === 'string') return result.task_id;\n const data = result?.data as Record<string, unknown> | undefined;\n if (data && typeof data.task_id === 'string') return data.task_id;\n return typeof result?.id === 'string' ? result.id : '';\n}\n\nexport interface SeedreamGenerateOptions {\n /** Models used for generating images. If not specified, the default is `doubao-seedream-5.0-lite`. `doubao-seedream-5.0-pro` is the latest flagship single image model (only generates single images, does not support group images, streaming, or online search). */\n model: \"doubao-seedream-5-0-pro-260628\" | \"doubao-seedream-5-0-260128\" | \"doubao-seedream-4-0-250828\" | \"doubao-seedream-4-5-251128\" | \"doubao-seedream-3-0-t2i-250415\" | \"doubao-seededit-3-0-i2i-250628\";\n /** Prompts for generating images. */\n prompt: string;\n /** Generate a random seed for image generation. The supported range is [-1, 2147483647], with a default value of `-1`. **Only `doubao-seedream-3.0-t2i` supports this parameter** (according to the official Volcengine documentation), other models do not accept this parameter. */\n seed?: number;\n /** Generate image dimensions or aspect ratios. Supports preset options (`1K`/`2K`/`3K`/`4K`), `adaptive` (adaptive reference image size), or explicit `<width>x<height>` format (e.g., `1024x1024`). **Different models support different preset options**: `doubao-seedream-5.0-pro` supports `1K`/`2K`; `doubao-seedream-5.0-lite` supports `2K`/`3K`/`4K`; `doubao-seedream-4.5` only supports `2K`/`4K`; `doubao-seedream-4.0` supports `1K`/`2K`/`4K`; `doubao-seedream-3.0-t2i` and `doubao-seedream-3.0-i2i` **do not support** any preset options and must receive explicit `<width>x<height>` values. */\n size?: \"1K\" | \"2K\" | \"3K\" | \"4K\" | \"adaptive\";\n /** Reference image links for image editing are required, supporting accessible http/https URLs, or base64 encoded image strings in the format `data:image/png;base64,iVBORw0KG...`. Each image must not exceed 10MB in size. This parameter is mandatory when using image-to-image models (such as `doubao-seededit-3.0-i2i`). */\n image?: string[];\n /** List of tools that can be called by the model. Currently, only `web_search` is supported. Applicable only to `doubao-seedream-5.0-lite`. */\n tools?: unknown[];\n /** Whether to return all images in a streaming manner, default is `false`. Only supports `doubao-seedream-5.0-lite`, `doubao-seedream-4.5`, and `doubao-seedream-4.0`. */\n stream?: boolean;\n /** Whether to add AI-generated watermark, default is `true`. */\n watermark?: boolean;\n /** The output image file format is `jpeg` by default. Only `doubao-seedream-5.0-pro` and `doubao-seedream-5.0-lite` are supported. */\n outputFormat?: \"jpeg\" | \"png\";\n /** Prompt word weight, the larger the value, the more relevant the generated result is to the prompt word. Only supports `doubao-seedream-3.0-t2i` (default value 2.5) and `doubao-seededit-3.0-i2i` (default value 5.5), both ranges are [1, 10]. */\n guidanceScale?: unknown;\n /** The response format defaults to `url`, and also supports `b64_json`. */\n responseFormat?: string;\n /** Optional prompt word optimization configuration. Only supports `doubao-seedream-5.0-lite`, `doubao-seedream-4.5` (only in `standard` mode), and `doubao-seedream-4.0`. */\n optimizePromptOptions?: Record<string, unknown>;\n /** The default value is `disabled`. Setting it to `auto` allows the model to generate a set of stylistically coherent related images (multi-image consistency, sharing characters, styles, and details across frames). Only `doubao-seedream-5.0-lite`, `doubao-seedream-4.5`, and `doubao-seedream-4.0` are supported. */\n sequentialImageGeneration?: \"auto\" | \"disabled\";\n /** Adjustable parameters for batch image generation. Effective only when `sequential_image_generation=auto`. Only supports `doubao-seedream-5.0-lite`, `doubao-seedream-4.5`, and `doubao-seedream-4.0`. */\n sequentialImageGenerationOptions?: Record<string, unknown>;\n /** Submit asynchronously and poll. Defaults to true. */\n async?: boolean;\n /** Wait for completion before returning the handle. */\n wait?: boolean;\n pollInterval?: number;\n maxWait?: number;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\n/** seedream client. */\nexport class Seedream {\n constructor(private transport: Transport) {}\n\n /** ByteDance Seedream high-quality image generation and editing API. Supports text-to-image models doubao-seedream-3-0-t2i-250415, doubao-seedream-4-0-250828, doubao-seedream-4-5-251128, doubao-seedream- */\n async generate(options: SeedreamGenerateOptions): Promise<TaskHandle> {\n const body: Record<string, unknown> = {};\n body[\"model\"] = options.model;\n body[\"prompt\"] = options.prompt;\n if (options.seed !== undefined) body[\"seed\"] = options.seed;\n body[\"size\"] = options.size ?? \"2K\";\n if (options.image !== undefined) body[\"image\"] = options.image;\n if (options.tools !== undefined) body[\"tools\"] = options.tools;\n if (options.stream !== undefined) body[\"stream\"] = options.stream;\n if (options.watermark !== undefined) body[\"watermark\"] = options.watermark;\n if (options.outputFormat !== undefined) body[\"output_format\"] = options.outputFormat;\n if (options.guidanceScale !== undefined) body[\"guidance_scale\"] = options.guidanceScale;\n if (options.responseFormat !== undefined) body[\"response_format\"] = options.responseFormat;\n if (options.optimizePromptOptions !== undefined) body[\"optimize_prompt_options\"] = options.optimizePromptOptions;\n if (options.sequentialImageGeneration !== undefined) body[\"sequential_image_generation\"] = options.sequentialImageGeneration;\n if (options.sequentialImageGenerationOptions !== undefined) body[\"sequential_image_generation_options\"] = options.sequentialImageGenerationOptions;\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"callbackUrl\", \"guidanceScale\", \"image\", \"maxWait\", \"model\", \"optimizePromptOptions\", \"outputFormat\", \"pollInterval\", \"prompt\", \"responseFormat\", \"seed\", \"sequentialImageGeneration\", \"sequentialImageGenerationOptions\", \"size\", \"stream\", \"tools\", \"wait\", \"watermark\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n body.async = options.async ?? true;\n const result = (await this.transport.request('POST', \"/seedream/images\", { json: body })) as Record<string, unknown>;\n const handle = new TaskHandle(taskId(result), \"/seedream/tasks\", this.transport, result);\n if (options.wait) {\n await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });\n }\n return handle;\n }\n\n}\n","/**\n * Suno (suno) — generated from the platform OpenAPI spec.\n *\n * Do not edit by hand: run `python scripts/generate_providers.py`. Parameter\n * names, types, enums and required-ness all come from the live spec.\n */\n\nimport { Transport } from '../../runtime/transport';\nimport { TaskHandle } from '../../runtime/tasks';\n\n\nfunction taskId(result: Record<string, unknown>): string {\n if (typeof result?.task_id === 'string') return result.task_id;\n const data = result?.data as Record<string, unknown> | undefined;\n if (data && typeof data.task_id === 'string') return data.task_id;\n return typeof result?.id === 'string' ? result.id : '';\n}\n\nexport interface SunoGenerateOptions {\n /** Lyrics for generating music under custom mode (`custom` is `true`). `chirp-v3-5` and `chirp-v4` have a maximum of 3000 characters; `chirp-v4-5` and above (including `chirp-v5`, `chirp-v5-5`) have a maximum of 5000 characters. */\n lyric?: string;\n /** The model used for generating music has a default value of `chirp-v4`. */\n model?: \"chirp-v5-5\" | \"chirp-v5\" | \"chirp-v4-5-plus\" | \"chirp-v4-5\" | \"chirp-v4\" | \"chirp-v3-5\" | \"chirp-v3-0\";\n /** Music style description. `chirp-v3-5` and `chirp-v4` up to 200 characters; `chirp-v4-5` and above (including `chirp-v5`, `chirp-v5-5`) up to 1000 characters. */\n style?: string;\n /** Music Title (Custom Mode). `chirp-v3-5` and `chirp-v4` up to 80 characters; `chirp-v4-5` and above (including `chirp-v5`, `chirp-v5-5`) up to 100 characters. */\n title?: string;\n /** Types of operations for generating music. `generate`: Generate audio based on prompts; `extend`: Continue generating based on existing audio; `concat`: Stitch existing audio clips into a complete track; `cover`: Copy the musical style of an existing track and reinterpret it; `upload_cover`: Style cover of uploaded audio; `upload_extend`: Extend and continue generating uploaded audio; `artist_consistency`: Sing new songs in the style of a specified artist (Persona); `artist_consistency_vox`: Sing new songs in the style of a specified artist using VOX mode; `stems`: Separate the song into vocal and accompaniment tracks; `all_stems`: Separate the song into all independent tracks (vocals, drums, bass, other instruments); `replace_section`: Replace segments within a specified time period; `underpainting`: Generate and add AI accompaniment to the uploaded vocal track; `overpainting`: Generate and add AI vocals to the uploaded accompaniment track; `samples`: Add AI samples to the uploaded audio within a specified time period; `remaster`: Remaster existing audio to enhance sound quality; `mashup`: Mix and stitch multiple songs into one track; `inspo`: Generate new music inspired by 1 to 4 reference audio segments. */\n action?: \"generate\" | \"extend\" | \"upload_extend\" | \"upload_cover\" | \"concat\" | \"cover\" | \"artist_consistency\" | \"artist_consistency_vox\" | \"stems\" | \"all_stems\" | \"replace_section\" | \"underpainting\" | \"overpainting\" | \"remaster\" | \"mashup\" | \"samples\" | \"inspo\";\n /** Whether to enable the custom mode flag. If `true`, the audio will be generated based on the lyrics; otherwise, it will be generated based on the prompts. */\n custom?: boolean;\n /** The prompt words for generating music in inspiration mode (when `custom` is set to `false`) must not exceed 500 characters. For custom mode, please use `lyric` and `style`. */\n prompt?: Record<string, unknown>;\n /** Audio ID used for generating additional audio based on existing audio. This field is required when `action` is `extend` or `concat`. */\n audioId?: string;\n /** The \"Weirdness\" advanced parameter in the Suno official custom mode has a value range of 0 to 1, with higher values resulting in more creative and experimental outputs. It is only effective in custom mode. */\n weirdness?: number;\n /** A list of reference audio URLs for inspiration, requiring 1 to 4 publicly accessible audio addresses. This field is mandatory when `action` is `inspo`. */\n audioUrls?: string[];\n /** Generate the singer Persona ID used when creating songs based on the unique style characteristics of the specified singer. */\n personaId?: string;\n /** Continue generating from the specified time point (seconds) of the existing audio. For example, 213.5 means to continue from 3 minutes and 33.5 seconds. */\n continueAt?: number;\n /** Add the end time of the sample for the uploaded audio, which must be less than the total duration of the song. */\n samplesEnd?: number;\n /** The weight of the uploaded reference audio, with a value range from 0 to 1, where a higher value indicates greater reliance on the reference audio. This only takes effect during the cover operation. */\n audioWeight?: number;\n /** Pure accompaniment mode (no lyrics), default is `false`. When set to `true`, the lyrics filled in above will be ignored. */\n instrumental?: boolean;\n /** Prompts for automatically generating lyrics, effective only when `custom` is `true` and `lyric` is empty. */\n lyricPrompt?: Record<string, unknown>;\n /** Voice gender preference, selectable values are `'m'` (male voice) or `'f'` (female voice). Models `chirp-v4-5` and above are effective; this parameter is a preference item that can increase the probability of the target gender, but it does not guarantee strict adherence. */\n vocalGender?: string;\n /** Add a default start time for the uploaded audio sample, with a default value of 0. */\n samplesStart?: number;\n /** Styles of description that are not desired in music generation. */\n styleNegative?: string;\n /** The \"Style Influence\" advanced parameter in the Suno official custom mode has a value range of 0 to 1, with higher values being closer to the selected style. It is only effective in custom mode. */\n styleInfluence?: number;\n /** Audio ID list for mixing and mashup. This field is required when `action` is `mashup`. */\n mashupAudioIds?: string[];\n /** Add the end time of the AI voice to the uploaded audio, which must be less than the total duration of the song. */\n overpaintingEnd?: number;\n /** Add the end time for the AI accompaniment to the uploaded audio, which must be less than the total duration of the song. */\n underpaintingEnd?: number;\n /** Set the default start time for the AI voice of the uploaded audio to 0. */\n overpaintingStart?: number;\n /** `variation_category` only supports version v5 and above, with only three optional values: `high`, `normal`, `subtle`. */\n variationCategory?: string;\n /** When `action` is `replace_section`, specify the end time (in seconds) of the segment to be replaced. */\n replaceSectionEnd?: number;\n /** Set the default start time for the AI accompaniment added to the uploaded audio, with a default value of 0. */\n underpaintingStart?: number;\n /** When `action` is `replace_section`, specify the start time (in seconds) of the segment to be replaced. */\n replaceSectionStart?: number;\n /** Submit asynchronously and poll. Defaults to true. */\n async?: boolean;\n /** Wait for completion before returning the handle. */\n wait?: boolean;\n pollInterval?: number;\n maxWait?: number;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\nexport interface SunoPersonaOptions {\n /** Names of singer styles. */\n name: string;\n /** Used to create generated song IDs in the style of the singer. */\n audioId: string;\n /** The end time of the vocal segment in the audio (seconds). */\n vocalEnd?: number;\n /** A textual description of the singer's style. */\n description?: string;\n /** The starting time (in seconds) of the vocal segment in the audio. */\n vocalStart?: number;\n /** Used to generate audio IDs in the style of new singers (vocal reference audio). */\n voxAudioId?: string;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\nexport interface SunoMp4Options {\n /** Used to obtain the song ID for the corresponding MP4 of the song. */\n audioId: string;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\nexport interface SunoVoicesOptions {\n /** Publicly accessible URL for audio files used to create sound. Must be in MP3 or WAV format, at least 10 seconds long, and must contain clear human voice of a single speaker, without background noise or background music. */\n audioUrl: string;\n /** Custom voice personality name. */\n name?: string;\n /** Description information for custom voice personality. */\n description?: string;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\nexport interface SunoTimingOptions {\n /** Need to obtain the audio ID for timing/caption data, which is the generated Suno song ID. */\n audioId: string;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\nexport interface SunoVoxOptions {\n /** The source audio ID used to extract human voice, which is the unique identifier of the Suno audio segment to be processed. */\n audioId: string;\n /** End time point for vocal extraction (unit: seconds). */\n vocalEnd?: number;\n /** The starting time point for vocal extraction (unit: seconds). */\n vocalStart?: number;\n /** Submit asynchronously and poll. Defaults to true. */\n async?: boolean;\n /** Wait for completion before returning the handle. */\n wait?: boolean;\n pollInterval?: number;\n maxWait?: number;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\nexport interface SunoWavOptions {\n /** Used to obtain the existing audio ID of WAV format audio. */\n audioId: string;\n /** Submit asynchronously and poll. Defaults to true. */\n async?: boolean;\n /** Wait for completion before returning the handle. */\n wait?: boolean;\n pollInterval?: number;\n maxWait?: number;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\nexport interface SunoMidiOptions {\n /** The source audio ID for generating MIDI will extract MIDI content based on the existing audio. */\n audioId: string;\n /** Submit asynchronously and poll. Defaults to true. */\n async?: boolean;\n /** Wait for completion before returning the handle. */\n wait?: boolean;\n pollInterval?: number;\n maxWait?: number;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\nexport interface SunoStyleOptions {\n /** Style prompts that need optimization. */\n prompt: string;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\nexport interface SunoLyricsOptions {\n /** The model used for generating lyrics has a default value of `default`, with optional values including `default` and `remi-v1`. */\n model: \"default\" | \"remi-v1\";\n /** Prompts for generating lyrics, describing the desired theme or style of the lyrics. */\n prompt: Record<string, unknown>;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\nexport interface SunoMashupLyricsOptions {\n /** The first paragraph of lyrics content used for mixed generation. */\n lyricsA: string;\n /** The content of the second verse for mixed-generated lyrics. */\n lyricsB: string;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\nexport interface SunoUploadOptions {\n /** The CDN address (URL) for the custom audio file to be uploaded. */\n audioUrl: string;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\n/** suno client. */\nexport class Suno {\n constructor(private transport: Transport) {}\n\n /** Suno AI music generation API, generates 2 songs per request with extension support. */\n async generate(options: SunoGenerateOptions = {}): Promise<TaskHandle> {\n const body: Record<string, unknown> = {};\n if (options.lyric !== undefined) body[\"lyric\"] = options.lyric;\n body[\"model\"] = options.model ?? \"chirp-v5-5\";\n if (options.style !== undefined) body[\"style\"] = options.style;\n if (options.title !== undefined) body[\"title\"] = options.title;\n body[\"action\"] = options.action ?? \"generate\";\n if (options.custom !== undefined) body[\"custom\"] = options.custom;\n body[\"prompt\"] = options.prompt ?? \"A song for Christmas\";\n if (options.audioId !== undefined) body[\"audio_id\"] = options.audioId;\n if (options.weirdness !== undefined) body[\"weirdness\"] = options.weirdness;\n body[\"audio_urls\"] = options.audioUrls ?? [\"https://cdn1.suno.ai/b481b17a-bf50-4e10-8adc-4d5635050893.mp3\"];\n if (options.personaId !== undefined) body[\"persona_id\"] = options.personaId;\n if (options.continueAt !== undefined) body[\"continue_at\"] = options.continueAt;\n if (options.samplesEnd !== undefined) body[\"samples_end\"] = options.samplesEnd;\n if (options.audioWeight !== undefined) body[\"audio_weight\"] = options.audioWeight;\n if (options.instrumental !== undefined) body[\"instrumental\"] = options.instrumental;\n if (options.lyricPrompt !== undefined) body[\"lyric_prompt\"] = options.lyricPrompt;\n if (options.vocalGender !== undefined) body[\"vocal_gender\"] = options.vocalGender;\n if (options.samplesStart !== undefined) body[\"samples_start\"] = options.samplesStart;\n if (options.styleNegative !== undefined) body[\"style_negative\"] = options.styleNegative;\n if (options.styleInfluence !== undefined) body[\"style_influence\"] = options.styleInfluence;\n if (options.mashupAudioIds !== undefined) body[\"mashup_audio_ids\"] = options.mashupAudioIds;\n if (options.overpaintingEnd !== undefined) body[\"overpainting_end\"] = options.overpaintingEnd;\n if (options.underpaintingEnd !== undefined) body[\"underpainting_end\"] = options.underpaintingEnd;\n if (options.overpaintingStart !== undefined) body[\"overpainting_start\"] = options.overpaintingStart;\n if (options.variationCategory !== undefined) body[\"variation_category\"] = options.variationCategory;\n if (options.replaceSectionEnd !== undefined) body[\"replace_section_end\"] = options.replaceSectionEnd;\n if (options.underpaintingStart !== undefined) body[\"underpainting_start\"] = options.underpaintingStart;\n if (options.replaceSectionStart !== undefined) body[\"replace_section_start\"] = options.replaceSectionStart;\n for (const [key, value] of Object.entries(options)) {\n if (![\"action\", \"async\", \"audioId\", \"audioUrls\", \"audioWeight\", \"callbackUrl\", \"continueAt\", \"custom\", \"instrumental\", \"lyric\", \"lyricPrompt\", \"mashupAudioIds\", \"maxWait\", \"model\", \"overpaintingEnd\", \"overpaintingStart\", \"personaId\", \"pollInterval\", \"prompt\", \"replaceSectionEnd\", \"replaceSectionStart\", \"samplesEnd\", \"samplesStart\", \"style\", \"styleInfluence\", \"styleNegative\", \"title\", \"underpaintingEnd\", \"underpaintingStart\", \"variationCategory\", \"vocalGender\", \"wait\", \"weirdness\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n body.async = options.async ?? true;\n const result = (await this.transport.request('POST', \"/suno/audios\", { json: body })) as Record<string, unknown>;\n const handle = new TaskHandle(taskId(result), \"/suno/tasks\", this.transport, result);\n if (options.wait) {\n await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });\n }\n return handle;\n }\n\n /** Suno singer style API, set song style based on a generated song ID. */\n async persona(options: SunoPersonaOptions): Promise<Record<string, unknown>> {\n const body: Record<string, unknown> = {};\n body[\"name\"] = options.name;\n body[\"audio_id\"] = options.audioId;\n if (options.vocalEnd !== undefined) body[\"vocal_end\"] = options.vocalEnd;\n if (options.description !== undefined) body[\"description\"] = options.description;\n if (options.vocalStart !== undefined) body[\"vocal_start\"] = options.vocalStart;\n if (options.voxAudioId !== undefined) body[\"vox_audio_id\"] = options.voxAudioId;\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"audioId\", \"callbackUrl\", \"description\", \"maxWait\", \"name\", \"pollInterval\", \"vocalEnd\", \"vocalStart\", \"voxAudioId\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n return (await this.transport.request('POST', \"/suno/persona\", { json: body })) as Record<string, unknown>;\n }\n\n /** Suno MP4 API, get MP4 file link via audio_id. */\n async mp4(options: SunoMp4Options): Promise<Record<string, unknown>> {\n const body: Record<string, unknown> = {};\n body[\"audio_id\"] = options.audioId;\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"audioId\", \"callbackUrl\", \"maxWait\", \"pollInterval\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n return (await this.transport.request('POST', \"/suno/mp4\", { json: body })) as Record<string, unknown>;\n }\n\n /** Suno Voice Clone API. Create a custom voice persona from an uploaded audio file for voice cloning in music generation. */\n async voices(options: SunoVoicesOptions): Promise<Record<string, unknown>> {\n const body: Record<string, unknown> = {};\n body[\"audio_url\"] = options.audioUrl;\n if (options.name !== undefined) body[\"name\"] = options.name;\n if (options.description !== undefined) body[\"description\"] = options.description;\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"audioUrl\", \"callbackUrl\", \"description\", \"maxWait\", \"name\", \"pollInterval\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n return (await this.transport.request('POST', \"/suno/voices\", { json: body })) as Record<string, unknown>;\n }\n\n /** Suno timeline API, get lyrics and audio timeline of generated music. */\n async timing(options: SunoTimingOptions): Promise<Record<string, unknown>> {\n const body: Record<string, unknown> = {};\n body[\"audio_id\"] = options.audioId;\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"audioId\", \"callbackUrl\", \"maxWait\", \"pollInterval\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n return (await this.transport.request('POST', \"/suno/timing\", { json: body })) as Record<string, unknown>;\n }\n\n /** Suno vocal/instrumental stems API. Pass an audio_id to asynchronously produce vocal-only and instrumental-only stem files for remixing and creative reuse. */\n async vox(options: SunoVoxOptions): Promise<TaskHandle> {\n const body: Record<string, unknown> = {};\n body[\"audio_id\"] = options.audioId;\n if (options.vocalEnd !== undefined) body[\"vocal_end\"] = options.vocalEnd;\n if (options.vocalStart !== undefined) body[\"vocal_start\"] = options.vocalStart;\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"audioId\", \"callbackUrl\", \"maxWait\", \"pollInterval\", \"vocalEnd\", \"vocalStart\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n body.async = options.async ?? true;\n const result = (await this.transport.request('POST', \"/suno/vox\", { json: body })) as Record<string, unknown>;\n const handle = new TaskHandle(taskId(result), \"/suno/tasks\", this.transport, result);\n if (options.wait) {\n await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });\n }\n return handle;\n }\n\n /** SUNO allows generating higher quality wav files based on the existing audio_id. */\n async wav(options: SunoWavOptions): Promise<TaskHandle> {\n const body: Record<string, unknown> = {};\n body[\"audio_id\"] = options.audioId;\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"audioId\", \"callbackUrl\", \"maxWait\", \"pollInterval\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n body.async = options.async ?? true;\n const result = (await this.transport.request('POST', \"/suno/wav\", { json: body })) as Record<string, unknown>;\n const handle = new TaskHandle(taskId(result), \"/suno/tasks\", this.transport, result);\n if (options.wait) {\n await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });\n }\n return handle;\n }\n\n /** Suno MIDI API, retrieve MIDI data from generated music. */\n async midi(options: SunoMidiOptions): Promise<TaskHandle> {\n const body: Record<string, unknown> = {};\n body[\"audio_id\"] = options.audioId;\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"audioId\", \"callbackUrl\", \"maxWait\", \"pollInterval\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n body.async = options.async ?? true;\n const result = (await this.transport.request('POST', \"/suno/midi\", { json: body })) as Record<string, unknown>;\n const handle = new TaskHandle(taskId(result), \"/suno/tasks\", this.transport, result);\n if (options.wait) {\n await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });\n }\n return handle;\n }\n\n /** SUNO allows us to input prompts to generate enhanced song styles. */\n async style(options: SunoStyleOptions): Promise<Record<string, unknown>> {\n const body: Record<string, unknown> = {};\n body[\"prompt\"] = options.prompt;\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"callbackUrl\", \"maxWait\", \"pollInterval\", \"prompt\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n return (await this.transport.request('POST', \"/suno/style\", { json: body })) as Record<string, unknown>;\n }\n\n /** Suno lyrics generation API. Generates structured song lyrics from a prompt; supports the default and remi-v1 models. */\n async lyrics(options: SunoLyricsOptions): Promise<Record<string, unknown>> {\n const body: Record<string, unknown> = {};\n body[\"model\"] = options.model;\n body[\"prompt\"] = options.prompt;\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"callbackUrl\", \"maxWait\", \"model\", \"pollInterval\", \"prompt\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n return (await this.transport.request('POST', \"/suno/lyrics\", { json: body })) as Record<string, unknown>;\n }\n\n /** Suno mashup lyrics API, merge two lyrics into a blended version. */\n async mashup_lyrics(options: SunoMashupLyricsOptions): Promise<Record<string, unknown>> {\n const body: Record<string, unknown> = {};\n body[\"lyrics_a\"] = options.lyricsA;\n body[\"lyrics_b\"] = options.lyricsB;\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"callbackUrl\", \"lyricsA\", \"lyricsB\", \"maxWait\", \"pollInterval\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n return (await this.transport.request('POST', \"/suno/mashup-lyrics\", { json: body })) as Record<string, unknown>;\n }\n\n /** Suno reference audio upload API, upload audio to get an audio_id for extended generation. */\n async upload(options: SunoUploadOptions): Promise<Record<string, unknown>> {\n const body: Record<string, unknown> = {};\n body[\"audio_url\"] = options.audioUrl;\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"audioUrl\", \"callbackUrl\", \"maxWait\", \"pollInterval\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n return (await this.transport.request('POST', \"/suno/upload\", { json: body })) as Record<string, unknown>;\n }\n\n}\n","/**\n * Wan (wan) — generated from the platform OpenAPI spec.\n *\n * Do not edit by hand: run `python scripts/generate_providers.py`. Parameter\n * names, types, enums and required-ness all come from the live spec.\n */\n\nimport { Transport } from '../../runtime/transport';\nimport { TaskHandle } from '../../runtime/tasks';\n\n\nfunction taskId(result: Record<string, unknown>): string {\n if (typeof result?.task_id === 'string') return result.task_id;\n const data = result?.data as Record<string, unknown> | undefined;\n if (data && typeof data.task_id === 'string') return data.task_id;\n return typeof result?.id === 'string' ? result.id : '';\n}\n\nexport interface WanGenerateOptions {\n /** Models for generating videos include optional values such as `wan2.6-t2v` (text-to-video), `wan2.6-i2v` (image-to-video), `wan2.6-i2v-flash` (fast version of image-to-video), and `wan2.6-r2v` (reference video generation). */\n model: \"wan2.6-i2v\" | \"wan2.6-r2v\" | \"wan2.6-i2v-flash\" | \"wan2.6-t2v\";\n /** Operation types. `text2video` indicates text-to-video, and `image2video` indicates image-to-video. */\n action: \"text2video\" | \"image2video\";\n /** Prompts for generating videos. */\n prompt: string;\n /** Video size specifications. */\n size?: string;\n /** Specify whether the generated video contains sound. */\n audio?: boolean;\n /** Specify the duration of the video to be generated (in seconds), with optional values of `5`, `10`, or `15`. */\n duration?: number;\n /** The URL of the audio file, the model will generate the corresponding video based on that audio. */\n audioUrl?: string;\n /** The URL of the starting frame image, which will serve as the first frame of the generated video. */\n imageUrl?: string;\n /** Specify the type of shots for the video, that is, whether the video consists of a single continuous shot (`single`) or multiple switching shots (`multi`). */\n shotType?: \"single\" | \"multi\";\n /** Specify the resolution level for generating the video, used to adjust the video clarity (total pixel count). The model will automatically scale to a similar total pixel count based on the selected resolution level, and the aspect ratio of the generated video will strive to remain consistent with the aspect ratio of the input image `image_url`. */\n resolution?: \"480P\" | \"720P\" | \"1080P\";\n /** Whether to enable intelligent rewriting of prompts. Once enabled, a large model will be used to intelligently expand the input prompts, which can significantly improve the generation effect of shorter prompts, but will increase processing time. */\n promptExtend?: boolean;\n /** Reverse prompt words, used to describe content that is not desired to appear in the video footage, can be used to limit the video visuals. Supports both Chinese and English, with a length not exceeding 500 characters; any excess will be automatically truncated. */\n negativePrompt?: string;\n /** An array of URLs for reference video files, used to extract the character images (and vocal tones, if any) from the reference videos to generate videos that match the reference features. */\n referenceVideoUrls?: string[];\n /** Submit asynchronously and poll. Defaults to true. */\n async?: boolean;\n /** Wait for completion before returning the handle. */\n wait?: boolean;\n pollInterval?: number;\n maxWait?: number;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\n/** wan client. */\nexport class Wan {\n constructor(private transport: Transport) {}\n\n /** Generate videos based on prompt and image frames */\n async generate(options: WanGenerateOptions): Promise<TaskHandle> {\n const body: Record<string, unknown> = {};\n body[\"model\"] = options.model;\n body[\"action\"] = options.action;\n body[\"prompt\"] = options.prompt;\n if (options.size !== undefined) body[\"size\"] = options.size;\n body[\"audio\"] = options.audio ?? false;\n if (options.duration !== undefined) body[\"duration\"] = options.duration;\n if (options.audioUrl !== undefined) body[\"audio_url\"] = options.audioUrl;\n body[\"image_url\"] = options.imageUrl ?? \"https://cdn.acedata.cloud/r9vsv9.png\";\n if (options.shotType !== undefined) body[\"shot_type\"] = options.shotType;\n if (options.resolution !== undefined) body[\"resolution\"] = options.resolution;\n body[\"prompt_extend\"] = options.promptExtend ?? false;\n body[\"negative_prompt\"] = options.negativePrompt ?? \"Astronauts shuttle from space to volcano\";\n if (options.referenceVideoUrls !== undefined) body[\"reference_video_urls\"] = options.referenceVideoUrls;\n for (const [key, value] of Object.entries(options)) {\n if (![\"action\", \"async\", \"audio\", \"audioUrl\", \"callbackUrl\", \"duration\", \"imageUrl\", \"maxWait\", \"model\", \"negativePrompt\", \"pollInterval\", \"prompt\", \"promptExtend\", \"referenceVideoUrls\", \"resolution\", \"shotType\", \"size\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n body.async = options.async ?? true;\n const result = (await this.transport.request('POST', \"/wan/videos\", { json: body })) as Record<string, unknown>;\n const handle = new TaskHandle(taskId(result), \"/wan/tasks\", this.transport, result);\n if (options.wait) {\n await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });\n }\n return handle;\n }\n\n}\n","/** Provider-axis clients, generated from the platform OpenAPI specs. */\n\nexport { Digitalhuman } from './digitalhuman';\nexport { Dreamina } from './dreamina';\nexport { Fish } from './fish';\nexport { Flux } from './flux';\nexport { Hailuo } from './hailuo';\nexport { Happyhorse } from './happyhorse';\nexport { Localization } from './localization';\nexport { Luma } from './luma';\nexport { Maestro } from './maestro';\nexport { NanoBanana } from './nano-banana';\nexport { Producer } from './producer';\nexport { Seedance } from './seedance';\nexport { Seedream } from './seedream';\nexport { Suno } from './suno';\nexport { Wan } from './wan';\n\nimport { Transport } from '../../runtime/transport';\nimport { Digitalhuman } from './digitalhuman';\nimport { Dreamina } from './dreamina';\nimport { Fish } from './fish';\nimport { Flux } from './flux';\nimport { Hailuo } from './hailuo';\nimport { Happyhorse } from './happyhorse';\nimport { Localization } from './localization';\nimport { Luma } from './luma';\nimport { Maestro } from './maestro';\nimport { NanoBanana } from './nano-banana';\nimport { Producer } from './producer';\nimport { Seedance } from './seedance';\nimport { Seedream } from './seedream';\nimport { Suno } from './suno';\nimport { Wan } from './wan';\n\n/** Bind every generated provider client onto `client`. */\nexport function attachProviders(client: Record<string, unknown>, transport: Transport): void {\n client.digitalhuman = new Digitalhuman(transport);\n client.dreamina = new Dreamina(transport);\n client.fish = new Fish(transport);\n client.flux = new Flux(transport);\n client.hailuo = new Hailuo(transport);\n client.happyhorse = new Happyhorse(transport);\n client.localization = new Localization(transport);\n client.luma = new Luma(transport);\n client.maestro = new Maestro(transport);\n client.nanobanana = new NanoBanana(transport);\n client.producer = new Producer(transport);\n client.seedance = new Seedance(transport);\n client.seedream = new Seedream(transport);\n client.suno = new Suno(transport);\n client.wan = new Wan(transport);\n}\n","/** Top-level AceDataCloud client for TypeScript. */\n\nimport { Transport, TransportOptions } from './runtime/transport';\nimport type { PaymentHandler } from './runtime/payment';\nimport { AiChat } from './resources/aichat';\nimport { Chat } from './resources/chat';\nimport { Images } from './resources/images';\nimport { Audio } from './resources/audio';\nimport { Video } from './resources/video';\nimport { Search } from './resources/search';\nimport { Tasks } from './resources/tasks';\nimport { Files } from './resources/files';\nimport { Platform } from './resources/platform';\nimport { OpenAI } from './resources/openai';\nimport { Glm } from './resources/glm';\nimport { Veo } from './resources/veo';\nimport { Kling } from './resources/kling';\nimport { WebExtrator } from './resources/webextrator';\nimport { Face } from './resources/face';\nimport { ShortUrl } from './resources/shorturl';\nimport { attachProviders } from './resources/providers';\n\nexport interface AceDataCloudOptions {\n apiToken?: string;\n baseURL?: string;\n platformBaseURL?: string;\n timeout?: number;\n maxRetries?: number;\n headers?: Record<string, string>;\n /**\n * Optional payment handler invoked when the API returns `402 Payment\n * Required`. Use `createX402PaymentHandler` from\n * `@acedatacloud/x402-client` to enable on-chain payments via X402.\n */\n paymentHandler?: PaymentHandler;\n}\n\nexport class AceDataCloud {\n readonly aichat: AiChat;\n readonly chat: Chat;\n readonly images: Images;\n readonly audio: Audio;\n readonly video: Video;\n readonly search: Search;\n readonly tasks: Tasks;\n readonly files: Files;\n readonly platform: Platform;\n readonly openai: OpenAI;\n readonly glm: Glm;\n readonly veo: Veo;\n readonly kling: Kling;\n readonly webextrator: WebExtrator;\n readonly face: Face;\n readonly shorturl: ShortUrl;\n\n private transport: Transport;\n\n constructor(opts: AceDataCloudOptions = {}) {\n this.transport = new Transport({\n apiToken: opts.apiToken,\n baseURL: opts.baseURL,\n platformBaseURL: opts.platformBaseURL,\n timeout: opts.timeout,\n maxRetries: opts.maxRetries,\n headers: opts.headers,\n paymentHandler: opts.paymentHandler,\n });\n\n this.aichat = new AiChat(this.transport);\n this.chat = new Chat(this.transport);\n this.images = new Images(this.transport);\n this.audio = new Audio(this.transport);\n this.video = new Video(this.transport);\n this.search = new Search(this.transport);\n this.tasks = new Tasks(this.transport);\n this.files = new Files(this.transport);\n this.platform = new Platform(this.transport);\n this.openai = new OpenAI(this.transport);\n this.glm = new Glm(this.transport);\n this.veo = new Veo(this.transport);\n this.kling = new Kling(this.transport);\n this.webextrator = new WebExtrator(this.transport);\n this.face = new Face(this.transport);\n this.shorturl = new ShortUrl(this.transport);\n // Provider axis: one namespace per service, generated from the specs.\n attachProviders(this as unknown as Record<string, unknown>, this.transport);\n }\n}\n"],"mappings":";AAEO,IAAM,oBAAN,cAAgC,MAAM;AAAA,EAC3C,YAAY,SAAiB;AAC3B,UAAM,OAAO;AACb,SAAK,OAAO;AAAA,EACd;AACF;AAEO,IAAM,iBAAN,cAA6B,kBAAkB;AAAA,EACpD,YAAY,SAAiB;AAC3B,UAAM,OAAO;AACb,SAAK,OAAO;AAAA,EACd;AACF;AAEO,IAAM,WAAN,cAAuB,kBAAkB;AAAA,EAC9C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA,YAAY,MAMT;AACD,UAAM,KAAK,OAAO;AAClB,SAAK,OAAO;AACZ,SAAK,aAAa,KAAK;AACvB,SAAK,OAAO,KAAK;AACjB,SA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A;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAED;AAAA,EAER,YAAY,OAA4B,CAAC,GAAG;AAC1C,SAAK,YAAY,IAAI,UAAU;AAAA,MAC7B,UAAU,KAAK;AAAA,MACf,SAAS,KAAK;AAAA,MACd,iBAAiB,KAAK;AAAA,MACtB,SAAS,KAAK;AAAA,MACd,YAAY,KAAK;AAAA,MACjB,SAAS,KAAK;AAAA,MACd,gBAAgB,KAAK;AAAA,IACvB,CAAC;AAED,SAAK,SAAS,IAAI,OAAO,KAAK,SAAS;AACvC,SAAK,OAAO,IAAI,KAAK,KAAK,SAAS;AACnC,SAAK,SAAS,IAAI,OAAO,KAAK,SAAS;AACvC,SAAK,QAAQ,IAAI,MAAM,KAAK,SAAS;AACrC,SAAK,QAAQ,IAAI,MAAM,KAAK,SAAS;AACrC,SAAK,SAAS,IAAI,OAAO,KAAK,SAAS;AACvC,SAAK,QAAQ,IAAI,MAAM,KAAK,SAAS;AACrC,SAAK,QAAQ,IAAI,MAAM,KAAK,SAAS;AACrC,SAAK,WAAW,IAAI,SAAS,KAAK,SAAS;AAC3C,SAAK,SAAS,IAAI,OAAO,KAAK,SAAS;AACvC,SAAK,MAAM,IAAI,IAAI,KAAK,SAAS;AACjC,SAAK,MAAM,IAAI,IAAI,KAAK,SAAS;AACjC,SAAK,QAAQ,IAAI,MAAM,KAAK,SAAS;AACrC,SAAK,cAAc,IAAI,YAAY,KAAK,SAAS;AACjD,SAAK,OAAO,IAAI,KAAK,KAAK,SAAS;AACnC,SAAK,WAAW,IAAI,SAAS,KAAK,SAAS;AAE3C,oBAAgB,MAA4C,KAAK,SAAS;AAAA,EAC5E;AACF;","names":["path","taskId","taskId","taskId","taskId","taskId","Images","Tasks","Completions","ChatNamespace","taskId","taskId","taskId","taskId","taskId","taskId","taskId","taskId","taskId","taskId","taskId","taskId"]}
|
|
1
|
+
{"version":3,"sources":["../src/runtime/errors.ts","../src/runtime/transport.ts","../src/resources/aichat.ts","../src/resources/chat.ts","../src/runtime/tasks.ts","../src/resources/images.ts","../src/resources/audio.ts","../src/resources/video.ts","../src/resources/search.ts","../src/resources/tasks.ts","../src/resources/files.ts","../src/resources/platform.ts","../src/resources/openai.ts","../src/resources/glm.ts","../src/resources/veo.ts","../src/resources/kling.ts","../src/resources/webextrator.ts","../src/resources/face.ts","../src/resources/shorturl.ts","../src/resources/providers/digitalhuman.ts","../src/resources/providers/dreamina.ts","../src/resources/providers/fish.ts","../src/resources/providers/flux.ts","../src/resources/providers/hailuo.ts","../src/resources/providers/happyhorse.ts","../src/resources/providers/localization.ts","../src/resources/providers/luma.ts","../src/resources/providers/maestro.ts","../src/resources/providers/nano-banana.ts","../src/resources/providers/producer.ts","../src/resources/providers/seedance.ts","../src/resources/providers/seedream.ts","../src/resources/providers/suno.ts","../src/resources/providers/wan.ts","../src/resources/providers/index.ts","../src/client.ts"],"sourcesContent":["/** AceDataCloud SDK errors. */\n\nexport class AceDataCloudError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'AceDataCloudError';\n }\n}\n\nexport class TransportError extends AceDataCloudError {\n constructor(message: string) {\n super(message);\n this.name = 'TransportError';\n }\n}\n\nexport class APIError extends AceDataCloudError {\n statusCode: number;\n code: string;\n traceId?: string;\n body: Record<string, unknown>;\n\n constructor(opts: {\n message: string;\n statusCode: number;\n code: string;\n traceId?: string;\n body?: Record<string, unknown>;\n }) {\n super(opts.message);\n this.name = 'APIError';\n this.statusCode = opts.statusCode;\n this.code = opts.code;\n this.traceId = opts.traceId;\n this.body = opts.body ?? {};\n }\n}\n\nexport class AuthenticationError extends APIError {\n constructor(opts: ConstructorParameters<typeof APIError>[0]) {\n super(opts);\n this.name = 'AuthenticationError';\n }\n}\n\nexport class TokenMismatchError extends APIError {\n constructor(opts: ConstructorParameters<typeof APIError>[0]) {\n super(opts);\n this.name = 'TokenMismatchError';\n }\n}\n\nexport class RateLimitError extends APIError {\n constructor(opts: ConstructorParameters<typeof APIError>[0]) {\n super(opts);\n this.name = 'RateLimitError';\n }\n}\n\nexport class ValidationError extends APIError {\n constructor(opts: ConstructorParameters<typeof APIError>[0]) {\n super(opts);\n this.name = 'ValidationError';\n }\n}\n\nexport class InsufficientBalanceError extends APIError {\n constructor(opts: ConstructorParameters<typeof APIError>[0]) {\n super(opts);\n this.name = 'InsufficientBalanceError';\n }\n}\n\nexport class ResourceDisabledError extends APIError {\n constructor(opts: ConstructorParameters<typeof APIError>[0]) {\n super(opts);\n this.name = 'ResourceDisabledError';\n }\n}\n\nexport class ModerationError extends APIError {\n constructor(opts: ConstructorParameters<typeof APIError>[0]) {\n super(opts);\n this.name = 'ModerationError';\n }\n}\n\nexport class TimeoutError extends APIError {\n constructor(opts: ConstructorParameters<typeof APIError>[0]) {\n super(opts);\n this.name = 'TimeoutError';\n }\n}\n","/** HTTP transport for AceDataCloud SDK. Uses native fetch (Node 18+). */\n\nimport {\n APIError,\n AuthenticationError,\n InsufficientBalanceError,\n ModerationError,\n RateLimitError,\n ResourceDisabledError,\n TimeoutError,\n TokenMismatchError,\n TransportError,\n ValidationError,\n} from './errors';\nimport type {\n PaymentHandler,\n PaymentRequiredBody,\n} from './payment';\n\nfunction parsePaymentRequired(resp: Response, text: string): PaymentRequiredBody {\n const encoded = resp.headers.get('PAYMENT-REQUIRED');\n if (encoded) {\n try {\n return JSON.parse(atob(encoded)) as PaymentRequiredBody;\n } catch {\n throw mapError(402, {\n error: { code: 'invalid_402', message: 'Invalid PAYMENT-REQUIRED header' },\n });\n }\n }\n try {\n return JSON.parse(text) as PaymentRequiredBody;\n } catch {\n throw mapError(402, { error: { code: 'invalid_402', message: text } });\n }\n}\n\nconst ERROR_CODE_MAP: Record<string, typeof APIError> = {\n invalid_token: AuthenticationError,\n token_expired: AuthenticationError,\n no_token: AuthenticationError,\n token_mismatched: TokenMismatchError,\n used_up: InsufficientBalanceError,\n disabled: ResourceDisabledError,\n too_many_requests: RateLimitError,\n bad_request: ValidationError,\n};\n\nconst RETRY_STATUS_CODES = new Set([408, 409, 429, 500, 502, 503, 504]);\n\nexport function mapError(statusCode: number, body: Record<string, unknown>): APIError {\n // The server occasionally returns ``error`` as a bare string (e.g. x402\n // facilitator diagnostics) or omits/nulls it entirely. Normalize to an\n // object so downstream property access is always safe and the message\n // is preserved verbatim.\n let errorData: Record<string, unknown>;\n if (typeof body.error === 'string') {\n errorData = { message: body.error };\n } else if (body.error && typeof body.error === 'object' && !Array.isArray(body.error)) {\n errorData = body.error as Record<string, unknown>;\n } else {\n errorData = {};\n }\n const code = (errorData.code ?? '') as string;\n const message = (errorData.message ?? '') as string;\n const traceId = body.trace_id as string | undefined;\n\n let ErrorClass = ERROR_CODE_MAP[code];\n if (!ErrorClass) {\n if (statusCode === 403) ErrorClass = ModerationError;\n else if (statusCode === 401) ErrorClass = AuthenticationError;\n else if (statusCode === 429) ErrorClass = RateLimitError;\n else if (statusCode === 400) ErrorClass = ValidationError;\n else ErrorClass = APIError;\n }\n\n return new ErrorClass({ message, statusCode, code, traceId, body });\n}\n\nfunction backoffDelay(attempt: number): number {\n const base = Math.min(2 ** attempt, 8);\n return base + Math.random() * 0.5;\n}\n\nfunction sleep(ms: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n\nfunction isAbortError(error: unknown): boolean {\n return typeof error === 'object' && error !== null && 'name' in error && error.name === 'AbortError';\n}\n\nfunction timeoutError(error: unknown): TimeoutError {\n return new TimeoutError({\n message: `Request timed out${error instanceof Error && error.message ? `: ${error.message}` : ''}`,\n statusCode: 0,\n code: 'timeout',\n });\n}\n\nexport interface TransportOptions {\n apiToken?: string;\n baseURL?: string;\n platformBaseURL?: string;\n timeout?: number;\n maxRetries?: number;\n headers?: Record<string, string>;\n /**\n * Optional handler invoked when a request returns `402 Payment Required`.\n * The handler receives the parsed `accepts` list and must return the extra\n * headers (typically `X-Payment`) to attach to the automatic retry.\n *\n * See `@acedatacloud/x402-client` for a drop-in implementation.\n */\n paymentHandler?: PaymentHandler;\n}\n\nexport class Transport {\n private baseURL: string;\n private platformBaseURL: string;\n private timeout: number;\n private maxRetries: number;\n private headers: Record<string, string>;\n private paymentHandler?: PaymentHandler;\n\n constructor(opts: TransportOptions = {}) {\n const token = opts.apiToken ?? process.env.ACEDATACLOUD_API_TOKEN ?? '';\n if (!token && !opts.paymentHandler) {\n throw new AuthenticationError({\n message:\n 'apiToken is required (or provide a paymentHandler, e.g. from @acedatacloud/x402-client). ' +\n 'Pass it to the client or set ACEDATACLOUD_API_TOKEN.',\n statusCode: 0,\n code: 'no_token',\n });\n }\n this.baseURL = (opts.baseURL ?? 'https://x402.acedata.cloud').replace(/\\/+$/, '');\n this.platformBaseURL = (opts.platformBaseURL ?? 'https://platform.acedata.cloud').replace(/\\/+$/, '');\n this.timeout = opts.timeout ?? 300_000;\n this.maxRetries = opts.maxRetries ?? 2;\n this.paymentHandler = opts.paymentHandler;\n const baseHeaders: Record<string, string> = {\n accept: 'application/json',\n 'content-type': 'application/json',\n 'user-agent': 'acedatacloud-node/0.1.0',\n ...(opts.headers ?? {}),\n };\n if (token) {\n baseHeaders.authorization = `Bearer ${token}`;\n }\n this.headers = baseHeaders;\n }\n\n async request(\n method: string,\n path: string,\n opts: {\n json?: Record<string, unknown>;\n params?: Record<string, string>;\n platform?: boolean;\n timeout?: number;\n headers?: Record<string, string>;\n } = {}\n ): Promise<Record<string, unknown>> {\n const base = opts.platform ? this.platformBaseURL : this.baseURL;\n let url = `${base}${path}`;\n if (opts.params) {\n const qs = new URLSearchParams(opts.params).toString();\n url += `?${qs}`;\n }\n const headers = { ...this.headers, ...(opts.headers ?? {}) };\n const timeoutMs = opts.timeout ?? this.timeout;\n\n let lastError: Error | null = null;\n let paymentAttempted = false;\n let extraHeaders: Record<string, string> = {};\n let attempt = 0;\n while (true) {\n const controller = new AbortController();\n const timer = setTimeout(() => controller.abort(), timeoutMs);\n try {\n const resp = await fetch(url, {\n method,\n headers: { ...headers, ...extraHeaders },\n body: opts.json ? JSON.stringify(opts.json) : undefined,\n signal: controller.signal,\n });\n clearTimeout(timer);\n\n if (resp.status === 402 && this.paymentHandler && !paymentAttempted) {\n const text = await resp.text();\n const body = parsePaymentRequired(resp, text);\n if (\n !body ||\n typeof body !== 'object' ||\n !Array.isArray((body as PaymentRequiredBody).accepts) ||\n !(body as PaymentRequiredBody).accepts.length ||\n !(body as PaymentRequiredBody).accepts.every(\n (requirement) => requirement !== null && typeof requirement === 'object'\n )\n ) {\n throw mapError(402, { error: { code: 'invalid_402', message: 'No payment requirements' } });\n }\n const paymentRequired = body as PaymentRequiredBody;\n const result = await this.paymentHandler({\n url,\n method,\n body: opts.json,\n accepts: paymentRequired.accepts,\n });\n extraHeaders = { ...extraHeaders, ...result.headers };\n paymentAttempted = true;\n continue;\n }\n\n if (resp.status >= 400) {\n const text = await resp.text();\n let body: Record<string, unknown>;\n try {\n body = JSON.parse(text) as Record<string, unknown>;\n } catch {\n body = { error: { code: 'unknown', message: text } };\n }\n if (!paymentAttempted && RETRY_STATUS_CODES.has(resp.status) && attempt < this.maxRetries) {\n await sleep(backoffDelay(attempt) * 1000);\n attempt += 1;\n continue;\n }\n throw mapError(resp.status, body);\n }\n\n return (await resp.json()) as Record<string, unknown>;\n } catch (err) {\n clearTimeout(timer);\n if (err instanceof APIError) throw err;\n if (isAbortError(err)) {\n lastError = timeoutError(err);\n } else {\n lastError = err as Error;\n }\n if (!paymentAttempted && attempt < this.maxRetries) {\n await sleep(backoffDelay(attempt) * 1000);\n attempt += 1;\n continue;\n }\n throw lastError;\n }\n }\n }\n\n async *requestStream(\n method: string,\n path: string,\n opts: { json?: Record<string, unknown>; timeout?: number } = {}\n ): AsyncGenerator<string, void, unknown> {\n const url = `${this.baseURL}${path}`;\n const headers = { ...this.headers, accept: 'text/event-stream' };\n let paymentAttempted = false;\n let extraHeaders: Record<string, string> = {};\n\n while (true) {\n const controller = new AbortController();\n const timeoutMs = opts.timeout ?? this.timeout;\n const connectionTimer = setTimeout(() => controller.abort(), timeoutMs);\n try {\n let resp: Response;\n try {\n resp = await fetch(url, {\n method,\n headers: { ...headers, ...extraHeaders },\n body: opts.json ? JSON.stringify(opts.json) : undefined,\n signal: controller.signal,\n });\n } catch (error) {\n if (isAbortError(error)) throw timeoutError(error);\n throw error;\n } finally {\n clearTimeout(connectionTimer);\n }\n\n if (resp.status === 402 && this.paymentHandler && !paymentAttempted) {\n const text = await resp.text();\n const body = parsePaymentRequired(resp, text);\n if (\n !body ||\n typeof body !== 'object' ||\n !Array.isArray((body as PaymentRequiredBody).accepts) ||\n !(body as PaymentRequiredBody).accepts.length ||\n !(body as PaymentRequiredBody).accepts.every(\n (requirement) => requirement !== null && typeof requirement === 'object'\n )\n ) {\n throw mapError(402, { error: { code: 'invalid_402', message: 'No payment requirements' } });\n }\n const paymentRequired = body as PaymentRequiredBody;\n const result = await this.paymentHandler({\n url,\n method,\n body: opts.json,\n accepts: paymentRequired.accepts,\n });\n extraHeaders = { ...extraHeaders, ...result.headers };\n paymentAttempted = true;\n continue;\n }\n\n if (resp.status >= 400) {\n const text = await resp.text();\n let body: Record<string, unknown>;\n try {\n body = JSON.parse(text) as Record<string, unknown>;\n } catch {\n body = { error: { code: 'unknown', message: text } };\n }\n throw mapError(resp.status, body);\n }\n\n if (!resp.body) throw new TransportError('No response body for stream');\n\n const reader = resp.body.getReader();\n const decoder = new TextDecoder();\n let buffer = '';\n\n try {\n while (true) {\n const idleTimer = setTimeout(() => controller.abort(), timeoutMs);\n let result: Awaited<ReturnType<typeof reader.read>>;\n try {\n result = await reader.read();\n } catch (error) {\n if (isAbortError(error)) throw timeoutError(error);\n throw error;\n } finally {\n clearTimeout(idleTimer);\n }\n const { done, value } = result;\n if (done) break;\n buffer += decoder.decode(value, { stream: true });\n\n const lines = buffer.split('\\n');\n buffer = lines.pop() ?? '';\n\n for (const line of lines) {\n if (line.startsWith('data: ')) {\n const data = line.slice(6);\n if (data === '[DONE]') return;\n yield data;\n }\n }\n }\n } finally {\n try {\n await reader.cancel();\n } catch {\n // Preserve the original stream error, especially SDK TimeoutError.\n }\n }\n return;\n } finally {\n clearTimeout(connectionTimer);\n }\n }\n }\n\n async upload(\n path: string,\n fileData: Buffer | Uint8Array,\n filename: string,\n opts: { timeout?: number } = {}\n ): Promise<Record<string, unknown>> {\n const url = `${this.platformBaseURL}${path}`;\n const boundary = `----AceDataCloudBoundary${Date.now()}`;\n const headers = {\n ...this.headers,\n 'content-type': `multipart/form-data; boundary=${boundary}`,\n };\n delete (headers as Record<string, string>)['content-type'];\n\n const body = new FormData();\n body.append('file', new Blob([fileData]), filename);\n\n const authHeaders: Record<string, string> = {\n authorization: this.headers.authorization,\n 'user-agent': this.headers['user-agent'],\n };\n\n const controller = new AbortController();\n const timer = setTimeout(() => controller.abort(), opts.timeout ?? this.timeout);\n try {\n let resp: Response;\n try {\n resp = await fetch(url, {\n method: 'POST',\n headers: authHeaders,\n body,\n signal: controller.signal,\n });\n } catch (error) {\n if (isAbortError(error)) throw timeoutError(error);\n throw error;\n }\n clearTimeout(timer);\n\n if (resp.status >= 400) {\n const text = await resp.text();\n let respBody: Record<string, unknown>;\n try {\n respBody = JSON.parse(text) as Record<string, unknown>;\n } catch {\n respBody = { error: { code: 'unknown', message: text } };\n }\n throw mapError(resp.status, respBody);\n }\n return (await resp.json()) as Record<string, unknown>;\n } finally {\n clearTimeout(timer);\n }\n }\n}\n","/** AI Chat resources — aichat/conversations endpoint. */\n\nimport { Transport } from '../runtime/transport';\n\nexport type AiChatModel =\n | 'gpt-5.5'\n | 'gpt-5.5-pro'\n | 'gpt-5.4'\n | 'gpt-5.4-pro'\n | 'gpt-5.2'\n | 'gpt-5.1'\n | 'gpt-5.1-all'\n | 'gpt-5'\n | 'gpt-5-mini'\n | 'gpt-5-nano'\n | 'gpt-5-all'\n | 'gpt-4'\n | 'gpt-4-all'\n | 'gpt-4-turbo'\n | 'gpt-4-turbo-preview'\n | 'gpt-4-vision-preview'\n | 'gpt-4.1'\n | 'gpt-4.1-2025-04-14'\n | 'gpt-4.1-mini'\n | 'gpt-4.1-mini-2025-04-14'\n | 'gpt-4.1-nano'\n | 'gpt-4.1-nano-2025-04-14'\n | 'gpt-4.5-preview'\n | 'gpt-4.5-preview-2025-02-27'\n | 'gpt-4o'\n | 'gpt-4o-2024-05-13'\n | 'gpt-4o-2024-08-06'\n | 'gpt-4o-2024-11-20'\n | 'gpt-4o-all'\n | 'gpt-4o-image'\n | 'gpt-4o-mini'\n | 'gpt-4o-mini-2024-07-18'\n | 'gpt-4o-mini-search-preview'\n | 'gpt-4o-mini-search-preview-2025-03-11'\n | 'gpt-4o-search-preview'\n | 'gpt-4o-search-preview-2025-03-11'\n | 'o1'\n | 'o1-2024-12-17'\n | 'o1-all'\n | 'o1-mini'\n | 'o1-mini-2024-09-12'\n | 'o1-mini-all'\n | 'o1-preview'\n | 'o1-preview-2024-09-12'\n | 'o1-preview-all'\n | 'o1-pro'\n | 'o1-pro-2025-03-19'\n | 'o1-pro-all'\n | 'o3'\n | 'o3-2025-04-16'\n | 'o3-all'\n | 'o3-mini'\n | 'o3-mini-2025-01-31'\n | 'o3-mini-2025-01-31-high'\n | 'o3-mini-2025-01-31-low'\n | 'o3-mini-2025-01-31-medium'\n | 'o3-mini-all'\n | 'o3-mini-high'\n | 'o3-mini-high-all'\n | 'o3-mini-low'\n | 'o3-mini-medium'\n | 'o3-pro'\n | 'o3-pro-2025-06-10'\n | 'o4-mini'\n | 'o4-mini-2025-04-16'\n | 'o4-mini-all'\n | 'o4-mini-high-all'\n | 'deepseek-r1'\n | 'deepseek-r1-0528'\n | 'deepseek-v3'\n | 'deepseek-v3-250324'\n | 'deepseek-v4-flash'\n | 'grok-3'\n | 'glm-5.1'\n | 'glm-4.7'\n | 'glm-4.6'\n | 'glm-3-turbo'\n | (string & {});\n\nexport class AiChat {\n constructor(private transport: Transport) {}\n\n async create(opts: {\n model: AiChatModel;\n question: string;\n id?: string;\n preset?: string;\n stateful?: boolean;\n references?: string[];\n [key: string]: unknown;\n }): Promise<Record<string, unknown>> {\n const { model, question, id, preset, stateful, references, ...rest } = opts;\n const body: Record<string, unknown> = { model, question, ...rest };\n if (id !== undefined) body.id = id;\n if (preset !== undefined) body.preset = preset;\n if (stateful !== undefined) body.stateful = stateful;\n if (references !== undefined) body.references = references;\n return this.transport.request('POST', '/aichat/conversations', { json: body });\n }\n}\n","/** Chat resources — native provider APIs (Claude Messages). */\n\nimport { Transport } from '../runtime/transport';\n\nexport class Messages {\n constructor(private transport: Transport) {}\n\n async create(opts: {\n model: string;\n messages: Array<Record<string, unknown>>;\n maxTokens?: number;\n stream?: false;\n [key: string]: unknown;\n }): Promise<Record<string, unknown>>;\n async create(opts: {\n model: string;\n messages: Array<Record<string, unknown>>;\n maxTokens?: number;\n stream: true;\n [key: string]: unknown;\n }): Promise<AsyncGenerator<Record<string, unknown>>>;\n async create(opts: {\n model: string;\n messages: Array<Record<string, unknown>>;\n maxTokens?: number;\n stream?: boolean;\n [key: string]: unknown;\n }): Promise<Record<string, unknown> | AsyncGenerator<Record<string, unknown>>> {\n const { model, messages, maxTokens = 4096, stream, ...rest } = opts;\n const body: Record<string, unknown> = { model, messages, max_tokens: maxTokens, ...rest };\n\n if (stream) {\n body.stream = true;\n return this.stream(body);\n }\n return this.transport.request('POST', '/v1/messages', { json: body });\n }\n\n private async *stream(body: Record<string, unknown>): AsyncGenerator<Record<string, unknown>> {\n for await (const chunk of this.transport.requestStream('POST', '/v1/messages', { json: body })) {\n yield JSON.parse(chunk);\n }\n }\n\n async countTokens(opts: {\n model: string;\n messages: Array<Record<string, unknown>>;\n [key: string]: unknown;\n }): Promise<Record<string, unknown>> {\n const { model, messages, ...rest } = opts;\n return this.transport.request('POST', '/v1/messages/count_tokens', {\n json: { model, messages, ...rest },\n });\n }\n}\n\nexport class Chat {\n readonly messages: Messages;\n\n constructor(transport: Transport) {\n this.messages = new Messages(transport);\n }\n}\n","/**\n * Task polling for long-running operations.\n *\n * A generation call always returns a handle, never sometimes a handle and\n * sometimes a plain object — the caller decides whether to wait. When the server\n * answers synchronously (some endpoints do for fast or cached results) the\n * handle is born already complete, so `wait()` returns immediately rather than\n * polling for something that has already arrived.\n *\n * Kept behaviourally identical to the Python and Go implementations; a\n * divergence here is a cross-language bug that only shows up in production.\n */\n\nimport { Transport } from './transport';\n\nexport interface TaskHandleOptions {\n pollInterval?: number;\n maxWait?: number;\n}\n\nconst DONE = new Set(['succeed', 'succeeded', 'success', 'completed', 'complete', 'finished']);\nconst FAILED = new Set(['failed', 'failure', 'error', 'cancelled', 'canceled', 'rejected']);\n\nfunction statusWords(node: unknown, depth = 0): string[] {\n if (depth > 6) return [];\n const out: string[] = [];\n if (Array.isArray(node)) {\n for (const item of node) out.push(...statusWords(item, depth + 1));\n } else if (node && typeof node === 'object') {\n for (const [key, value] of Object.entries(node as Record<string, unknown>)) {\n if ((key === 'state' || key === 'status') && typeof value === 'string') {\n out.push(value.toLowerCase());\n } else {\n out.push(...statusWords(value, depth + 1));\n }\n }\n }\n return out;\n}\n\nfunction collectUrls(node: unknown, out: string[], depth = 0): void {\n if (depth > 6) return;\n if (Array.isArray(node)) {\n for (const item of node) collectUrls(item, out, depth + 1);\n } else if (node && typeof node === 'object') {\n for (const [key, value] of Object.entries(node as Record<string, unknown>)) {\n const looksLikeUrl = key.endsWith('_url') || key === 'url' || key.endsWith('_urls');\n if (typeof value === 'string' && value.startsWith('http') && looksLikeUrl) {\n out.push(value);\n } else {\n collectUrls(value, out, depth + 1);\n }\n }\n }\n}\n\n/**\n * Every artifact URL in a task response, outermost first.\n *\n * Where the artifact lives is not derivable from the OpenAPI spec — `response`\n * is typed as a bare object and the key differs per service (`video_url`,\n * `image_url`, `data[].image_url`). Rather than keep a per-service table that\n * goes stale, collect anything URL-shaped.\n */\nexport function artifactUrls(state: Record<string, unknown> | null): string[] {\n if (!state) return [];\n const found: string[] = [];\n collectUrls(state.response ?? state, found);\n return [...new Set(found)];\n}\n\n/** Percent complete when the service reports it, else null. */\nexport function taskProgress(state: Record<string, unknown> | null): number | null {\n if (!state) return null;\n for (const value of findKeys(state.response ?? state, ['progress', 'percent', 'percentage'])) {\n if (typeof value === 'boolean') continue;\n if (typeof value === 'number') {\n const pct = value > 0 && value <= 1 ? Math.round(value * 100) : Math.round(value);\n return Math.max(0, Math.min(100, pct));\n }\n if (typeof value === 'string') {\n const parsed = Number.parseFloat(value.trim().replace(/%$/, ''));\n if (!Number.isNaN(parsed)) return Math.max(0, Math.min(100, Math.round(parsed)));\n }\n }\n return null;\n}\n\nfunction* findKeys(node: unknown, names: string[], depth = 0): Generator<unknown> {\n if (depth > 6) return;\n if (Array.isArray(node)) {\n for (const item of node) yield* findKeys(item, names, depth + 1);\n } else if (node && typeof node === 'object') {\n for (const [key, value] of Object.entries(node as Record<string, unknown>)) {\n if (names.includes(key)) yield value;\n else yield* findKeys(value, names, depth + 1);\n }\n }\n}\n\n/** The upstream's own words for why a task failed. */\nexport function failureReason(state: Record<string, unknown> | null): string {\n if (!state) return 'Task failed.';\n const response = (state.response ?? state) as Record<string, unknown>;\n const error = response.error;\n if (error && typeof error === 'object') {\n const message = (error as Record<string, unknown>).message ?? (error as Record<string, unknown>).detail;\n if (typeof message === 'string' && message) return message;\n } else if (typeof error === 'string' && error) {\n return error;\n }\n for (const key of ['message', 'failure_reason', 'fail_reason']) {\n const value = response[key];\n if (typeof value === 'string' && value) return value;\n }\n return 'Task failed.';\n}\n\n/**\n * Reduce a poll response to succeeded | failed | '' (still running).\n *\n * Services report completion inconsistently. A status word is the strongest\n * signal and outranks the `success` flag, since a response can carry\n * `success: false` for a retryable hiccup while the task is still running.\n * This normaliser is deliberately broad; narrowing it silently hangs whichever\n * service it drops.\n */\nexport function taskStatus(state: Record<string, unknown>): 'succeeded' | 'failed' | '' {\n const response = (state.response ?? state) as Record<string, unknown> | null;\n if (!response || typeof response !== 'object') return '';\n\n const words = statusWords(response);\n if (words.some((w) => FAILED.has(w))) return 'failed';\n if (words.some((w) => DONE.has(w))) {\n // A terminal word with no artifact means the job ended without output.\n return artifactUrls(state).length > 0 ? 'succeeded' : 'failed';\n }\n if (words.length > 0) return '';\n\n const finished =\n (response.finished_at !== undefined && response.finished_at !== null) ||\n (state.finished_at !== undefined && state.finished_at !== null);\n if (finished) {\n if (response.success === true) return 'succeeded';\n if (response.success === false) return 'failed';\n if (artifactUrls(state).length > 0) return 'succeeded';\n }\n\n return artifactUrls(state).length > 0 ? 'succeeded' : '';\n}\n\nexport class TaskHandle {\n readonly id: string;\n private pollEndpoint: string;\n private transport: Transport;\n private _result: Record<string, unknown> | null = null;\n\n constructor(\n taskId: string,\n pollEndpoint: string,\n transport: Transport,\n submitted?: Record<string, unknown>,\n ) {\n this.id = taskId;\n this.pollEndpoint = pollEndpoint;\n this.transport = transport;\n // A submission that already carried the artifact is a finished task. The\n // caller should not have to detect that and skip wait() themselves.\n if (submitted && artifactUrls({ response: submitted }).length > 0) {\n this._result = { response: submitted };\n }\n }\n\n get done(): boolean {\n return this._result !== null;\n }\n\n /** Artifact URLs, once completed. */\n urls(): string[] {\n return artifactUrls(this._result);\n }\n\n progress(): number | null {\n return taskProgress(this._result);\n }\n\n /**\n * Fetch current task state, remembering it once terminal.\n *\n * A caller that drives its own poll loop — checking status between polls so it\n * can report progress — only ever calls this. Without recording here, urls()\n * and result() stay empty after the task has plainly finished.\n */\n async get(): Promise<Record<string, unknown>> {\n const state = await this.transport.request('POST', this.pollEndpoint, {\n json: { id: this.id, action: 'retrieve' },\n });\n this.accept(state);\n return state;\n }\n\n private accept(state: Record<string, unknown>): void {\n const status = taskStatus(state);\n if (status === 'succeeded' || status === 'failed') {\n this._result = state;\n }\n }\n\n async isCompleted(): Promise<boolean> {\n if (this.done) return true;\n await this.get(); // records a terminal state as a side effect\n return this.done;\n }\n\n async wait(opts: TaskHandleOptions = {}): Promise<Record<string, unknown>> {\n if (this._result !== null) return this._result;\n\n const pollInterval = opts.pollInterval ?? 3000;\n const maxWait = opts.maxWait ?? 600_000;\n const start = Date.now();\n\n while (Date.now() - start < maxWait) {\n const state = await this.get();\n if (this.done) return state;\n await new Promise((resolve) => setTimeout(resolve, pollInterval));\n }\n throw new Error(`Task ${this.id} did not complete within ${maxWait}ms`);\n }\n\n get result(): Record<string, unknown> | null {\n return this._result;\n }\n}\n","/** Image generation resources. */\n\nimport { Transport } from '../runtime/transport';\nimport { TaskHandle } from '../runtime/tasks';\n\nexport type ImageProvider = 'nano-banana' | 'flux' | 'seedream' | (string & {});\n\nexport class Images {\n constructor(private transport: Transport) {}\n\n async generate(opts: {\n prompt: string;\n provider?: ImageProvider;\n action?: 'generate' | 'edit';\n model?: string;\n negativePrompt?: string;\n imageUrl?: string;\n imageUrls?: string[];\n aspectRatio?: string;\n resolution?: string;\n callbackUrl?: string;\n async?: boolean;\n wait?: boolean;\n pollInterval?: number;\n maxWait?: number;\n [key: string]: unknown;\n }): Promise<Record<string, unknown> | TaskHandle> {\n const { prompt, provider = 'nano-banana', action, model, negativePrompt, imageUrl, imageUrls, aspectRatio, resolution, callbackUrl, wait: shouldWait, pollInterval, maxWait, ...rest } = opts;\n const body: Record<string, unknown> = { prompt, ...rest };\n if (action !== undefined) body.action = action;\n if (model !== undefined) body.model = model;\n if (negativePrompt !== undefined) body.negative_prompt = negativePrompt;\n if (imageUrl !== undefined) body.image_url = imageUrl;\n if (imageUrls !== undefined) body.image_urls = imageUrls;\n if (aspectRatio !== undefined) body.aspect_ratio = aspectRatio;\n if (resolution !== undefined) body.resolution = resolution;\n if (callbackUrl !== undefined) body.callback_url = callbackUrl;\n\n const endpoint = `/${provider}/images`;\n const result = await this.transport.request('POST', endpoint, { json: body });\n const taskId = result.task_id as string | undefined;\n\n if (!taskId || (result.data && !shouldWait)) return result;\n\n const handle = new TaskHandle(taskId, `/${provider}/tasks`, this.transport);\n if (shouldWait) return handle.wait({ pollInterval, maxWait });\n return handle;\n }\n}\n","/** Audio/music generation resources. */\n\nimport { Transport } from '../runtime/transport';\nimport { TaskHandle } from '../runtime/tasks';\n\nexport type AudioProvider = 'suno' | 'producer' | 'fish' | (string & {});\n\nexport class Audio {\n constructor(private transport: Transport) {}\n\n async listFishModels(opts: {\n pageSize?: number;\n pageNumber?: number;\n title?: string;\n tag?: string;\n selfOnly?: boolean;\n authorId?: string;\n language?: string;\n titleLanguage?: string;\n sortBy?: string;\n } = {}): Promise<Record<string, unknown>> {\n const { pageSize, pageNumber, title, tag, selfOnly, authorId, language, titleLanguage, sortBy } = opts;\n const params: Record<string, string> = {};\n if (pageSize !== undefined) params.page_size = String(pageSize);\n if (pageNumber !== undefined) params.page_number = String(pageNumber);\n if (title !== undefined) params.title = title;\n if (tag !== undefined) params.tag = tag;\n if (selfOnly !== undefined) params.self = String(selfOnly);\n if (authorId !== undefined) params.author_id = authorId;\n if (language !== undefined) params.language = language;\n if (titleLanguage !== undefined) params.title_language = titleLanguage;\n if (sortBy !== undefined) params.sort_by = sortBy;\n return this.transport.request('GET', '/fish/model', { params });\n }\n\n async getFishModel(id: string): Promise<Record<string, unknown>> {\n return this.transport.request('GET', `/fish/model/${id}`);\n }\n\n async generate(opts: {\n prompt: string;\n provider?: AudioProvider;\n model?: string;\n tags?: string;\n callbackUrl?: string;\n async?: boolean;\n wait?: boolean;\n pollInterval?: number;\n maxWait?: number;\n [key: string]: unknown;\n }): Promise<Record<string, unknown> | TaskHandle> {\n const { prompt, provider = 'suno', model, tags, callbackUrl, wait: shouldWait, pollInterval, maxWait, ...rest } = opts;\n let result: Record<string, unknown>;\n if (provider === 'fish') {\n const body: Record<string, unknown> = { text: prompt, ...rest };\n if (callbackUrl !== undefined) body.callback_url = callbackUrl;\n result = await this.transport.request('POST', '/fish/tts', {\n json: body,\n headers: model !== undefined ? { model } : undefined,\n });\n } else {\n const body: Record<string, unknown> = { prompt, ...rest };\n if (model !== undefined) body.model = model;\n if (tags !== undefined) body.tags = tags;\n if (callbackUrl !== undefined) body.callback_url = callbackUrl;\n result = await this.transport.request('POST', `/${provider}/audios`, { json: body });\n }\n const taskId = result.task_id as string | undefined;\n\n if (!taskId || (result.data && !shouldWait)) return result;\n\n const handle = new TaskHandle(taskId, `/${provider}/tasks`, this.transport);\n if (shouldWait) return handle.wait({ pollInterval, maxWait });\n return handle;\n }\n}\n","/** Video generation resources. */\n\nimport { Transport } from '../runtime/transport';\nimport { TaskHandle } from '../runtime/tasks';\n\nexport type VideoProvider = 'sora' | 'luma' | 'veo' | 'kling' | 'hailuo' | 'seedance' | 'wan' | 'pika' | 'pixverse' | (string & {});\n\nexport class Video {\n constructor(private transport: Transport) {}\n\n async generate(opts: {\n prompt: string;\n provider?: VideoProvider;\n model?: string;\n imageUrl?: string;\n callbackUrl?: string;\n async?: boolean;\n wait?: boolean;\n pollInterval?: number;\n maxWait?: number;\n [key: string]: unknown;\n }): Promise<Record<string, unknown> | TaskHandle> {\n const { prompt, provider = 'sora', model, imageUrl, callbackUrl, wait: shouldWait, pollInterval, maxWait, ...rest } = opts;\n const body: Record<string, unknown> = { prompt, ...rest };\n if (model !== undefined) body.model = model;\n if (imageUrl !== undefined) body.image_url = imageUrl;\n if (callbackUrl !== undefined) body.callback_url = callbackUrl;\n\n const result = await this.transport.request('POST', `/${provider}/videos`, { json: body });\n const taskId = result.task_id as string | undefined;\n\n if (!taskId || (result.data && !shouldWait)) return result;\n\n const handle = new TaskHandle(taskId, `/${provider}/tasks`, this.transport);\n if (shouldWait) return handle.wait({ pollInterval, maxWait });\n return handle;\n }\n}\n","/** Search resources. */\n\nimport { Transport } from '../runtime/transport';\n\nexport class Search {\n constructor(private transport: Transport) {}\n\n async google(opts: {\n query: string;\n type?: string;\n country?: string;\n language?: string;\n page?: number;\n [key: string]: unknown;\n }): Promise<Record<string, unknown>> {\n const { query, type = 'search', country, language, page, ...rest } = opts;\n const body: Record<string, unknown> = { query, type, ...rest };\n if (country !== undefined) body.country = country;\n if (language !== undefined) body.language = language;\n if (page !== undefined) body.page = page;\n return this.transport.request('POST', '/serp/google', { json: body });\n }\n}\n","/** Cross-service task retrieval. */\n\nimport { Transport } from '../runtime/transport';\nimport { TaskHandle } from '../runtime/tasks';\n\nconst SERVICE_TASK_ENDPOINTS: Record<string, string> = {\n suno: '/suno/tasks',\n producer: '/producer/tasks',\n fish: '/fish/tasks',\n 'nano-banana': '/nano-banana/tasks',\n seedream: '/seedream/tasks',\n seedance: '/seedance/tasks',\n sora: '/sora/tasks',\n luma: '/luma/tasks',\n veo: '/veo/tasks',\n flux: '/flux/tasks',\n kling: '/kling/tasks',\n hailuo: '/hailuo/tasks',\n wan: '/wan/tasks',\n pika: '/pika/tasks',\n pixverse: '/pixverse/tasks',\n webextrator: '/webextrator/tasks',\n};\n\nexport class Tasks {\n constructor(private transport: Transport) {}\n\n async get(taskId: string, opts: { service?: string } = {}): Promise<Record<string, unknown>> {\n const service = opts.service ?? 'suno';\n const endpoint = SERVICE_TASK_ENDPOINTS[service] ?? `/${service}/tasks`;\n return this.transport.request('POST', endpoint, {\n json: { id: taskId, action: 'retrieve' },\n });\n }\n\n async wait(\n taskId: string,\n opts: { service?: string; pollInterval?: number; maxWait?: number } = {}\n ): Promise<Record<string, unknown>> {\n const service = opts.service ?? 'suno';\n const endpoint = SERVICE_TASK_ENDPOINTS[service] ?? `/${service}/tasks`;\n const handle = new TaskHandle(taskId, endpoint, this.transport);\n return handle.wait({ pollInterval: opts.pollInterval, maxWait: opts.maxWait });\n }\n}\n","/** File upload resources. */\n\nimport { Transport } from '../runtime/transport';\nimport * as fs from 'fs';\nimport * as path from 'path';\n\nexport class Files {\n constructor(private transport: Transport) {}\n\n async upload(\n file: string | Buffer | Uint8Array,\n opts: { filename?: string } = {}\n ): Promise<Record<string, unknown>> {\n let data: Buffer | Uint8Array;\n let filename: string;\n\n if (typeof file === 'string') {\n data = fs.readFileSync(file);\n filename = opts.filename ?? path.basename(file);\n } else {\n data = file;\n filename = opts.filename ?? 'upload';\n }\n\n return this.transport.upload('/api/v1/files/', data, filename);\n }\n}\n","/** Management-plane resources. */\n\nimport { Transport } from '../runtime/transport';\n\nclass Applications {\n constructor(private transport: Transport) {}\n\n async list(params?: Record<string, string>): Promise<Record<string, unknown>> {\n return this.transport.request('GET', '/api/v1/applications/', { params, platform: true });\n }\n\n async create(opts: { serviceId: string; [key: string]: unknown }): Promise<Record<string, unknown>> {\n const { serviceId, ...rest } = opts;\n return this.transport.request('POST', '/api/v1/applications/', {\n json: { service_id: serviceId, ...rest },\n platform: true,\n });\n }\n\n async get(applicationId: string): Promise<Record<string, unknown>> {\n return this.transport.request('GET', `/api/v1/applications/${applicationId}/`, { platform: true });\n }\n}\n\nclass Credentials {\n constructor(private transport: Transport) {}\n\n async list(params?: Record<string, string>): Promise<Record<string, unknown>> {\n return this.transport.request('GET', '/api/v1/credentials/', { params, platform: true });\n }\n\n async create(opts: { applicationId: string; [key: string]: unknown }): Promise<Record<string, unknown>> {\n const { applicationId, ...rest } = opts;\n return this.transport.request('POST', '/api/v1/credentials/', {\n json: { application_id: applicationId, ...rest },\n platform: true,\n });\n }\n\n async rotate(credentialId: string): Promise<Record<string, unknown>> {\n return this.transport.request('POST', `/api/v1/credentials/${credentialId}/rotate/`, { platform: true });\n }\n\n async delete(credentialId: string): Promise<Record<string, unknown>> {\n return this.transport.request('DELETE', `/api/v1/credentials/${credentialId}/`, { platform: true });\n }\n}\n\nclass Models {\n constructor(private transport: Transport) {}\n\n async list(params?: Record<string, string>): Promise<Record<string, unknown>> {\n return this.transport.request('GET', '/api/v1/models/', { params, platform: true });\n }\n}\n\nclass Config {\n constructor(private transport: Transport) {}\n\n async get(): Promise<Record<string, unknown>> {\n return this.transport.request('GET', '/api/v1/config/', { platform: true });\n }\n}\n\nexport class Platform {\n readonly applications: Applications;\n readonly credentials: Credentials;\n readonly models: Models;\n readonly config: Config;\n\n constructor(transport: Transport) {\n this.applications = new Applications(transport);\n this.credentials = new Credentials(transport);\n this.models = new Models(transport);\n this.config = new Config(transport);\n }\n}\n","/** OpenAI-compatible facade resources. */\n\nimport { Transport } from '../runtime/transport';\n\nclass Completions {\n constructor(private transport: Transport) {}\n\n async create(opts: {\n model: string;\n messages: Array<Record<string, unknown>>;\n stream?: false;\n [key: string]: unknown;\n }): Promise<Record<string, unknown>>;\n async create(opts: {\n model: string;\n messages: Array<Record<string, unknown>>;\n stream: true;\n [key: string]: unknown;\n }): Promise<AsyncGenerator<Record<string, unknown>>>;\n async create(opts: {\n model: string;\n messages: Array<Record<string, unknown>>;\n stream?: boolean;\n [key: string]: unknown;\n }): Promise<Record<string, unknown> | AsyncGenerator<Record<string, unknown>>> {\n const { model, messages, stream, ...rest } = opts;\n const body: Record<string, unknown> = { model, messages, ...rest };\n\n if (stream) {\n body.stream = true;\n return this.streamResponse(body);\n }\n return this.transport.request('POST', '/openai/chat/completions', { json: body });\n }\n\n private async *streamResponse(body: Record<string, unknown>): AsyncGenerator<Record<string, unknown>> {\n for await (const chunk of this.transport.requestStream('POST', '/openai/chat/completions', { json: body })) {\n yield JSON.parse(chunk);\n }\n }\n}\n\nclass ChatNamespace {\n readonly completions: Completions;\n constructor(transport: Transport) {\n this.completions = new Completions(transport);\n }\n}\n\nclass Responses {\n constructor(private transport: Transport) {}\n\n async create(opts: {\n model: string;\n input: string | Array<Record<string, unknown>>;\n stream?: false;\n [key: string]: unknown;\n }): Promise<Record<string, unknown>>;\n async create(opts: {\n model: string;\n input: string | Array<Record<string, unknown>>;\n stream: true;\n [key: string]: unknown;\n }): Promise<AsyncGenerator<Record<string, unknown>>>;\n async create(opts: {\n model: string;\n input: string | Array<Record<string, unknown>>;\n stream?: boolean;\n [key: string]: unknown;\n }): Promise<Record<string, unknown> | AsyncGenerator<Record<string, unknown>>> {\n const { model, input, stream, ...rest } = opts;\n const body: Record<string, unknown> = { model, input, ...rest };\n\n if (stream) {\n body.stream = true;\n return this.streamResponse(body);\n }\n return this.transport.request('POST', '/openai/responses', { json: body });\n }\n\n private async *streamResponse(body: Record<string, unknown>): AsyncGenerator<Record<string, unknown>> {\n for await (const chunk of this.transport.requestStream('POST', '/openai/responses', { json: body })) {\n yield JSON.parse(chunk);\n }\n }\n}\n\nclass Images {\n constructor(private transport: Transport) {}\n\n async generate(opts: {\n prompt: string;\n model: string;\n background?: string;\n moderation?: string;\n n?: number;\n outputCompression?: number;\n outputFormat?: string;\n partialImages?: number;\n size?: string;\n quality?: string;\n responseFormat?: string;\n style?: string;\n callbackUrl?: string;\n async?: boolean;\n [key: string]: unknown;\n }): Promise<Record<string, unknown>> {\n const { prompt, model, outputCompression, outputFormat, partialImages, responseFormat, callbackUrl, ...rest } = opts;\n const body: Record<string, unknown> = { prompt, model, ...rest };\n if (outputCompression !== undefined) body.output_compression = outputCompression;\n if (outputFormat !== undefined) body.output_format = outputFormat;\n if (partialImages !== undefined) body.partial_images = partialImages;\n if (responseFormat !== undefined) body.response_format = responseFormat;\n if (callbackUrl !== undefined) body.callback_url = callbackUrl;\n return this.transport.request('POST', '/openai/images/generations', { json: body });\n }\n\n async edit(opts: {\n image: string | string[];\n prompt: string;\n model?: string;\n n?: number;\n background?: string;\n inputFidelity?: string;\n mask?: string;\n outputFormat?: string;\n outputCompression?: number;\n partialImages?: number;\n quality?: string;\n size?: string;\n responseFormat?: string;\n callbackUrl?: string;\n async?: boolean;\n [key: string]: unknown;\n }): Promise<Record<string, unknown>> {\n const { image, prompt, inputFidelity, mask, outputFormat, outputCompression, partialImages, responseFormat, callbackUrl, ...rest } = opts;\n const body: Record<string, unknown> = { image, prompt, ...rest };\n if (inputFidelity !== undefined) body.input_fidelity = inputFidelity;\n if (mask !== undefined) body.mask = mask;\n if (outputFormat !== undefined) body.output_format = outputFormat;\n if (outputCompression !== undefined) body.output_compression = outputCompression;\n if (partialImages !== undefined) body.partial_images = partialImages;\n if (responseFormat !== undefined) body.response_format = responseFormat;\n if (callbackUrl !== undefined) body.callback_url = callbackUrl;\n return this.transport.request('POST', '/openai/images/edits', { json: body });\n }\n}\n\nclass Embeddings {\n constructor(private transport: Transport) {}\n\n async create(opts: {\n model: string;\n input: string | string[];\n encodingFormat?: string;\n dimensions?: number;\n [key: string]: unknown;\n }): Promise<Record<string, unknown>> {\n const { model, input, encodingFormat, dimensions, ...rest } = opts;\n const body: Record<string, unknown> = { model, input, ...rest };\n if (encodingFormat !== undefined) body.encoding_format = encodingFormat;\n if (dimensions !== undefined) body.dimensions = dimensions;\n return this.transport.request('POST', '/openai/embeddings', { json: body });\n }\n}\n\nclass Tasks {\n constructor(private transport: Transport) {}\n\n async retrieve(opts: {\n id?: string;\n traceId?: string;\n [key: string]: unknown;\n }): Promise<Record<string, unknown>> {\n const { id, traceId, ...rest } = opts;\n const body: Record<string, unknown> = { action: 'retrieve', ...rest };\n if (id !== undefined) body.id = id;\n if (traceId !== undefined) body.trace_id = traceId;\n return this.transport.request('POST', '/openai/tasks', { json: body });\n }\n\n async retrieveBatch(opts: {\n ids?: string[];\n traceIds?: string[];\n applicationId?: string;\n userId?: string;\n type?: string;\n offset?: number;\n limit?: number;\n createdAtMin?: number;\n createdAtMax?: number;\n [key: string]: unknown;\n } = {}): Promise<Record<string, unknown>> {\n const { ids, traceIds, applicationId, userId, type, offset, limit, createdAtMin, createdAtMax, ...rest } = opts;\n const body: Record<string, unknown> = { action: 'retrieve_batch', ...rest };\n if (ids !== undefined) body.ids = ids;\n if (traceIds !== undefined) body.trace_ids = traceIds;\n if (applicationId !== undefined) body.application_id = applicationId;\n if (userId !== undefined) body.user_id = userId;\n if (type !== undefined) body.type = type;\n if (offset !== undefined) body.offset = offset;\n if (limit !== undefined) body.limit = limit;\n if (createdAtMin !== undefined) body.created_at_min = createdAtMin;\n if (createdAtMax !== undefined) body.created_at_max = createdAtMax;\n return this.transport.request('POST', '/openai/tasks', { json: body });\n }\n}\n\nexport class OpenAI {\n readonly chat: ChatNamespace;\n readonly responses: Responses;\n readonly images: Images;\n readonly embeddings: Embeddings;\n readonly tasks: Tasks;\n\n constructor(transport: Transport) {\n this.chat = new ChatNamespace(transport);\n this.responses = new Responses(transport);\n this.images = new Images(transport);\n this.embeddings = new Embeddings(transport);\n this.tasks = new Tasks(transport);\n }\n}\n","/** GLM chat completions resource. */\n\nimport { Transport } from '../runtime/transport';\n\nexport type GlmModel = 'glm-5.1' | 'glm-4.7' | 'glm-4.6' | 'glm-3-turbo' | (string & {});\n\nclass Completions {\n constructor(private transport: Transport) {}\n\n async create(opts: {\n model: GlmModel;\n messages: Array<Record<string, unknown>>;\n stream?: false;\n [key: string]: unknown;\n }): Promise<Record<string, unknown>>;\n async create(opts: {\n model: GlmModel;\n messages: Array<Record<string, unknown>>;\n stream: true;\n [key: string]: unknown;\n }): Promise<AsyncGenerator<Record<string, unknown>>>;\n async create(opts: {\n model: GlmModel;\n messages: Array<Record<string, unknown>>;\n stream?: boolean;\n [key: string]: unknown;\n }): Promise<Record<string, unknown> | AsyncGenerator<Record<string, unknown>>> {\n const { model, messages, stream, ...rest } = opts;\n const body: Record<string, unknown> = { model, messages, ...rest };\n\n if (stream) {\n body.stream = true;\n return this.streamResponse(body);\n }\n return this.transport.request('POST', '/glm/chat/completions', { json: body });\n }\n\n private async *streamResponse(body: Record<string, unknown>): AsyncGenerator<Record<string, unknown>> {\n for await (const chunk of this.transport.requestStream('POST', '/glm/chat/completions', { json: body })) {\n yield JSON.parse(chunk);\n }\n }\n}\n\nclass ChatNamespace {\n readonly completions: Completions;\n constructor(transport: Transport) {\n this.completions = new Completions(transport);\n }\n}\n\nexport class Glm {\n readonly chat: ChatNamespace;\n\n constructor(transport: Transport) {\n this.chat = new ChatNamespace(transport);\n }\n}\n","/** Veo-specific video generation and editing resources. */\n\nimport { Transport } from '../runtime/transport';\n\nexport type VeoModel = 'veo3' | 'veo3-fast' | 'veo31-fast' | 'veo31' | 'veo31-fast-ingredients' | (string & {});\n\nexport class Veo {\n constructor(private transport: Transport) {}\n\n async generate(opts: {\n action: 'text2video' | 'image2video' | 'ingredients2video' | 'get1080p';\n prompt?: string;\n model?: VeoModel;\n resolution?: '4k' | '1080p' | 'gif';\n videoId?: string;\n translation?: boolean;\n aspectRatio?: '16:9' | '9:16';\n imageUrls?: string[];\n callbackUrl?: string;\n async?: boolean;\n [key: string]: unknown;\n }): Promise<Record<string, unknown>> {\n const { action, prompt, model, resolution, videoId, translation, aspectRatio, imageUrls, callbackUrl, ...rest } = opts;\n const body: Record<string, unknown> = { action, ...rest };\n if (prompt !== undefined) body.prompt = prompt;\n if (model !== undefined) body.model = model;\n if (resolution !== undefined) body.resolution = resolution;\n if (videoId !== undefined) body.video_id = videoId;\n if (translation !== undefined) body.translation = translation;\n if (aspectRatio !== undefined) body.aspect_ratio = aspectRatio;\n if (imageUrls !== undefined) body.image_urls = imageUrls;\n if (callbackUrl !== undefined) body.callback_url = callbackUrl;\n return this.transport.request('POST', '/veo/videos', { json: body });\n }\n\n async upsample(opts: {\n videoId: string;\n action: '1080p' | '4k' | 'gif';\n callbackUrl?: string;\n async?: boolean;\n [key: string]: unknown;\n }): Promise<Record<string, unknown>> {\n const { videoId, action, callbackUrl, ...rest } = opts;\n const body: Record<string, unknown> = { video_id: videoId, action, ...rest };\n if (callbackUrl !== undefined) body.callback_url = callbackUrl;\n return this.transport.request('POST', '/veo/upsample', { json: body });\n }\n\n async extend(opts: {\n videoId: string;\n model: 'veo31-fast' | 'veo31' | (string & {});\n prompt?: string;\n callbackUrl?: string;\n async?: boolean;\n [key: string]: unknown;\n }): Promise<Record<string, unknown>> {\n const { videoId, model, prompt, callbackUrl, ...rest } = opts;\n const body: Record<string, unknown> = { video_id: videoId, model, ...rest };\n if (prompt !== undefined) body.prompt = prompt;\n if (callbackUrl !== undefined) body.callback_url = callbackUrl;\n return this.transport.request('POST', '/veo/extend', { json: body });\n }\n\n async reshoot(opts: {\n videoId: string;\n motionType: 'STATIONARY' | 'STATIONARY_UP' | 'STATIONARY_DOWN' | 'STATIONARY_LEFT' | 'STATIONARY_RIGHT' | 'STATIONARY_DOLLY_IN_ZOOM_OUT' | 'STATIONARY_DOLLY_OUT_ZOOM_IN' | 'UP' | 'DOWN' | 'LEFT_TO_RIGHT' | 'RIGHT_TO_LEFT' | 'FORWARD' | 'BACKWARD' | 'DOLLY_IN_ZOOM_OUT' | 'DOLLY_OUT_ZOOM_IN' | (string & {});\n callbackUrl?: string;\n async?: boolean;\n [key: string]: unknown;\n }): Promise<Record<string, unknown>> {\n const { videoId, motionType, callbackUrl, ...rest } = opts;\n const body: Record<string, unknown> = { video_id: videoId, motion_type: motionType, ...rest };\n if (callbackUrl !== undefined) body.callback_url = callbackUrl;\n return this.transport.request('POST', '/veo/reshoot', { json: body });\n }\n\n async objects(opts: {\n videoId: string;\n action: 'insert' | 'remove';\n prompt?: string;\n imageMask?: string;\n callbackUrl?: string;\n async?: boolean;\n [key: string]: unknown;\n }): Promise<Record<string, unknown>> {\n const { videoId, action, prompt, imageMask, callbackUrl, ...rest } = opts;\n const body: Record<string, unknown> = { video_id: videoId, action, ...rest };\n if (prompt !== undefined) body.prompt = prompt;\n if (imageMask !== undefined) body.image_mask = imageMask;\n if (callbackUrl !== undefined) body.callback_url = callbackUrl;\n return this.transport.request('POST', '/veo/objects', { json: body });\n }\n}\n","/** Kling-specific video generation resources. */\n\nimport { Transport } from '../runtime/transport';\n\nexport const KLING_MODELS = [\n 'kling-v1',\n 'kling-v1-6',\n 'kling-v2-master',\n 'kling-v2-1-master',\n 'kling-v2-5-turbo',\n 'kling-v2-6',\n 'kling-v3',\n 'kling-v3-omni',\n 'kling-o1',\n] as const;\n\nexport type KlingModel = (typeof KLING_MODELS)[number];\n\nexport interface KlingCameraControl {\n type: 'simple' | 'down_back' | 'forward_up' | 'left_turn_forward' | 'right_turn_forward';\n config?: {\n horizontal?: number;\n vertical?: number;\n pan?: number;\n tilt?: number;\n roll?: number;\n zoom?: number;\n };\n}\n\nexport interface KlingReferenceImage {\n imageUrl: string;\n type?: 'first_frame' | 'end_frame';\n}\n\nexport interface KlingReferenceVideo {\n videoUrl: string;\n referType?: 'base' | 'feature';\n keepOriginalSound?: 'yes' | 'no';\n}\n\nexport interface KlingGenerateOptions {\n action: 'text2video' | 'image2video' | 'extend';\n mode?: 'std' | 'pro' | '4k';\n model: KlingModel;\n prompt?: string;\n duration?: number;\n generateAudio?: boolean;\n videoId?: string;\n cfgScale?: number;\n aspectRatio?: '16:9' | '9:16' | '1:1';\n callbackUrl?: string;\n async?: boolean;\n timeout?: number;\n endImageUrl?: string;\n cameraControl?: KlingCameraControl;\n imageList?: KlingReferenceImage[];\n videoList?: KlingReferenceVideo[];\n negativePrompt?: string;\n startImageUrl?: string;\n}\n\nfunction isHttpUrl(value: string): boolean {\n try {\n const url = new URL(value);\n return url.protocol === 'http:' || url.protocol === 'https:';\n } catch {\n return false;\n }\n}\n\nfunction validateGenerateOptions(opts: KlingGenerateOptions): void {\n if (!KLING_MODELS.includes(opts.model)) {\n throw new Error(`model must be one of: ${KLING_MODELS.join(', ')}`);\n }\n const isV3 = opts.model === 'kling-v3' || opts.model === 'kling-v3-omni';\n const hasReferences = Boolean(opts.imageList?.length || opts.videoList?.length);\n\n if (opts.imageList !== undefined && opts.imageList.length === 0) {\n throw new Error('imageList must be non-empty or omitted');\n }\n if (opts.videoList !== undefined && opts.videoList.length === 0) {\n throw new Error('videoList must be non-empty or omitted');\n }\n\n if ((opts.action === 'text2video' || opts.action === 'image2video') && !opts.prompt) {\n throw new Error('prompt is required for text2video and image2video');\n }\n if (opts.action === 'image2video' && !opts.startImageUrl) {\n throw new Error('startImageUrl is required for image2video');\n }\n if (opts.action === 'extend' && !opts.videoId) {\n throw new Error('videoId is required for extend');\n }\n if (opts.endImageUrl && !opts.startImageUrl) {\n throw new Error('startImageUrl is required with endImageUrl');\n }\n if (opts.startImageUrl && !isHttpUrl(opts.startImageUrl)) {\n throw new Error('startImageUrl must be an HTTP URL');\n }\n if (opts.endImageUrl && !isHttpUrl(opts.endImageUrl)) {\n throw new Error('endImageUrl must be an HTTP URL');\n }\n if (opts.callbackUrl && !isHttpUrl(opts.callbackUrl)) {\n throw new Error('callbackUrl must be an HTTP URL');\n }\n if (opts.cfgScale !== undefined && (opts.cfgScale < 0 || opts.cfgScale > 1)) {\n throw new Error('cfgScale must be between 0 and 1');\n }\n if (opts.duration !== undefined && !Number.isInteger(opts.duration)) {\n throw new Error('duration must be an integer');\n }\n if (isV3 && opts.duration !== undefined && (opts.duration < 3 || opts.duration > 15)) {\n throw new Error('Kling V3 duration must be between 3 and 15 seconds');\n }\n if (!isV3 && opts.model !== 'kling-o1' && opts.duration !== undefined && ![5, 10].includes(opts.duration)) {\n throw new Error('This Kling model supports only 5- or 10-second generation');\n }\n if (opts.model === 'kling-o1' && opts.duration !== undefined && opts.duration !== 5) {\n throw new Error('kling-o1 supports only 5-second generation');\n }\n if (opts.model === 'kling-o1' && opts.mode !== undefined && !['std', 'pro'].includes(opts.mode)) {\n throw new Error('kling-o1 supports only std and pro modes');\n }\n if (opts.mode === '4k' && !isV3) {\n throw new Error('4k mode requires kling-v3 or kling-v3-omni');\n }\n if (opts.action === 'extend' && !['kling-v1', 'kling-v1-6', 'kling-v2-5-turbo'].includes(opts.model)) {\n throw new Error('extend requires kling-v1, kling-v1-6, or kling-v2-5-turbo');\n }\n if (opts.action === 'extend' && hasReferences) {\n throw new Error('imageList and videoList are not supported with extend');\n }\n if (hasReferences && opts.model !== 'kling-o1' && opts.model !== 'kling-v3-omni') {\n throw new Error('Omni references require kling-o1 or kling-v3-omni');\n }\n if (hasReferences && opts.mode === '4k') {\n throw new Error('4k cannot be combined with Omni references');\n }\n if ((opts.model === 'kling-o1' || hasReferences) && (opts.negativePrompt !== undefined || opts.cameraControl !== undefined || opts.cfgScale !== undefined)) {\n throw new Error('Kling O1 and Omni references do not support negativePrompt, cameraControl, or cfgScale');\n }\n if (opts.model === 'kling-o1' && opts.generateAudio) {\n throw new Error('kling-o1 does not support generateAudio');\n }\n if (opts.generateAudio && !isV3 && opts.model !== 'kling-v2-6') {\n throw new Error('generateAudio requires a V3 model or kling-v2-6 pro mode');\n }\n if (opts.generateAudio && opts.model === 'kling-v2-6' && opts.mode !== 'pro') {\n throw new Error('kling-v2-6 supports generateAudio only in pro mode');\n }\n if (opts.generateAudio && opts.videoList?.length) {\n throw new Error('generateAudio cannot be used with videoList');\n }\n if (opts.videoList && (opts.videoList.length === 0 || opts.videoList.length > 1)) {\n throw new Error('videoList must contain exactly one reference video');\n }\n\n for (const image of opts.imageList ?? []) {\n if (!isHttpUrl(image.imageUrl)) throw new Error('Every reference image requires an HTTP imageUrl');\n if (image.type !== undefined && !['first_frame', 'end_frame'].includes(image.type)) {\n throw new Error('Reference image type must be first_frame or end_frame');\n }\n }\n for (const video of opts.videoList ?? []) {\n if (!isHttpUrl(video.videoUrl)) throw new Error('Every reference video requires an HTTP videoUrl');\n if (video.referType !== undefined && !['base', 'feature'].includes(video.referType)) {\n throw new Error('Reference video referType must be base or feature');\n }\n if (video.keepOriginalSound !== undefined && !['yes', 'no'].includes(video.keepOriginalSound)) {\n throw new Error('Reference video keepOriginalSound must be yes or no');\n }\n }\n\n const firstFrames = Number(Boolean(opts.startImageUrl)) + (opts.imageList ?? []).filter((item) => item.type === 'first_frame').length;\n const endFrames = Number(Boolean(opts.endImageUrl)) + (opts.imageList ?? []).filter((item) => item.type === 'end_frame').length;\n if (firstFrames > 1 || endFrames > 1) {\n throw new Error('Only one first frame and one end frame are allowed');\n }\n if (endFrames > 0 && firstFrames === 0) {\n throw new Error('A first frame is required with an end frame');\n }\n if ((opts.videoList?.[0]?.referType ?? 'base') === 'base' && opts.videoList?.length && (firstFrames > 0 || endFrames > 0)) {\n throw new Error('A base reference video cannot be combined with first or end frames');\n }\n\n const imageCount = (opts.imageList?.length ?? 0) + Number(Boolean(opts.startImageUrl)) + Number(Boolean(opts.endImageUrl));\n const imageLimit = opts.videoList?.length ? 4 : 7;\n if (imageCount > imageLimit) {\n throw new Error(`Reference images cannot exceed ${imageLimit} for this request`);\n }\n}\n\nexport class Kling {\n constructor(private transport: Transport) {}\n\n async generate(opts: KlingGenerateOptions): Promise<Record<string, unknown>> {\n validateGenerateOptions(opts);\n const {\n action,\n mode,\n model,\n prompt,\n duration,\n generateAudio,\n videoId,\n cfgScale,\n aspectRatio,\n callbackUrl,\n async: asyncMode,\n timeout,\n endImageUrl,\n cameraControl,\n imageList,\n videoList,\n negativePrompt,\n startImageUrl,\n } = opts;\n const body: Record<string, unknown> = { action };\n if (mode !== undefined) body.mode = mode;\n if (model !== undefined) body.model = model;\n if (prompt !== undefined) body.prompt = prompt;\n if (duration !== undefined) body.duration = duration;\n if (generateAudio !== undefined) body.generate_audio = generateAudio;\n if (videoId !== undefined) body.video_id = videoId;\n if (cfgScale !== undefined) body.cfg_scale = cfgScale;\n if (aspectRatio !== undefined) body.aspect_ratio = aspectRatio;\n if (callbackUrl !== undefined) body.callback_url = callbackUrl;\n if (asyncMode !== undefined) body.async = asyncMode;\n if (timeout !== undefined) body.timeout = timeout;\n if (endImageUrl !== undefined) body.end_image_url = endImageUrl;\n if (cameraControl !== undefined) body.camera_control = cameraControl;\n if (imageList !== undefined) {\n body.image_list = imageList.map(({ imageUrl, type }) => ({ image_url: imageUrl, ...(type ? { type } : {}) }));\n }\n if (videoList !== undefined) {\n body.video_list = videoList.map(({ videoUrl, referType, keepOriginalSound }) => ({\n video_url: videoUrl,\n ...(referType ? { refer_type: referType } : {}),\n ...(keepOriginalSound ? { keep_original_sound: keepOriginalSound } : {}),\n }));\n }\n if (negativePrompt !== undefined) body.negative_prompt = negativePrompt;\n if (startImageUrl !== undefined) body.start_image_url = startImageUrl;\n return this.transport.request('POST', '/kling/videos', { json: body });\n }\n\n async motion(opts: {\n mode: 'std' | 'pro';\n imageUrl: string;\n videoUrl: string;\n characterOrientation: 'image' | 'video';\n keepOriginalSound?: 'yes' | 'no';\n prompt?: string;\n callbackUrl?: string;\n async?: boolean;\n }): Promise<Record<string, unknown>> {\n const { mode, imageUrl, videoUrl, characterOrientation, keepOriginalSound, prompt, callbackUrl } = opts;\n if (!['std', 'pro'].includes(mode)) throw new Error('mode must be std or pro');\n if (!isHttpUrl(imageUrl)) throw new Error('imageUrl must be an HTTP URL');\n if (!isHttpUrl(videoUrl)) throw new Error('videoUrl must be an HTTP URL');\n if (!['image', 'video'].includes(characterOrientation)) {\n throw new Error('characterOrientation must be image or video');\n }\n if (keepOriginalSound !== undefined && !['yes', 'no'].includes(keepOriginalSound)) {\n throw new Error('keepOriginalSound must be yes or no');\n }\n if (callbackUrl && !isHttpUrl(callbackUrl)) throw new Error('callbackUrl must be an HTTP URL');\n const body: Record<string, unknown> = {\n mode,\n image_url: imageUrl,\n video_url: videoUrl,\n character_orientation: characterOrientation,\n };\n if (keepOriginalSound !== undefined) body.keep_original_sound = keepOriginalSound;\n if (prompt !== undefined) body.prompt = prompt;\n if (callbackUrl !== undefined) body.callback_url = callbackUrl;\n if (opts.async !== undefined) body.async = opts.async;\n return this.transport.request('POST', '/kling/motion', { json: body });\n }\n}\n","/** WebExtrator web render & extract resources. */\n\nimport { Transport } from '../runtime/transport';\n\nexport class WebExtrator {\n constructor(private transport: Transport) {}\n\n async extract(opts: {\n url: string;\n expectedType?: 'product' | 'article' | 'general';\n enableLlm?: boolean;\n waitUntil?: 'load' | 'domcontentloaded' | 'networkidle' | 'commit';\n timeout?: number;\n delay?: number;\n waitForSelector?: string;\n blockResources?: string[];\n headers?: Record<string, string>;\n userAgent?: string;\n callbackUrl?: string;\n async?: boolean;\n [key: string]: unknown;\n }): Promise<Record<string, unknown>> {\n const { url, expectedType, enableLlm, waitUntil, timeout, delay, waitForSelector, blockResources, headers, userAgent, callbackUrl, ...rest } = opts;\n const body: Record<string, unknown> = { url, ...rest };\n if (expectedType !== undefined) body.expected_type = expectedType;\n if (enableLlm !== undefined) body.enable_llm = enableLlm;\n if (waitUntil !== undefined) body.wait_until = waitUntil;\n if (timeout !== undefined) body.timeout = timeout;\n if (delay !== undefined) body.delay = delay;\n if (waitForSelector !== undefined) body.wait_for_selector = waitForSelector;\n if (blockResources !== undefined) body.block_resources = blockResources;\n if (headers !== undefined) body.headers = headers;\n if (userAgent !== undefined) body.user_agent = userAgent;\n if (callbackUrl !== undefined) body.callback_url = callbackUrl;\n return this.transport.request('POST', '/webextrator/extract', { json: body });\n }\n\n async render(opts: {\n url: string;\n waitUntil?: 'load' | 'domcontentloaded' | 'networkidle' | 'commit';\n timeout?: number;\n delay?: number;\n waitForSelector?: string;\n blockResources?: string[];\n headers?: Record<string, string>;\n userAgent?: string;\n callbackUrl?: string;\n async?: boolean;\n [key: string]: unknown;\n }): Promise<Record<string, unknown>> {\n const { url, waitUntil, timeout, delay, waitForSelector, blockResources, headers, userAgent, callbackUrl, ...rest } = opts;\n const body: Record<string, unknown> = { url, ...rest };\n if (waitUntil !== undefined) body.wait_until = waitUntil;\n if (timeout !== undefined) body.timeout = timeout;\n if (delay !== undefined) body.delay = delay;\n if (waitForSelector !== undefined) body.wait_for_selector = waitForSelector;\n if (blockResources !== undefined) body.block_resources = blockResources;\n if (headers !== undefined) body.headers = headers;\n if (userAgent !== undefined) body.user_agent = userAgent;\n if (callbackUrl !== undefined) body.callback_url = callbackUrl;\n return this.transport.request('POST', '/webextrator/render', { json: body });\n }\n}\n","/** Face transformation resources (`/face/*`). */\n\nimport { Transport } from '../runtime/transport';\n\nexport class Face {\n constructor(private transport: Transport) {}\n\n private call(action: string, body: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.transport.request('POST', `/face/${action}`, { json: body });\n }\n\n analyze(opts: { imageUrl: string; [key: string]: unknown }): Promise<Record<string, unknown>> {\n const { imageUrl, ...rest } = opts;\n return this.call('analyze', { image_url: imageUrl, ...rest });\n }\n\n beautify(opts: { imageUrl: string; [key: string]: unknown }): Promise<Record<string, unknown>> {\n const { imageUrl, ...rest } = opts;\n return this.call('beautify', { image_url: imageUrl, ...rest });\n }\n\n changeAge(opts: { imageUrl: string; [key: string]: unknown }): Promise<Record<string, unknown>> {\n const { imageUrl, ...rest } = opts;\n return this.call('change-age', { image_url: imageUrl, ...rest });\n }\n\n changeGender(opts: { imageUrl: string; [key: string]: unknown }): Promise<Record<string, unknown>> {\n const { imageUrl, ...rest } = opts;\n return this.call('change-gender', { image_url: imageUrl, ...rest });\n }\n\n detectLive(opts: { imageUrl: string; [key: string]: unknown }): Promise<Record<string, unknown>> {\n const { imageUrl, ...rest } = opts;\n return this.call('detect-live', { image_url: imageUrl, ...rest });\n }\n\n swap(opts: { sourceImageUrl: string; targetImageUrl: string; [key: string]: unknown }): Promise<Record<string, unknown>> {\n const { sourceImageUrl, targetImageUrl, ...rest } = opts;\n return this.call('swap', { source_image_url: sourceImageUrl, target_image_url: targetImageUrl, ...rest });\n }\n\n cartoon(opts: { imageUrl: string; [key: string]: unknown }): Promise<Record<string, unknown>> {\n const { imageUrl, ...rest } = opts;\n return this.call('cartoon', { image_url: imageUrl, ...rest });\n }\n}\n","/** Short URL resource (`/shorturl`). */\n\nimport { Transport } from '../runtime/transport';\n\nexport class ShortUrl {\n constructor(private transport: Transport) {}\n\n async create(opts: { url: string; slug?: string; [key: string]: unknown }): Promise<Record<string, unknown>> {\n const { url, slug, ...rest } = opts;\n const body: Record<string, unknown> = { url, ...rest };\n if (slug !== undefined) body.slug = slug;\n return this.transport.request('POST', '/shorturl', { json: body });\n }\n}\n","/**\n * Digitalhuman (digitalhuman) — generated from the platform OpenAPI spec.\n *\n * Do not edit by hand: run `python scripts/generate_providers.py`. Parameter\n * names, types, enums and required-ness all come from the live spec.\n */\n\nimport { Transport } from '../../runtime/transport';\nimport { TaskHandle } from '../../runtime/tasks';\n\n\nfunction taskId(result: Record<string, unknown>): string {\n if (typeof result?.task_id === 'string') return result.task_id;\n const data = result?.data as Record<string, unknown> | undefined;\n if (data && typeof data.task_id === 'string') return data.task_id;\n return typeof result?.id === 'string' ? result.id : '';\n}\n\nexport interface DigitalhumanGenerateOptions {\n /** Public URL of the source face video (preferred). One of video_url/image_url required. */\n videoUrl: string;\n /** Spoken text -> TTS (requires voice_id). */\n text?: string;\n /** Audio tempo multiplier. */\n speed?: number;\n /** Diffusion steps (LatentSync). */\n steps?: number;\n /** latentsync = quality (default); heygem = fast tier. */\n engine?: \"latentsync\" | \"heygem\";\n /** Lip-sync strength (LatentSync). Lower loosens sync. */\n guidance?: number;\n /** Apply the mouth-seam reduction blend. */\n seamFix?: boolean;\n /** A cloned voice from POST /digital-human/voices. */\n voiceId?: string;\n /** Public URL of the driving audio (.wav/.mp3/.m4a). OR supply text(+voice_id). */\n audioUrl?: string;\n /** Public URL of a source face photo (photo-driven path). */\n imageUrl?: string;\n resolution?: \"720p\" | \"540p\";\n /** Submit asynchronously and poll. Defaults to true. */\n async?: boolean;\n /** Wait for completion before returning the handle. */\n wait?: boolean;\n pollInterval?: number;\n maxWait?: number;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\nexport interface DigitalhumanVoicesOptions {\n /** Public URL of a clean 10-20s voice sample. */\n audioUrl: string;\n lang?: \"zh\" | \"en\";\n /** Optional label. */\n name?: string;\n /** Submit asynchronously and poll. Defaults to true. */\n async?: boolean;\n /** Wait for completion before returning the handle. */\n wait?: boolean;\n pollInterval?: number;\n maxWait?: number;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\n/** digitalhuman client. */\nexport class Digitalhuman {\n constructor(private transport: Transport) {}\n\n /** Digital Human video generation API — turn a portrait plus audio or text into a talking-head video. */\n async generate(options: DigitalhumanGenerateOptions): Promise<TaskHandle> {\n const body: Record<string, unknown> = {};\n body[\"video_url\"] = options.videoUrl;\n body[\"text\"] = options.text ?? \"\\u5927\\u5bb6\\u597d\\uff0c\\u8fd9\\u662f\\u79bb\\u7ebf\\u751f\\u6210\\u7684\\u6570\\u5b57\\u4eba\\u3002\";\n body[\"speed\"] = options.speed ?? 1.0;\n body[\"steps\"] = options.steps ?? 40;\n body[\"engine\"] = options.engine ?? \"latentsync\";\n body[\"guidance\"] = options.guidance ?? 2.0;\n body[\"seam_fix\"] = options.seamFix ?? true;\n if (options.voiceId !== undefined) body[\"voice_id\"] = options.voiceId;\n if (options.audioUrl !== undefined) body[\"audio_url\"] = options.audioUrl;\n if (options.imageUrl !== undefined) body[\"image_url\"] = options.imageUrl;\n body[\"resolution\"] = options.resolution ?? \"720p\";\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"audioUrl\", \"callbackUrl\", \"engine\", \"guidance\", \"imageUrl\", \"maxWait\", \"pollInterval\", \"resolution\", \"seamFix\", \"speed\", \"steps\", \"text\", \"videoUrl\", \"voiceId\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n body.async = options.async ?? true;\n const result = (await this.transport.request('POST', \"/digital-human/videos\", { json: body })) as Record<string, unknown>;\n const handle = new TaskHandle(taskId(result), \"/digital-human/tasks\", this.transport, result);\n if (options.wait) {\n await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });\n }\n return handle;\n }\n\n /** Digital Human voice-clone API — upload an audio sample to clone a custom voice for speech synthesis. */\n async voices(options: DigitalhumanVoicesOptions): Promise<TaskHandle> {\n const body: Record<string, unknown> = {};\n body[\"audio_url\"] = options.audioUrl;\n body[\"lang\"] = options.lang ?? \"zh\";\n if (options.name !== undefined) body[\"name\"] = options.name;\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"audioUrl\", \"callbackUrl\", \"lang\", \"maxWait\", \"name\", \"pollInterval\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n body.async = options.async ?? true;\n const result = (await this.transport.request('POST', \"/digital-human/voices\", { json: body })) as Record<string, unknown>;\n const handle = new TaskHandle(taskId(result), \"/digital-human/tasks\", this.transport, result);\n if (options.wait) {\n await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });\n }\n return handle;\n }\n\n}\n","/**\n * Dreamina (dreamina) — generated from the platform OpenAPI spec.\n *\n * Do not edit by hand: run `python scripts/generate_providers.py`. Parameter\n * names, types, enums and required-ness all come from the live spec.\n */\n\nimport { Transport } from '../../runtime/transport';\nimport { TaskHandle } from '../../runtime/tasks';\n\n\nfunction taskId(result: Record<string, unknown>): string {\n if (typeof result?.task_id === 'string') return result.task_id;\n const data = result?.data as Record<string, unknown> | undefined;\n if (data && typeof data.task_id === 'string') return data.task_id;\n return typeof result?.id === 'string' ? result.id : '';\n}\n\nexport interface DreaminaGenerateOptions {\n /** Public URL for audio (mp3/wav). The character will lip-sync to it, and it is recommended that the duration be controlled within 60 seconds. */\n audioUrl: string;\n /** Public URL of portrait images. Clear frontal face effects are best. */\n imageUrl: string;\n /** The model being used is OmniHuman 1.5. */\n model?: \"omnihuman-1.5\";\n /** Optional text prompts for guiding expressions, emotions, stability, and style. */\n prompt?: string;\n /** Optional subject mask URL (from object detection) to specify and drive a particular person in a multi-person image. */\n maskUrl?: string[];\n /** Submit asynchronously and poll. Defaults to true. */\n async?: boolean;\n /** Wait for completion before returning the handle. */\n wait?: boolean;\n pollInterval?: number;\n maxWait?: number;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\n/** dreamina client. */\nexport class Dreamina {\n constructor(private transport: Transport) {}\n\n /** Audio-driven talking-photo digital human video generation (OmniHuman 1.5) */\n async generate(options: DreaminaGenerateOptions): Promise<TaskHandle> {\n const body: Record<string, unknown> = {};\n body[\"audio_url\"] = options.audioUrl;\n body[\"image_url\"] = options.imageUrl;\n body[\"model\"] = options.model ?? \"omnihuman-1.5\";\n if (options.prompt !== undefined) body[\"prompt\"] = options.prompt;\n if (options.maskUrl !== undefined) body[\"mask_url\"] = options.maskUrl;\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"audioUrl\", \"callbackUrl\", \"imageUrl\", \"maskUrl\", \"maxWait\", \"model\", \"pollInterval\", \"prompt\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n body.async = options.async ?? true;\n const result = (await this.transport.request('POST', \"/dreamina/videos\", { json: body })) as Record<string, unknown>;\n const handle = new TaskHandle(taskId(result), \"/dreamina/tasks\", this.transport, result);\n if (options.wait) {\n await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });\n }\n return handle;\n }\n\n}\n","/**\n * Fish (fish) — generated from the platform OpenAPI spec.\n *\n * Do not edit by hand: run `python scripts/generate_providers.py`. Parameter\n * names, types, enums and required-ness all come from the live spec.\n */\n\nimport { Transport } from '../../runtime/transport';\nimport { TaskHandle } from '../../runtime/tasks';\n\n\nfunction taskId(result: Record<string, unknown>): string {\n if (typeof result?.task_id === 'string') return result.task_id;\n const data = result?.data as Record<string, unknown> | undefined;\n if (data && typeof data.task_id === 'string') return data.task_id;\n return typeof result?.id === 'string' ? result.id : '';\n}\n\nexport interface FishGenerateOptions {\n /** Text content to be synthesized. Required, must be a non-empty string. */\n text: string;\n /** Top-p nucleus sampling parameter, controls output diversity. */\n topP?: number;\n /** Output audio format, default is `mp3`. */\n format?: \"mp3\" | \"wav\" | \"pcm\" | \"opus\";\n /** Delay mode. The upstream rejects null values, and defaults to `normal` when omitted. */\n latency?: \"normal\" | \"balanced\";\n /** Rhythm coverage parameters, forwarded as is to upstream (such as speech rate, volume, etc.). */\n prosody?: Record<string, unknown>;\n /** Is the input text subjected to text normalization processing by the upstream? */\n normalize?: boolean;\n /** Inline reference audio samples will be forwarded upstream as is, for zero-shot voice cloning. */\n references?: unknown[];\n /** MP3 bitrate when `format=mp3`. */\n mp3Bitrate?: number;\n /** Output the audio sampling rate (e.g., 16000, 22050, 44100). */\n sampleRate?: number;\n /** Sampling temperature (0.0–1.0). The higher the value, the more diverse the output; the lower the value, the more stable and consistent it is. */\n temperature?: number;\n /** The chunk length passed to the upstream synthesizer. */\n chunkLength?: number;\n /** Opus bitrate when `format=opus`. */\n opusBitrate?: number;\n /** Voice model ID (single speaker). A string array can also be passed in multi-speaker scenarios. */\n referenceId?: string;\n /** Maximum number of new tokens generated. */\n maxNewTokens?: number;\n /** Minimum block length. */\n minChunkLength?: number;\n /** The repetition penalty coefficient applied during the generation process. */\n repetitionPenalty?: number;\n /** Submit asynchronously and poll. Defaults to true. */\n async?: boolean;\n /** Wait for completion before returning the handle. */\n wait?: boolean;\n pollInterval?: number;\n maxWait?: number;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\nexport interface FishModelOptions {\n /** Name of the voice model. */\n title: string;\n /** The HTTP(S) URL of the audio file for cloning must be a single URL string. This interface does not support multipart/binary file uploads. */\n voices: string;\n /** Tags used for retrieval in public repositories (optional). */\n tags?: string[];\n /** Reference text corresponding to the audio sample (optional). */\n texts?: string[];\n /** The visibility of the model is set to `private` by default. */\n visibility?: \"public\" | \"private\";\n /** HTTP(S) URL of the voice model cover image (optional). */\n coverImage?: string;\n /** Description of the voice model (optional). */\n description?: string;\n /** If it is `true`, the upstream service will generate a sample voice after the training is completed. */\n generateSample?: boolean;\n /** If it is `true`, the upstream service will perform quality enhancement processing on the audio samples before training. */\n enhanceAudioQuality?: boolean;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\n/** fish client. */\nexport class Fish {\n constructor(private transport: Transport) {}\n\n /** Fish Audio text-to-speech API — convert text into natural speech using a chosen voice model. */\n async generate(options: FishGenerateOptions): Promise<TaskHandle> {\n const body: Record<string, unknown> = {};\n body[\"text\"] = options.text;\n if (options.topP !== undefined) body[\"top_p\"] = options.topP;\n if (options.format !== undefined) body[\"format\"] = options.format;\n if (options.latency !== undefined) body[\"latency\"] = options.latency;\n if (options.prosody !== undefined) body[\"prosody\"] = options.prosody;\n if (options.normalize !== undefined) body[\"normalize\"] = options.normalize;\n if (options.references !== undefined) body[\"references\"] = options.references;\n if (options.mp3Bitrate !== undefined) body[\"mp3_bitrate\"] = options.mp3Bitrate;\n if (options.sampleRate !== undefined) body[\"sample_rate\"] = options.sampleRate;\n if (options.temperature !== undefined) body[\"temperature\"] = options.temperature;\n if (options.chunkLength !== undefined) body[\"chunk_length\"] = options.chunkLength;\n if (options.opusBitrate !== undefined) body[\"opus_bitrate\"] = options.opusBitrate;\n body[\"reference_id\"] = options.referenceId ?? \"d7900c21663f485ab63ebdb7e5905036\";\n if (options.maxNewTokens !== undefined) body[\"max_new_tokens\"] = options.maxNewTokens;\n if (options.minChunkLength !== undefined) body[\"min_chunk_length\"] = options.minChunkLength;\n if (options.repetitionPenalty !== undefined) body[\"repetition_penalty\"] = options.repetitionPenalty;\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"callbackUrl\", \"chunkLength\", \"format\", \"latency\", \"maxNewTokens\", \"maxWait\", \"minChunkLength\", \"mp3Bitrate\", \"normalize\", \"opusBitrate\", \"pollInterval\", \"prosody\", \"referenceId\", \"references\", \"repetitionPenalty\", \"sampleRate\", \"temperature\", \"text\", \"topP\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n body.async = options.async ?? true;\n const result = (await this.transport.request('POST', \"/fish/tts\", { json: body })) as Record<string, unknown>;\n const handle = new TaskHandle(taskId(result), \"/fish/tasks\", this.transport, result);\n if (options.wait) {\n await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });\n }\n return handle;\n }\n\n /** Fish Audio model creation API — upload reference audio to create a custom voice-clone model. */\n async model(options: FishModelOptions): Promise<Record<string, unknown>> {\n const body: Record<string, unknown> = {};\n body[\"title\"] = options.title;\n body[\"voices\"] = options.voices;\n if (options.tags !== undefined) body[\"tags\"] = options.tags;\n if (options.texts !== undefined) body[\"texts\"] = options.texts;\n if (options.visibility !== undefined) body[\"visibility\"] = options.visibility;\n if (options.coverImage !== undefined) body[\"cover_image\"] = options.coverImage;\n if (options.description !== undefined) body[\"description\"] = options.description;\n if (options.generateSample !== undefined) body[\"generate_sample\"] = options.generateSample;\n if (options.enhanceAudioQuality !== undefined) body[\"enhance_audio_quality\"] = options.enhanceAudioQuality;\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"callbackUrl\", \"coverImage\", \"description\", \"enhanceAudioQuality\", \"generateSample\", \"maxWait\", \"pollInterval\", \"tags\", \"texts\", \"title\", \"visibility\", \"voices\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n return (await this.transport.request('POST', \"/fish/model\", { json: body })) as Record<string, unknown>;\n }\n\n}\n","/**\n * Flux (flux) — generated from the platform OpenAPI spec.\n *\n * Do not edit by hand: run `python scripts/generate_providers.py`. Parameter\n * names, types, enums and required-ness all come from the live spec.\n */\n\nimport { Transport } from '../../runtime/transport';\nimport { TaskHandle } from '../../runtime/tasks';\n\n\nfunction taskId(result: Record<string, unknown>): string {\n if (typeof result?.task_id === 'string') return result.task_id;\n const data = result?.data as Record<string, unknown> | undefined;\n if (data && typeof data.task_id === 'string') return data.task_id;\n return typeof result?.id === 'string' ? result.id : '';\n}\n\nexport interface FluxGenerateOptions {\n /** Types of operations for generating images. If it is `generate`, a new image will be created based on the prompt; if it is `edit`, the original image will be edited according to the prompt and `image_url`. */\n action: \"generate\" | \"edit\";\n /** Prompts for generating images. */\n prompt: string;\n /** Image size specifications. */\n size?: string;\n /** Number of generated images. */\n count?: number;\n /** Model used for generating images. */\n model?: \"flux-dev\" | \"flux-pro\" | \"flux-kontext-pro\" | \"flux-kontext-max\" | \"flux-2-flex\" | \"flux-2-pro\" | \"flux-2-max\" | \"flux-2-klein\";\n /** Link to the original image that needs editing. */\n imageUrl?: string;\n /** Submit asynchronously and poll. Defaults to true. */\n async?: boolean;\n /** Wait for completion before returning the handle. */\n wait?: boolean;\n pollInterval?: number;\n maxWait?: number;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\n/** flux client. */\nexport class Flux {\n constructor(private transport: Transport) {}\n\n /** Flux AI image generation API, generates 1 image per request. */\n async generate(options: FluxGenerateOptions): Promise<TaskHandle> {\n const body: Record<string, unknown> = {};\n body[\"action\"] = options.action;\n body[\"prompt\"] = options.prompt;\n body[\"size\"] = options.size ?? \"1024x1024\";\n if (options.count !== undefined) body[\"count\"] = options.count;\n if (options.model !== undefined) body[\"model\"] = options.model;\n if (options.imageUrl !== undefined) body[\"image_url\"] = options.imageUrl;\n for (const [key, value] of Object.entries(options)) {\n if (![\"action\", \"async\", \"callbackUrl\", \"count\", \"imageUrl\", \"maxWait\", \"model\", \"pollInterval\", \"prompt\", \"size\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n body.async = options.async ?? true;\n const result = (await this.transport.request('POST', \"/flux/images\", { json: body })) as Record<string, unknown>;\n const handle = new TaskHandle(taskId(result), \"/flux/tasks\", this.transport, result);\n if (options.wait) {\n await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });\n }\n return handle;\n }\n\n}\n","/**\n * Hailuo (hailuo) — generated from the platform OpenAPI spec.\n *\n * Do not edit by hand: run `python scripts/generate_providers.py`. Parameter\n * names, types, enums and required-ness all come from the live spec.\n */\n\nimport { Transport } from '../../runtime/transport';\nimport { TaskHandle } from '../../runtime/tasks';\n\n\nfunction taskId(result: Record<string, unknown>): string {\n if (typeof result?.task_id === 'string') return result.task_id;\n const data = result?.data as Record<string, unknown> | undefined;\n if (data && typeof data.task_id === 'string') return data.task_id;\n return typeof result?.id === 'string' ? result.id : '';\n}\n\nexport interface HailuoGenerateOptions {\n /** The operation type for video generation. When set to `generate`, it will generate a video based on the prompt. */\n action: \"generate\";\n /** The model used for generating videos has a default value of `minimax-t2v`. */\n model?: \"minimax-i2v\" | \"minimax-t2v\" | \"minimax-i2v-director\";\n /** Prompts for generating videos. */\n prompt?: string;\n /** You can specify the URL of the first frame image to generate a video from the image. */\n firstImageUrl?: string;\n /** Submit asynchronously and poll. Defaults to true. */\n async?: boolean;\n /** Wait for completion before returning the handle. */\n wait?: boolean;\n pollInterval?: number;\n maxWait?: number;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\n/** hailuo client. */\nexport class Hailuo {\n constructor(private transport: Transport) {}\n\n /** Minimax Hailuo AI video generation API. Supports minimax-t2v for text-to-video, minimax-i2v for image-to-video, and minimax-i2v-director for director mode with camera/movement instructions. */\n async generate(options: HailuoGenerateOptions): Promise<TaskHandle> {\n const body: Record<string, unknown> = {};\n body[\"action\"] = options.action;\n if (options.model !== undefined) body[\"model\"] = options.model;\n body[\"prompt\"] = options.prompt ?? \"\\u706b\\u6c14\";\n if (options.firstImageUrl !== undefined) body[\"first_image_url\"] = options.firstImageUrl;\n for (const [key, value] of Object.entries(options)) {\n if (![\"action\", \"async\", \"callbackUrl\", \"firstImageUrl\", \"maxWait\", \"model\", \"pollInterval\", \"prompt\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n body.async = options.async ?? true;\n const result = (await this.transport.request('POST', \"/hailuo/videos\", { json: body })) as Record<string, unknown>;\n const handle = new TaskHandle(taskId(result), \"/hailuo/tasks\", this.transport, result);\n if (options.wait) {\n await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });\n }\n return handle;\n }\n\n}\n","/**\n * Happyhorse (happyhorse) — generated from the platform OpenAPI spec.\n *\n * Do not edit by hand: run `python scripts/generate_providers.py`. Parameter\n * names, types, enums and required-ness all come from the live spec.\n */\n\nimport { Transport } from '../../runtime/transport';\nimport { TaskHandle } from '../../runtime/tasks';\n\n\nfunction taskId(result: Record<string, unknown>): string {\n if (typeof result?.task_id === 'string') return result.task_id;\n const data = result?.data as Record<string, unknown> | undefined;\n if (data && typeof data.task_id === 'string') return data.task_id;\n return typeof result?.id === 'string' ? result.id : '';\n}\n\nexport interface HappyhorseGenerateOptions {\n /** Random seed, range 0–2147483647. */\n seed?: number;\n /** HappyHorse model name. Different actions only support the corresponding model family. */\n model?: \"happyhorse-1.0-t2v\" | \"happyhorse-1.1-t2v\" | \"happyhorse-1.0-i2v\" | \"happyhorse-1.1-i2v\" | \"happyhorse-1.0-r2v\" | \"happyhorse-1.1-r2v\" | \"happyhorse-1.0-video-edit\";\n /** Output video aspect ratio. Text-to-video and reference image-to-video support this parameter; the first frame image-to-video will follow the aspect ratio of the first frame image. */\n ratio?: \"16:9\" | \"9:16\" | \"1:1\" | \"4:3\" | \"3:4\";\n /** Operation types. `generate` is for generating video from text, `image_to_video` is for generating video from the first frame image, `reference_to_video` is for generating video from reference images, and `video_edit` is for video editing based on video and reference images. */\n action?: \"generate\" | \"image_to_video\" | \"reference_to_video\" | \"video_edit\";\n /** Text prompt words. Text-to-video, reference image to video, and video editing scenarios are required. */\n prompt?: string;\n /** Output video duration (seconds), value range 3–15. The output duration of `video_edit` is determined by the input video. */\n duration?: number;\n /** The input image URL for the first frame of the video. Only used by `image_to_video`. */\n imageUrl?: string;\n /** URL of the video to be edited. For `video_edit` use only. */\n videoUrl?: string;\n /** Whether to add the HappyHorse watermark. Default is off. */\n watermark?: boolean;\n /** Reference image URL array. `reference_to_video` supports 1–9 images, `video_edit` supports 0–5 images. */\n imageUrls?: string[];\n /** Output video resolution, optional 720P or 1080P. */\n resolution?: \"720P\" | \"1080P\";\n /** Audio strategy for video editing. `auto` is determined by the model, `origin` retains the original audio of the input video. */\n audioSetting?: \"auto\" | \"origin\";\n /** Submit asynchronously and poll. Defaults to true. */\n async?: boolean;\n /** Wait for completion before returning the handle. */\n wait?: boolean;\n pollInterval?: number;\n maxWait?: number;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\n/** happyhorse client. */\nexport class Happyhorse {\n constructor(private transport: Transport) {}\n\n /** Call /happyhorse/videos. */\n async generate(options: HappyhorseGenerateOptions = {}): Promise<TaskHandle> {\n const body: Record<string, unknown> = {};\n if (options.seed !== undefined) body[\"seed\"] = options.seed;\n body[\"model\"] = options.model ?? \"happyhorse-1.1-t2v\";\n body[\"ratio\"] = options.ratio ?? \"16:9\";\n body[\"action\"] = options.action ?? \"generate\";\n body[\"prompt\"] = options.prompt ?? \"A cinematic white horse lifts its head, the mane moves gently in the sunrise wind, slow camera push in, warm film lighting\";\n body[\"duration\"] = options.duration ?? 5;\n body[\"image_url\"] = options.imageUrl ?? \"https://cdn.acedata.cloud/b1c82e4937.png\";\n body[\"video_url\"] = options.videoUrl ?? \"https://platform2.cdn.acedata.cloud/happyhorse/27837f92-d1c1-4db4-ad9a-4e6e81d9f6c1.mp4\";\n body[\"watermark\"] = options.watermark ?? false;\n if (options.imageUrls !== undefined) body[\"image_urls\"] = options.imageUrls;\n body[\"resolution\"] = options.resolution ?? \"1080P\";\n body[\"audio_setting\"] = options.audioSetting ?? \"auto\";\n for (const [key, value] of Object.entries(options)) {\n if (![\"action\", \"async\", \"audioSetting\", \"callbackUrl\", \"duration\", \"imageUrl\", \"imageUrls\", \"maxWait\", \"model\", \"pollInterval\", \"prompt\", \"ratio\", \"resolution\", \"seed\", \"videoUrl\", \"wait\", \"watermark\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n body.async = options.async ?? true;\n const result = (await this.transport.request('POST', \"/happyhorse/videos\", { json: body })) as Record<string, unknown>;\n const handle = new TaskHandle(taskId(result), \"/happyhorse/tasks\", this.transport, result);\n if (options.wait) {\n await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });\n }\n return handle;\n }\n\n}\n","/**\n * Localization (localization) — generated from the platform OpenAPI spec.\n *\n * Do not edit by hand: run `python scripts/generate_providers.py`. Parameter\n * names, types, enums and required-ness all come from the live spec.\n */\n\nimport { Transport } from '../../runtime/transport';\n\n\nexport interface LocalizationTranslateOptions {\n /** Please provide the content that needs to be translated. */\n input: Record<string, unknown>;\n /** The target language area to be translated to. */\n locale: \"en\" | \"de\" | \"pt\" | \"es\" | \"fr\" | \"zh-CN\" | \"zh-TW\" | \"it\" | \"ko\" | \"ja\" | \"ru\" | \"pl\" | \"fi\" | \"sv\" | \"el\" | \"uk\" | \"ar\" | \"sr\";\n /** The file type of the input text (such as `json` or `md`). */\n extension: \"json\" | \"md\";\n /** The large language model used for translation is `gpt-3.5` by default. */\n model?: \"gpt-3.5\" | \"gpt-4\";\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\n/** localization client. */\nexport class Localization {\n constructor(private transport: Transport) {}\n\n /** Translate a JSON input into any localized file */\n async translate(options: LocalizationTranslateOptions): Promise<Record<string, unknown>> {\n const body: Record<string, unknown> = {};\n body[\"input\"] = options.input;\n body[\"locale\"] = options.locale;\n body[\"extension\"] = options.extension;\n if (options.model !== undefined) body[\"model\"] = options.model;\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"callbackUrl\", \"extension\", \"input\", \"locale\", \"maxWait\", \"model\", \"pollInterval\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n return (await this.transport.request('POST', \"/localization/translate\", { json: body })) as Record<string, unknown>;\n }\n\n}\n","/**\n * Luma (luma) — generated from the platform OpenAPI spec.\n *\n * Do not edit by hand: run `python scripts/generate_providers.py`. Parameter\n * names, types, enums and required-ness all come from the live spec.\n */\n\nimport { Transport } from '../../runtime/transport';\nimport { TaskHandle } from '../../runtime/tasks';\n\n\nfunction taskId(result: Record<string, unknown>): string {\n if (typeof result?.task_id === 'string') return result.task_id;\n const data = result?.data as Record<string, unknown> | undefined;\n if (data && typeof data.task_id === 'string') return data.task_id;\n return typeof result?.id === 'string' ? result.id : '';\n}\n\nexport interface LumaGenerateOptions {\n /** Whether to enable loop playback for the generated video. */\n loop?: boolean;\n /** Operation type. Use `generate` when creating a video for the first time, and use `extend` when continuing an existing video. */\n action?: \"generate\" | \"extend\";\n /** Text prompts for generating videos. */\n prompt?: string;\n /** The timeout for the API return data (unit: seconds). */\n timeout?: number;\n /** The unique identifier of the generated video used for the continuation operation (`extend`). If both are specified, `video_id` takes precedence over `video_url`. */\n videoId?: string;\n /** The original video URL used for the extend operation (`extend`). If `video_id` is specified at the same time, then `video_id` shall prevail. */\n videoUrl?: string;\n /** Whether to enable automatic optimization enhancement for the input prompt text, suitable for use when unsure how to write prompt words. */\n enhancement?: boolean;\n /** Generate the aspect ratio of the video, for example `16:9`. */\n aspectRatio?: string;\n /** The URL of the ending frame image, which will be used as the last frame of the generated video. */\n endImageUrl?: string;\n /** The URL of the starting frame image, which will be used as the first frame of the generated video. */\n startImageUrl?: string;\n /** Submit asynchronously and poll. Defaults to true. */\n async?: boolean;\n /** Wait for completion before returning the handle. */\n wait?: boolean;\n pollInterval?: number;\n maxWait?: number;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\n/** luma client. */\nexport class Luma {\n constructor(private transport: Transport) {}\n\n /** Generate videos based on prompt and image frames */\n async generate(options: LumaGenerateOptions = {}): Promise<TaskHandle> {\n const body: Record<string, unknown> = {};\n body[\"loop\"] = options.loop ?? false;\n body[\"action\"] = options.action ?? \"generate\";\n body[\"prompt\"] = options.prompt ?? \"Astronauts shuttle from space to volcano\";\n body[\"timeout\"] = options.timeout ?? 300;\n if (options.videoId !== undefined) body[\"video_id\"] = options.videoId;\n if (options.videoUrl !== undefined) body[\"video_url\"] = options.videoUrl;\n body[\"enhancement\"] = options.enhancement ?? true;\n if (options.aspectRatio !== undefined) body[\"aspect_ratio\"] = options.aspectRatio;\n body[\"end_image_url\"] = options.endImageUrl ?? \"https://cdn.acedata.cloud/0iad3k.png\";\n body[\"start_image_url\"] = options.startImageUrl ?? \"https://cdn.acedata.cloud/r9vsv9.png\";\n for (const [key, value] of Object.entries(options)) {\n if (![\"action\", \"aspectRatio\", \"async\", \"callbackUrl\", \"endImageUrl\", \"enhancement\", \"loop\", \"maxWait\", \"pollInterval\", \"prompt\", \"startImageUrl\", \"timeout\", \"videoId\", \"videoUrl\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n body.async = options.async ?? true;\n const result = (await this.transport.request('POST', \"/luma/videos\", { json: body })) as Record<string, unknown>;\n const handle = new TaskHandle(taskId(result), \"/luma/tasks\", this.transport, result);\n if (options.wait) {\n await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });\n }\n return handle;\n }\n\n}\n","/**\n * Maestro (maestro) — generated from the platform OpenAPI spec.\n *\n * Do not edit by hand: run `python scripts/generate_providers.py`. Parameter\n * names, types, enums and required-ness all come from the live spec.\n */\n\nimport { Transport } from '../../runtime/transport';\n\n\nexport interface MaestroGenerateOptions {\n /** Natural-language brief describing the video to produce (the topic, what to show, tone, audience). The agent decides the script, visuals, voiceover and edit. */\n prompt: string;\n /** Output languages, e.g. [\"zh-cn\", \"en\"]. The first is the primary language; each additional one reuses the visuals with a localized voiceover + render and is billed +6 credits. */\n langs?: string[];\n /** 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. */\n style?: \"auto\" | \"cinematic\" | \"glass\" | \"luxury\" | \"swiss\" | \"modern\" | \"editorial\" | \"warm\" | \"vibrant\" | \"neon\" | \"mono\" | \"pastel\" | \"bold\" | \"industrial\" | \"futuristic\" | \"retro\";\n /** 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. */\n voice?: \"auto\" | \"warm-female\" | \"bright-female\" | \"anchor-female\" | \"clean-female\" | \"calm-male\" | \"deep-male\" | \"documentary-male\" | \"energetic-male\" | \"storyteller-male\";\n /** generate = a new video. remix / edit / extend = iterate on a previous video (require `ref_task_id`). */\n action?: \"generate\" | \"remix\" | \"edit\" | \"extend\";\n /** Output aspect ratio (hint — the agent may follow the prompt). */\n aspect?: \"9:16\" | \"16:9\" | \"1:1\";\n /** Production tier, a multiplier on the duration-based price. `draft` = a fast rough cut for previewing the idea (~0.5× the standard credits); `standard` = balanced (default, 1×); `premium` = richer, more detailed and polished (~2× the standard credits). Affects turnaround, detail and price. */\n quality?: \"draft\" | \"standard\" | \"premium\";\n /** Target video length in seconds (1–600, i.e. up to 10 minutes). Billed by duration: credits ≈ 0.85 × duration × quality multiplier × scenario multiplier, so a longer or video-native workflow costs proportionally more. */\n duration?: number;\n /** How to route the video — a hint; the AI director still decides the final structure. `auto` (default) = the director chooses from your brief. `narrated` = multi-scene narrated video with real photos + voiceover + data cards (people / brands / explainers / history / products). `drama` = acted short drama with characters + dialogue (短剧) and bills at 1.35×. `avatar` = talking-head / digital human (needs a portrait image via `file_urls`, or a chosen digital human) and bills at 1.15×. `motion` = abstract kinetic-typography / data / logo motion graphic. `slideshow` = presentation deck / pitch. Legacy values `general` / `explainer` / `product` / `website` / `changelog` / `captions` are still accepted (mapped to `auto`), and `slides` maps to `slideshow`. */\n scenario?: \"auto\" | \"narrated\" | \"drama\" | \"avatar\" | \"motion\" | \"slideshow\";\n /** Optional reference media (image / video / audio URLs) the agent can use — e.g. a product shot or logo to feature, footage to caption. */\n fileUrls?: string[];\n /** Required when `action` is remix / edit / extend: the task_id of the previous video to start from. */\n refTaskId?: string;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\nexport interface MaestroEstimatesOptions {\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\n/** maestro client. */\nexport class Maestro {\n constructor(private transport: Transport) {}\n\n /** Maestro Video Generation API */\n async generate(options: MaestroGenerateOptions): Promise<Record<string, unknown>> {\n const body: Record<string, unknown> = {};\n body[\"prompt\"] = options.prompt;\n body[\"langs\"] = options.langs ?? [\"zh-cn\"];\n body[\"style\"] = options.style ?? \"auto\";\n body[\"voice\"] = options.voice ?? \"auto\";\n body[\"action\"] = options.action ?? \"generate\";\n body[\"aspect\"] = options.aspect ?? \"9:16\";\n body[\"quality\"] = options.quality ?? \"standard\";\n body[\"duration\"] = options.duration ?? 30;\n body[\"scenario\"] = options.scenario ?? \"auto\";\n if (options.fileUrls !== undefined) body[\"file_urls\"] = options.fileUrls;\n if (options.refTaskId !== undefined) body[\"ref_task_id\"] = options.refTaskId;\n for (const [key, value] of Object.entries(options)) {\n if (![\"action\", \"aspect\", \"async\", \"callbackUrl\", \"duration\", \"fileUrls\", \"langs\", \"maxWait\", \"pollInterval\", \"prompt\", \"quality\", \"refTaskId\", \"scenario\", \"style\", \"voice\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n return (await this.transport.request('POST', \"/maestro/videos\", { json: body })) as Record<string, unknown>;\n }\n\n /** Call /maestro/estimates. */\n async estimates(options: MaestroEstimatesOptions = {}): Promise<Record<string, unknown>> {\n const body: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"callbackUrl\", \"maxWait\", \"pollInterval\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n return (await this.transport.request('POST', \"/maestro/estimates\", { json: body })) as Record<string, unknown>;\n }\n\n}\n","/**\n * NanoBanana (nano-banana) — generated from the platform OpenAPI spec.\n *\n * Do not edit by hand: run `python scripts/generate_providers.py`. Parameter\n * names, types, enums and required-ness all come from the live spec.\n */\n\nimport { Transport } from '../../runtime/transport';\nimport { TaskHandle } from '../../runtime/tasks';\n\n\nfunction taskId(result: Record<string, unknown>): string {\n if (typeof result?.task_id === 'string') return result.task_id;\n const data = result?.data as Record<string, unknown> | undefined;\n if (data && typeof data.task_id === 'string') return data.task_id;\n return typeof result?.id === 'string' ? result.id : '';\n}\n\nexport interface NanoBananaGenerateOptions {\n /** Image operation type. If it is `generate`, then generate an image based on the prompt; if it is `edit`, then edit the image based on the prompt and `image_urls`. */\n action: \"generate\" | \"edit\";\n /** Prompts for generating images. */\n prompt: string;\n /** The number of images to be generated or edited supports 1 to 4, with a default of 1. If some images fail to generate, the corresponding `data` only contains the successfully generated images and charges based on the number of successful ones. */\n count?: number;\n /** Models used for generating images. If not specified, the default is `nano-banana`. `nano-banana-2-lite` is an alias for `gemini-3.1-flash-lite-image` (only 1K, fast generation speed), `nano-banana-2` is an alias for `gemini-3.1-flash-image` (provides professional-level quality at flash speed), `nano-banana-pro` is an alias for `gemini-3-pro-image`, and `nano-banana` is an alias for `gemini-2.5-flash-image`. Models with the `:official` suffix (`nano-banana:official`, `nano-banana-2-lite:official`, `nano-banana-2:official`, `nano-banana-pro:official`) are provided through official channels, offering better image quality and stability, with different billing. */\n model?: \"nano-banana\" | \"nano-banana-2-lite\" | \"nano-banana-2\" | \"nano-banana-pro\" | \"nano-banana:official\" | \"nano-banana-2-lite:official\" | \"nano-banana-2:official\" | \"nano-banana-pro:official\";\n /** Link to the image that needs to be edited. It can be an accessible http or https URL, or a Base64 encoded image string in the format `data:image/png;base64,iVBORw0KG...`. Each image must not exceed 10MB in size. This parameter is required when `action` is `edit`. */\n imageUrls?: string[];\n /** Resolution of generated images. Supported values are `1K`, `2K`, `4K`, with a default of `1K`. If this parameter is specified, images will be generated at the specified resolution regardless of whether the `action` is `generate` or `edit` (smaller reference images can be redrawn at a higher resolution); if not specified, the default value of `1K` will be used. `nano-banana` and `nano-banana-2-lite` only support `1K`; `2K` / `4K` are only applicable to models that support high resolution. */\n resolution?: \"1K\" | \"2K\" | \"4K\";\n /** Aspect ratio for generating images. Supported values are `1:1`, `3:2`, `2:3`, `16:9`, `9:16`, `4:3`, `3:4`. If this parameter is specified, the specified aspect ratio will be used for generation regardless of whether `action` is `generate` or `edit`; if not specified, the default for `action` as `generate` is `1:1`, and for `action` as `edit`, it will automatically adopt the aspect ratio of the first image in `image_urls` to preserve the original composition. Note: In `edit` mode, specifying an aspect ratio that differs significantly from the original image will cause the model to redraw according to the new ratio, which may deviate from the reference image. */\n aspectRatio?: \"1:1\" | \"3:2\" | \"2:3\" | \"16:9\" | \"9:16\" | \"4:3\" | \"3:4\";\n /** Submit asynchronously and poll. Defaults to true. */\n async?: boolean;\n /** Wait for completion before returning the handle. */\n wait?: boolean;\n pollInterval?: number;\n maxWait?: number;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\n/** nano-banana client. */\nexport class NanoBanana {\n constructor(private transport: Transport) {}\n\n /** Google Nano Banana image generation and editing API. Supports nano-banana, nano-banana-2, and nano-banana-pro for text-to-image generation and reference-image editing. */\n async generate(options: NanoBananaGenerateOptions): Promise<TaskHandle> {\n const body: Record<string, unknown> = {};\n body[\"action\"] = options.action;\n body[\"prompt\"] = options.prompt;\n body[\"count\"] = options.count ?? 1;\n if (options.model !== undefined) body[\"model\"] = options.model;\n if (options.imageUrls !== undefined) body[\"image_urls\"] = options.imageUrls;\n if (options.resolution !== undefined) body[\"resolution\"] = options.resolution;\n body[\"aspect_ratio\"] = options.aspectRatio ?? \"1:1\";\n for (const [key, value] of Object.entries(options)) {\n if (![\"action\", \"aspectRatio\", \"async\", \"callbackUrl\", \"count\", \"imageUrls\", \"maxWait\", \"model\", \"pollInterval\", \"prompt\", \"resolution\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n body.async = options.async ?? true;\n const result = (await this.transport.request('POST', \"/nano-banana/images\", { json: body })) as Record<string, unknown>;\n const handle = new TaskHandle(taskId(result), \"/nano-banana/tasks\", this.transport, result);\n if (options.wait) {\n await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });\n }\n return handle;\n }\n\n}\n","/**\n * Producer (producer) — generated from the platform OpenAPI spec.\n *\n * Do not edit by hand: run `python scripts/generate_providers.py`. Parameter\n * names, types, enums and required-ness all come from the live spec.\n */\n\nimport { Transport } from '../../runtime/transport';\nimport { TaskHandle } from '../../runtime/tasks';\n\n\nfunction taskId(result: Record<string, unknown>): string {\n if (typeof result?.task_id === 'string') return result.task_id;\n const data = result?.data as Record<string, unknown> | undefined;\n if (data && typeof data.task_id === 'string') return data.task_id;\n return typeof result?.id === 'string' ? result.id : '';\n}\n\nexport interface ProducerUploadOptions {\n /** The CDN address for the custom audio files to be uploaded. */\n audioUrl: string;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\nexport interface ProducerVideosOptions {\n /** Reference audio ID. */\n audioId: string;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\nexport interface ProducerWavOptions {\n /** Reference audio ID. */\n audioId: string;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\nexport interface ProducerGenerateOptions {\n /** Lyrics content for generating audio. */\n lyric: string;\n /** Types of audio generation operations. Supported values include `generate` (generate based on prompts), `cover` (cover song), `extend` (continue writing), `variation` (variant), `swap_vocals` (replace vocals), `swap_instrumentals` (replace instrumentals), `replace_section` (replace section), `stems` (separate tracks). */\n action: \"generate\" | \"cover\" | \"extend\" | \"variation\" | \"swap_vocals\" | \"swap_instrumentals\" | \"replace_section\" | \"stems\";\n /** Prompts for generating audio should not exceed 200 characters in length. */\n prompt: string;\n /** Random seed used for audio generation. */\n seed?: string;\n /** The model used for generating music is `FUZZ-2.0` by default. */\n model?: \"FUZZ-2.0 Pro\" | \"FUZZ-2.0\" | \"FUZZ-2.0 Raw\" | \"FUZZ-1.1 Pro\" | \"FUZZ-1.0 Pro\" | \"FUZZ-1.0\" | \"FUZZ-1.1\" | \"FUZZ-0.8\";\n /** Title used for generating songs. */\n title?: string;\n /** Is it a custom mode? If `true`, the audio will be generated based on the `lyric`; otherwise, it will be generated based on the `prompt`. */\n custom?: boolean;\n /** The unique ID of the reference song. */\n audioId?: string;\n /** The degree of uniqueness of style can be selected between 0 and 1, with a default value of 0.5. */\n weirdness?: number;\n /** Specify the time point (in seconds) from which to continue writing the song. */\n continueAt?: number;\n /** If `true`, the generated audio will only contain the accompaniment, without vocal lyrics. */\n instrumental?: boolean;\n /** The impact intensity of the audio prompt words can be selected between 0.2 and 1, with a default value of 0.5. */\n soundStrength?: number;\n /** The degree of influence of lyrics on audio generation can be selected between 0 and 1, with a default value of 0.5. */\n lyricsStrength?: number;\n /** Replace the end time point of the segment (seconds). */\n replaceSectionEnd?: number;\n /** Replace the starting time point of the segment (seconds). */\n replaceSectionStart?: number;\n /** Submit asynchronously and poll. Defaults to true. */\n async?: boolean;\n /** Wait for completion before returning the handle. */\n wait?: boolean;\n pollInterval?: number;\n maxWait?: number;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\nexport interface ProducerLyricsOptions {\n /** Prompts for generating lyrics. */\n prompt: Record<string, unknown>;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\n/** producer client. */\nexport class Producer {\n constructor(private transport: Transport) {}\n\n /** Producer reference audio upload API, upload audio to get an audio_id for generation. */\n async upload(options: ProducerUploadOptions): Promise<Record<string, unknown>> {\n const body: Record<string, unknown> = {};\n body[\"audio_url\"] = options.audioUrl;\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"audioUrl\", \"callbackUrl\", \"maxWait\", \"pollInterval\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n return (await this.transport.request('POST', \"/producer/upload\", { json: body })) as Record<string, unknown>;\n }\n\n /** AceData Producer MP4 retrieval API. Pass an audio_id to receive an MP4 video download link with cover art. */\n async videos(options: ProducerVideosOptions): Promise<Record<string, unknown>> {\n const body: Record<string, unknown> = {};\n body[\"audio_id\"] = options.audioId;\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"audioId\", \"callbackUrl\", \"maxWait\", \"pollInterval\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n return (await this.transport.request('POST', \"/producer/videos\", { json: body })) as Record<string, unknown>;\n }\n\n /** AceData Producer WAV (lossless) retrieval API. Pass an audio_id to receive a WAV-format download link. */\n async wav(options: ProducerWavOptions): Promise<Record<string, unknown>> {\n const body: Record<string, unknown> = {};\n body[\"audio_id\"] = options.audioId;\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"audioId\", \"callbackUrl\", \"maxWait\", \"pollInterval\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n return (await this.transport.request('POST', \"/producer/wav\", { json: body })) as Record<string, unknown>;\n }\n\n /** Producer AI music generation API, generates 1 song per request. */\n async generate(options: ProducerGenerateOptions): Promise<TaskHandle> {\n const body: Record<string, unknown> = {};\n body[\"lyric\"] = options.lyric;\n body[\"action\"] = options.action;\n body[\"prompt\"] = options.prompt;\n if (options.seed !== undefined) body[\"seed\"] = options.seed;\n if (options.model !== undefined) body[\"model\"] = options.model;\n if (options.title !== undefined) body[\"title\"] = options.title;\n if (options.custom !== undefined) body[\"custom\"] = options.custom;\n if (options.audioId !== undefined) body[\"audio_id\"] = options.audioId;\n body[\"weirdness\"] = options.weirdness ?? false;\n body[\"continue_at\"] = options.continueAt ?? false;\n body[\"instrumental\"] = options.instrumental ?? false;\n body[\"sound_strength\"] = options.soundStrength ?? false;\n body[\"lyrics_strength\"] = options.lyricsStrength ?? false;\n body[\"replace_section_end\"] = options.replaceSectionEnd ?? false;\n body[\"replace_section_start\"] = options.replaceSectionStart ?? false;\n for (const [key, value] of Object.entries(options)) {\n if (![\"action\", \"async\", \"audioId\", \"callbackUrl\", \"continueAt\", \"custom\", \"instrumental\", \"lyric\", \"lyricsStrength\", \"maxWait\", \"model\", \"pollInterval\", \"prompt\", \"replaceSectionEnd\", \"replaceSectionStart\", \"seed\", \"soundStrength\", \"title\", \"wait\", \"weirdness\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n body.async = options.async ?? true;\n const result = (await this.transport.request('POST', \"/producer/audios\", { json: body })) as Record<string, unknown>;\n const handle = new TaskHandle(taskId(result), \"/producer/tasks\", this.transport, result);\n if (options.wait) {\n await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });\n }\n return handle;\n }\n\n /** Producer AI lyrics generation API, input a prompt to generate lyrics. */\n async lyrics(options: ProducerLyricsOptions): Promise<Record<string, unknown>> {\n const body: Record<string, unknown> = {};\n body[\"prompt\"] = options.prompt;\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"callbackUrl\", \"maxWait\", \"pollInterval\", \"prompt\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n return (await this.transport.request('POST', \"/producer/lyrics\", { json: body })) as Record<string, unknown>;\n }\n\n}\n","/**\n * Seedance (seedance) — generated from the platform OpenAPI spec.\n *\n * Do not edit by hand: run `python scripts/generate_providers.py`. Parameter\n * names, types, enums and required-ness all come from the live spec.\n */\n\nimport { Transport } from '../../runtime/transport';\nimport { TaskHandle } from '../../runtime/tasks';\n\n\nfunction taskId(result: Record<string, unknown>): string {\n if (typeof result?.task_id === 'string') return result.task_id;\n const data = result?.data as Record<string, unknown> | undefined;\n if (data && typeof data.task_id === 'string') return data.task_id;\n return typeof result?.id === 'string' ? result.id : '';\n}\n\nexport interface SeedanceGenerateOptions {\n /** Model ID for video generation */\n model: \"doubao-seedance-1-0-pro-250528\" | \"doubao-seedance-1-0-pro-fast-251015\" | \"doubao-seedance-1-5-pro-251215\" | \"doubao-seedance-1-0-lite-t2v-250428\" | \"doubao-seedance-1-0-lite-i2v-250428\" | \"doubao-seedance-2-0-260128\" | \"doubao-seedance-2-0-fast-260128\" | \"doubao-seedance-2-0-mini-260615\";\n /** Input content for video generation. Each entry must include one of `text`, `image_url`, `audio_url`, or `video_url` corresponding to the `type`. The meaning of other fields and whether they are required depends on the value of `type`. */\n content: unknown[];\n /** The random seed used for reproducible generation has a value range from -1 to 4294967295; -1 indicates randomness. */\n seed?: number;\n /** Aspect ratio of the generated video */\n ratio?: \"16:9\" | \"4:3\" | \"1:1\" | \"3:4\" | \"9:16\" | \"21:9\" | \"adaptive\";\n /** The frame count for generating a video must meet 25 + 4n (such as 29, 33, 37... 361). Either duration or frames can be specified; if both are specified, frames take priority over duration. */\n frames?: number;\n /** The duration of the generated video, in seconds. Either duration or frames can be specified; if both are specified, frames take priority over duration. The duration range varies for each model: Seedance 2.0 series is 4 to 15 seconds or -1, Seedance 1.5 Pro is 4 to 12 seconds or -1, and Seedance 1.0 series is 2 to 12 seconds. -1 indicates automatic duration. */\n duration?: number;\n /** Whether to add a watermark to the generated video. */\n watermark?: boolean;\n /** Video resolution. The default value depends on the model used: most models default to 720p, while the lite model defaults to 480p. Note that the supported resolutions vary by model: `4k` is only supported by doubao-seedance-2-0 (standard version); doubao-seedance-2-0-fast and doubao-seedance-2-0-mini do not support 1080p and 4k. */\n resolution?: \"480p\" | \"720p\" | \"1080p\" | \"4k\";\n /** Is the camera position fixed during the generation process? */\n camerafixed?: boolean;\n /** Whether to generate audio from video. The `doubao-seedance-1-5-pro-251215` and `doubao-seedance-2-0` series models support this parameter, while other models will ignore this parameter. */\n generateAudio?: boolean;\n /** Whether to return the last frame of the generated video. */\n returnLastFrame?: boolean;\n /** Task timeout threshold, unit in seconds */\n executionExpiresAfter?: number;\n /** Submit asynchronously and poll. Defaults to true. */\n async?: boolean;\n /** Wait for completion before returning the handle. */\n wait?: boolean;\n pollInterval?: number;\n maxWait?: number;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\n/** seedance client. */\nexport class Seedance {\n constructor(private transport: Transport) {}\n\n /** ByteDance Seedance video generation API. Supports doubao-seedance-1-0-pro-250528, doubao-seedance-1-0-pro-fast-251015, doubao-seedance-1-5-pro-251215, doubao-seedance-1-0-lite-t2v-250428, and doubao-s */\n async generate(options: SeedanceGenerateOptions): Promise<TaskHandle> {\n const body: Record<string, unknown> = {};\n body[\"model\"] = options.model;\n body[\"content\"] = options.content;\n if (options.seed !== undefined) body[\"seed\"] = options.seed;\n body[\"ratio\"] = options.ratio ?? \"16:9\";\n if (options.frames !== undefined) body[\"frames\"] = options.frames;\n if (options.duration !== undefined) body[\"duration\"] = options.duration;\n if (options.watermark !== undefined) body[\"watermark\"] = options.watermark;\n if (options.resolution !== undefined) body[\"resolution\"] = options.resolution;\n if (options.camerafixed !== undefined) body[\"camerafixed\"] = options.camerafixed;\n body[\"generate_audio\"] = options.generateAudio ?? false;\n body[\"return_last_frame\"] = options.returnLastFrame ?? false;\n body[\"execution_expires_after\"] = options.executionExpiresAfter ?? 172800;\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"callbackUrl\", \"camerafixed\", \"content\", \"duration\", \"executionExpiresAfter\", \"frames\", \"generateAudio\", \"maxWait\", \"model\", \"pollInterval\", \"ratio\", \"resolution\", \"returnLastFrame\", \"seed\", \"wait\", \"watermark\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n body.async = options.async ?? true;\n const result = (await this.transport.request('POST', \"/seedance/videos\", { json: body })) as Record<string, unknown>;\n const handle = new TaskHandle(taskId(result), \"/seedance/tasks\", this.transport, result);\n if (options.wait) {\n await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });\n }\n return handle;\n }\n\n}\n","/**\n * Seedream (seedream) — generated from the platform OpenAPI spec.\n *\n * Do not edit by hand: run `python scripts/generate_providers.py`. Parameter\n * names, types, enums and required-ness all come from the live spec.\n */\n\nimport { Transport } from '../../runtime/transport';\nimport { TaskHandle } from '../../runtime/tasks';\n\n\nfunction taskId(result: Record<string, unknown>): string {\n if (typeof result?.task_id === 'string') return result.task_id;\n const data = result?.data as Record<string, unknown> | undefined;\n if (data && typeof data.task_id === 'string') return data.task_id;\n return typeof result?.id === 'string' ? result.id : '';\n}\n\nexport interface SeedreamGenerateOptions {\n /** Models used for generating images. If not specified, the default is `doubao-seedream-5.0-lite`. `doubao-seedream-5.0-pro` is the latest flagship single image model (only generates single images, does not support group images, streaming, or online search). */\n model: \"doubao-seedream-5-0-pro-260628\" | \"doubao-seedream-5-0-260128\" | \"doubao-seedream-4-0-250828\" | \"doubao-seedream-4-5-251128\" | \"doubao-seedream-3-0-t2i-250415\" | \"doubao-seededit-3-0-i2i-250628\";\n /** Prompts for generating images. */\n prompt: string;\n /** Generate a random seed for image generation. The supported range is [-1, 2147483647], with a default value of `-1`. **Only `doubao-seedream-3.0-t2i` supports this parameter** (according to the official Volcengine documentation), other models do not accept this parameter. */\n seed?: number;\n /** Generate image dimensions or aspect ratios. Supports preset options (`1K`/`2K`/`3K`/`4K`), `adaptive` (adaptive reference image size), or explicit `<width>x<height>` format (e.g., `1024x1024`). **Different models support different preset options**: `doubao-seedream-5.0-pro` supports `1K`/`2K`; `doubao-seedream-5.0-lite` supports `2K`/`3K`/`4K`; `doubao-seedream-4.5` only supports `2K`/`4K`; `doubao-seedream-4.0` supports `1K`/`2K`/`4K`; `doubao-seedream-3.0-t2i` and `doubao-seedream-3.0-i2i` **do not support** any preset options and must receive explicit `<width>x<height>` values. */\n size?: \"1K\" | \"2K\" | \"3K\" | \"4K\" | \"adaptive\";\n /** Reference image links for image editing are required, supporting accessible http/https URLs, or base64 encoded image strings in the format `data:image/png;base64,iVBORw0KG...`. Each image must not exceed 10MB in size. This parameter is mandatory when using image-to-image models (such as `doubao-seededit-3.0-i2i`). */\n image?: string[];\n /** List of tools that can be called by the model. Currently, only `web_search` is supported. Applicable only to `doubao-seedream-5.0-lite`. */\n tools?: unknown[];\n /** Whether to return all images in a streaming manner, default is `false`. Only supports `doubao-seedream-5.0-lite`, `doubao-seedream-4.5`, and `doubao-seedream-4.0`. */\n stream?: boolean;\n /** Whether to add AI-generated watermark, default is `true`. */\n watermark?: boolean;\n /** The output image file format is `jpeg` by default. Only `doubao-seedream-5.0-pro` and `doubao-seedream-5.0-lite` are supported. */\n outputFormat?: \"jpeg\" | \"png\";\n /** Prompt word weight, the larger the value, the more relevant the generated result is to the prompt word. Only supports `doubao-seedream-3.0-t2i` (default value 2.5) and `doubao-seededit-3.0-i2i` (default value 5.5), both ranges are [1, 10]. */\n guidanceScale?: unknown;\n /** The response format defaults to `url`, and also supports `b64_json`. */\n responseFormat?: string;\n /** Optional prompt word optimization configuration. Only supports `doubao-seedream-5.0-lite`, `doubao-seedream-4.5` (only in `standard` mode), and `doubao-seedream-4.0`. */\n optimizePromptOptions?: Record<string, unknown>;\n /** The default value is `disabled`. Setting it to `auto` allows the model to generate a set of stylistically coherent related images (multi-image consistency, sharing characters, styles, and details across frames). Only `doubao-seedream-5.0-lite`, `doubao-seedream-4.5`, and `doubao-seedream-4.0` are supported. */\n sequentialImageGeneration?: \"auto\" | \"disabled\";\n /** Adjustable parameters for batch image generation. Effective only when `sequential_image_generation=auto`. Only supports `doubao-seedream-5.0-lite`, `doubao-seedream-4.5`, and `doubao-seedream-4.0`. */\n sequentialImageGenerationOptions?: Record<string, unknown>;\n /** Submit asynchronously and poll. Defaults to true. */\n async?: boolean;\n /** Wait for completion before returning the handle. */\n wait?: boolean;\n pollInterval?: number;\n maxWait?: number;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\n/** seedream client. */\nexport class Seedream {\n constructor(private transport: Transport) {}\n\n /** ByteDance Seedream high-quality image generation and editing API. Supports text-to-image models doubao-seedream-3-0-t2i-250415, doubao-seedream-4-0-250828, doubao-seedream-4-5-251128, doubao-seedream- */\n async generate(options: SeedreamGenerateOptions): Promise<TaskHandle> {\n const body: Record<string, unknown> = {};\n body[\"model\"] = options.model;\n body[\"prompt\"] = options.prompt;\n if (options.seed !== undefined) body[\"seed\"] = options.seed;\n body[\"size\"] = options.size ?? \"2K\";\n if (options.image !== undefined) body[\"image\"] = options.image;\n if (options.tools !== undefined) body[\"tools\"] = options.tools;\n if (options.stream !== undefined) body[\"stream\"] = options.stream;\n if (options.watermark !== undefined) body[\"watermark\"] = options.watermark;\n if (options.outputFormat !== undefined) body[\"output_format\"] = options.outputFormat;\n if (options.guidanceScale !== undefined) body[\"guidance_scale\"] = options.guidanceScale;\n if (options.responseFormat !== undefined) body[\"response_format\"] = options.responseFormat;\n if (options.optimizePromptOptions !== undefined) body[\"optimize_prompt_options\"] = options.optimizePromptOptions;\n if (options.sequentialImageGeneration !== undefined) body[\"sequential_image_generation\"] = options.sequentialImageGeneration;\n if (options.sequentialImageGenerationOptions !== undefined) body[\"sequential_image_generation_options\"] = options.sequentialImageGenerationOptions;\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"callbackUrl\", \"guidanceScale\", \"image\", \"maxWait\", \"model\", \"optimizePromptOptions\", \"outputFormat\", \"pollInterval\", \"prompt\", \"responseFormat\", \"seed\", \"sequentialImageGeneration\", \"sequentialImageGenerationOptions\", \"size\", \"stream\", \"tools\", \"wait\", \"watermark\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n body.async = options.async ?? true;\n const result = (await this.transport.request('POST', \"/seedream/images\", { json: body })) as Record<string, unknown>;\n const handle = new TaskHandle(taskId(result), \"/seedream/tasks\", this.transport, result);\n if (options.wait) {\n await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });\n }\n return handle;\n }\n\n}\n","/**\n * Suno (suno) — generated from the platform OpenAPI spec.\n *\n * Do not edit by hand: run `python scripts/generate_providers.py`. Parameter\n * names, types, enums and required-ness all come from the live spec.\n */\n\nimport { Transport } from '../../runtime/transport';\nimport { TaskHandle } from '../../runtime/tasks';\n\n\nfunction taskId(result: Record<string, unknown>): string {\n if (typeof result?.task_id === 'string') return result.task_id;\n const data = result?.data as Record<string, unknown> | undefined;\n if (data && typeof data.task_id === 'string') return data.task_id;\n return typeof result?.id === 'string' ? result.id : '';\n}\n\nexport interface SunoGenerateOptions {\n /** Lyrics for generating music under custom mode (`custom` is `true`). `chirp-v3-5` and `chirp-v4` have a maximum of 3000 characters; `chirp-v4-5` and above (including `chirp-v5`, `chirp-v5-5`) have a maximum of 5000 characters. */\n lyric?: string;\n /** The model used for generating music has a default value of `chirp-v4`. */\n model?: \"chirp-v5-5\" | \"chirp-v5\" | \"chirp-v4-5-plus\" | \"chirp-v4-5\" | \"chirp-v4\" | \"chirp-v3-5\" | \"chirp-v3-0\";\n /** Music style description. `chirp-v3-5` and `chirp-v4` up to 200 characters; `chirp-v4-5` and above (including `chirp-v5`, `chirp-v5-5`) up to 1000 characters. */\n style?: string;\n /** Music Title (Custom Mode). `chirp-v3-5` and `chirp-v4` up to 80 characters; `chirp-v4-5` and above (including `chirp-v5`, `chirp-v5-5`) up to 100 characters. */\n title?: string;\n /** Types of operations for generating music. `generate`: Generate audio based on prompts; `extend`: Continue generating based on existing audio; `concat`: Stitch existing audio clips into a complete track; `cover`: Copy the musical style of an existing track and reinterpret it; `upload_cover`: Style cover of uploaded audio; `upload_extend`: Extend and continue generating uploaded audio; `artist_consistency`: Sing new songs in the style of a specified artist (Persona); `artist_consistency_vox`: Sing new songs in the style of a specified artist using VOX mode; `stems`: Separate the song into vocal and accompaniment tracks; `all_stems`: Separate the song into all independent tracks (vocals, drums, bass, other instruments); `replace_section`: Replace segments within a specified time period; `underpainting`: Generate and add AI accompaniment to the uploaded vocal track; `overpainting`: Generate and add AI vocals to the uploaded accompaniment track; `samples`: Add AI samples to the uploaded audio within a specified time period; `remaster`: Remaster existing audio to enhance sound quality; `mashup`: Mix and stitch multiple songs into one track; `inspo`: Generate new music inspired by 1 to 4 reference audio segments. */\n action?: \"generate\" | \"extend\" | \"upload_extend\" | \"upload_cover\" | \"concat\" | \"cover\" | \"artist_consistency\" | \"artist_consistency_vox\" | \"stems\" | \"all_stems\" | \"replace_section\" | \"underpainting\" | \"overpainting\" | \"remaster\" | \"mashup\" | \"samples\" | \"inspo\";\n /** Whether to enable the custom mode flag. If `true`, the audio will be generated based on the lyrics; otherwise, it will be generated based on the prompts. */\n custom?: boolean;\n /** The prompt words for generating music in inspiration mode (when `custom` is set to `false`) must not exceed 500 characters. For custom mode, please use `lyric` and `style`. */\n prompt?: Record<string, unknown>;\n /** Audio ID used for generating additional audio based on existing audio. This field is required when `action` is `extend` or `concat`. */\n audioId?: string;\n /** The \"Weirdness\" advanced parameter in the Suno official custom mode has a value range of 0 to 1, with higher values resulting in more creative and experimental outputs. It is only effective in custom mode. */\n weirdness?: number;\n /** A list of reference audio URLs for inspiration, requiring 1 to 4 publicly accessible audio addresses. This field is mandatory when `action` is `inspo`. */\n audioUrls?: string[];\n /** Generate the singer Persona ID used when creating songs based on the unique style characteristics of the specified singer. */\n personaId?: string;\n /** Continue generating from the specified time point (seconds) of the existing audio. For example, 213.5 means to continue from 3 minutes and 33.5 seconds. */\n continueAt?: number;\n /** Add the end time of the sample for the uploaded audio, which must be less than the total duration of the song. */\n samplesEnd?: number;\n /** The weight of the uploaded reference audio, with a value range from 0 to 1, where a higher value indicates greater reliance on the reference audio. This only takes effect during the cover operation. */\n audioWeight?: number;\n /** Pure accompaniment mode (no lyrics), default is `false`. When set to `true`, the lyrics filled in above will be ignored. */\n instrumental?: boolean;\n /** Prompts for automatically generating lyrics, effective only when `custom` is `true` and `lyric` is empty. */\n lyricPrompt?: Record<string, unknown>;\n /** Voice gender preference, selectable values are `'m'` (male voice) or `'f'` (female voice). Models `chirp-v4-5` and above are effective; this parameter is a preference item that can increase the probability of the target gender, but it does not guarantee strict adherence. */\n vocalGender?: string;\n /** Add a default start time for the uploaded audio sample, with a default value of 0. */\n samplesStart?: number;\n /** Styles of description that are not desired in music generation. */\n styleNegative?: string;\n /** The \"Style Influence\" advanced parameter in the Suno official custom mode has a value range of 0 to 1, with higher values being closer to the selected style. It is only effective in custom mode. */\n styleInfluence?: number;\n /** Audio ID list for mixing and mashup. This field is required when `action` is `mashup`. */\n mashupAudioIds?: string[];\n /** Add the end time of the AI voice to the uploaded audio, which must be less than the total duration of the song. */\n overpaintingEnd?: number;\n /** Add the end time for the AI accompaniment to the uploaded audio, which must be less than the total duration of the song. */\n underpaintingEnd?: number;\n /** Set the default start time for the AI voice of the uploaded audio to 0. */\n overpaintingStart?: number;\n /** `variation_category` only supports version v5 and above, with only three optional values: `high`, `normal`, `subtle`. */\n variationCategory?: string;\n /** When `action` is `replace_section`, specify the end time (in seconds) of the segment to be replaced. */\n replaceSectionEnd?: number;\n /** Set the default start time for the AI accompaniment added to the uploaded audio, with a default value of 0. */\n underpaintingStart?: number;\n /** When `action` is `replace_section`, specify the start time (in seconds) of the segment to be replaced. */\n replaceSectionStart?: number;\n /** Submit asynchronously and poll. Defaults to true. */\n async?: boolean;\n /** Wait for completion before returning the handle. */\n wait?: boolean;\n pollInterval?: number;\n maxWait?: number;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\nexport interface SunoPersonaOptions {\n /** Names of singer styles. */\n name: string;\n /** Used to create generated song IDs in the style of the singer. */\n audioId: string;\n /** The end time of the vocal segment in the audio (seconds). */\n vocalEnd?: number;\n /** A textual description of the singer's style. */\n description?: string;\n /** The starting time (in seconds) of the vocal segment in the audio. */\n vocalStart?: number;\n /** Used to generate audio IDs in the style of new singers (vocal reference audio). */\n voxAudioId?: string;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\nexport interface SunoMp4Options {\n /** Used to obtain the song ID for the corresponding MP4 of the song. */\n audioId: string;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\nexport interface SunoVoicesOptions {\n /** Publicly accessible URL for audio files used to create sound. Must be in MP3 or WAV format, at least 10 seconds long, and must contain clear human voice of a single speaker, without background noise or background music. */\n audioUrl: string;\n /** Custom voice personality name. */\n name?: string;\n /** Description information for custom voice personality. */\n description?: string;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\nexport interface SunoTimingOptions {\n /** Need to obtain the audio ID for timing/caption data, which is the generated Suno song ID. */\n audioId: string;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\nexport interface SunoVoxOptions {\n /** The source audio ID used to extract human voice, which is the unique identifier of the Suno audio segment to be processed. */\n audioId: string;\n /** End time point for vocal extraction (unit: seconds). */\n vocalEnd?: number;\n /** The starting time point for vocal extraction (unit: seconds). */\n vocalStart?: number;\n /** Submit asynchronously and poll. Defaults to true. */\n async?: boolean;\n /** Wait for completion before returning the handle. */\n wait?: boolean;\n pollInterval?: number;\n maxWait?: number;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\nexport interface SunoWavOptions {\n /** Used to obtain the existing audio ID of WAV format audio. */\n audioId: string;\n /** Submit asynchronously and poll. Defaults to true. */\n async?: boolean;\n /** Wait for completion before returning the handle. */\n wait?: boolean;\n pollInterval?: number;\n maxWait?: number;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\nexport interface SunoMidiOptions {\n /** The source audio ID for generating MIDI will extract MIDI content based on the existing audio. */\n audioId: string;\n /** Submit asynchronously and poll. Defaults to true. */\n async?: boolean;\n /** Wait for completion before returning the handle. */\n wait?: boolean;\n pollInterval?: number;\n maxWait?: number;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\nexport interface SunoStyleOptions {\n /** Style prompts that need optimization. */\n prompt: string;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\nexport interface SunoLyricsOptions {\n /** The model used for generating lyrics has a default value of `default`, with optional values including `default` and `remi-v1`. */\n model: \"default\" | \"remi-v1\";\n /** Prompts for generating lyrics, describing the desired theme or style of the lyrics. */\n prompt: Record<string, unknown>;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\nexport interface SunoMashupLyricsOptions {\n /** The first paragraph of lyrics content used for mixed generation. */\n lyricsA: string;\n /** The content of the second verse for mixed-generated lyrics. */\n lyricsB: string;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\nexport interface SunoUploadOptions {\n /** The CDN address (URL) for the custom audio file to be uploaded. */\n audioUrl: string;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\n/** suno client. */\nexport class Suno {\n constructor(private transport: Transport) {}\n\n /** Suno AI music generation API, generates 2 songs per request with extension support. */\n async generate(options: SunoGenerateOptions = {}): Promise<TaskHandle> {\n const body: Record<string, unknown> = {};\n if (options.lyric !== undefined) body[\"lyric\"] = options.lyric;\n body[\"model\"] = options.model ?? \"chirp-v5-5\";\n if (options.style !== undefined) body[\"style\"] = options.style;\n if (options.title !== undefined) body[\"title\"] = options.title;\n body[\"action\"] = options.action ?? \"generate\";\n if (options.custom !== undefined) body[\"custom\"] = options.custom;\n body[\"prompt\"] = options.prompt ?? \"A song for Christmas\";\n if (options.audioId !== undefined) body[\"audio_id\"] = options.audioId;\n if (options.weirdness !== undefined) body[\"weirdness\"] = options.weirdness;\n body[\"audio_urls\"] = options.audioUrls ?? [\"https://cdn1.suno.ai/b481b17a-bf50-4e10-8adc-4d5635050893.mp3\"];\n if (options.personaId !== undefined) body[\"persona_id\"] = options.personaId;\n if (options.continueAt !== undefined) body[\"continue_at\"] = options.continueAt;\n if (options.samplesEnd !== undefined) body[\"samples_end\"] = options.samplesEnd;\n if (options.audioWeight !== undefined) body[\"audio_weight\"] = options.audioWeight;\n if (options.instrumental !== undefined) body[\"instrumental\"] = options.instrumental;\n if (options.lyricPrompt !== undefined) body[\"lyric_prompt\"] = options.lyricPrompt;\n if (options.vocalGender !== undefined) body[\"vocal_gender\"] = options.vocalGender;\n if (options.samplesStart !== undefined) body[\"samples_start\"] = options.samplesStart;\n if (options.styleNegative !== undefined) body[\"style_negative\"] = options.styleNegative;\n if (options.styleInfluence !== undefined) body[\"style_influence\"] = options.styleInfluence;\n if (options.mashupAudioIds !== undefined) body[\"mashup_audio_ids\"] = options.mashupAudioIds;\n if (options.overpaintingEnd !== undefined) body[\"overpainting_end\"] = options.overpaintingEnd;\n if (options.underpaintingEnd !== undefined) body[\"underpainting_end\"] = options.underpaintingEnd;\n if (options.overpaintingStart !== undefined) body[\"overpainting_start\"] = options.overpaintingStart;\n if (options.variationCategory !== undefined) body[\"variation_category\"] = options.variationCategory;\n if (options.replaceSectionEnd !== undefined) body[\"replace_section_end\"] = options.replaceSectionEnd;\n if (options.underpaintingStart !== undefined) body[\"underpainting_start\"] = options.underpaintingStart;\n if (options.replaceSectionStart !== undefined) body[\"replace_section_start\"] = options.replaceSectionStart;\n for (const [key, value] of Object.entries(options)) {\n if (![\"action\", \"async\", \"audioId\", \"audioUrls\", \"audioWeight\", \"callbackUrl\", \"continueAt\", \"custom\", \"instrumental\", \"lyric\", \"lyricPrompt\", \"mashupAudioIds\", \"maxWait\", \"model\", \"overpaintingEnd\", \"overpaintingStart\", \"personaId\", \"pollInterval\", \"prompt\", \"replaceSectionEnd\", \"replaceSectionStart\", \"samplesEnd\", \"samplesStart\", \"style\", \"styleInfluence\", \"styleNegative\", \"title\", \"underpaintingEnd\", \"underpaintingStart\", \"variationCategory\", \"vocalGender\", \"wait\", \"weirdness\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n body.async = options.async ?? true;\n const result = (await this.transport.request('POST', \"/suno/audios\", { json: body })) as Record<string, unknown>;\n const handle = new TaskHandle(taskId(result), \"/suno/tasks\", this.transport, result);\n if (options.wait) {\n await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });\n }\n return handle;\n }\n\n /** Suno singer style API, set song style based on a generated song ID. */\n async persona(options: SunoPersonaOptions): Promise<Record<string, unknown>> {\n const body: Record<string, unknown> = {};\n body[\"name\"] = options.name;\n body[\"audio_id\"] = options.audioId;\n if (options.vocalEnd !== undefined) body[\"vocal_end\"] = options.vocalEnd;\n if (options.description !== undefined) body[\"description\"] = options.description;\n if (options.vocalStart !== undefined) body[\"vocal_start\"] = options.vocalStart;\n if (options.voxAudioId !== undefined) body[\"vox_audio_id\"] = options.voxAudioId;\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"audioId\", \"callbackUrl\", \"description\", \"maxWait\", \"name\", \"pollInterval\", \"vocalEnd\", \"vocalStart\", \"voxAudioId\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n return (await this.transport.request('POST', \"/suno/persona\", { json: body })) as Record<string, unknown>;\n }\n\n /** Suno MP4 API, get MP4 file link via audio_id. */\n async mp4(options: SunoMp4Options): Promise<Record<string, unknown>> {\n const body: Record<string, unknown> = {};\n body[\"audio_id\"] = options.audioId;\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"audioId\", \"callbackUrl\", \"maxWait\", \"pollInterval\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n return (await this.transport.request('POST', \"/suno/mp4\", { json: body })) as Record<string, unknown>;\n }\n\n /** Suno Voice Clone API. Create a custom voice persona from an uploaded audio file for voice cloning in music generation. */\n async voices(options: SunoVoicesOptions): Promise<Record<string, unknown>> {\n const body: Record<string, unknown> = {};\n body[\"audio_url\"] = options.audioUrl;\n if (options.name !== undefined) body[\"name\"] = options.name;\n if (options.description !== undefined) body[\"description\"] = options.description;\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"audioUrl\", \"callbackUrl\", \"description\", \"maxWait\", \"name\", \"pollInterval\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n return (await this.transport.request('POST', \"/suno/voices\", { json: body })) as Record<string, unknown>;\n }\n\n /** Suno timeline API, get lyrics and audio timeline of generated music. */\n async timing(options: SunoTimingOptions): Promise<Record<string, unknown>> {\n const body: Record<string, unknown> = {};\n body[\"audio_id\"] = options.audioId;\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"audioId\", \"callbackUrl\", \"maxWait\", \"pollInterval\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n return (await this.transport.request('POST', \"/suno/timing\", { json: body })) as Record<string, unknown>;\n }\n\n /** Suno vocal/instrumental stems API. Pass an audio_id to asynchronously produce vocal-only and instrumental-only stem files for remixing and creative reuse. */\n async vox(options: SunoVoxOptions): Promise<TaskHandle> {\n const body: Record<string, unknown> = {};\n body[\"audio_id\"] = options.audioId;\n if (options.vocalEnd !== undefined) body[\"vocal_end\"] = options.vocalEnd;\n if (options.vocalStart !== undefined) body[\"vocal_start\"] = options.vocalStart;\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"audioId\", \"callbackUrl\", \"maxWait\", \"pollInterval\", \"vocalEnd\", \"vocalStart\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n body.async = options.async ?? true;\n const result = (await this.transport.request('POST', \"/suno/vox\", { json: body })) as Record<string, unknown>;\n const handle = new TaskHandle(taskId(result), \"/suno/tasks\", this.transport, result);\n if (options.wait) {\n await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });\n }\n return handle;\n }\n\n /** SUNO allows generating higher quality wav files based on the existing audio_id. */\n async wav(options: SunoWavOptions): Promise<TaskHandle> {\n const body: Record<string, unknown> = {};\n body[\"audio_id\"] = options.audioId;\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"audioId\", \"callbackUrl\", \"maxWait\", \"pollInterval\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n body.async = options.async ?? true;\n const result = (await this.transport.request('POST', \"/suno/wav\", { json: body })) as Record<string, unknown>;\n const handle = new TaskHandle(taskId(result), \"/suno/tasks\", this.transport, result);\n if (options.wait) {\n await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });\n }\n return handle;\n }\n\n /** Suno MIDI API, retrieve MIDI data from generated music. */\n async midi(options: SunoMidiOptions): Promise<TaskHandle> {\n const body: Record<string, unknown> = {};\n body[\"audio_id\"] = options.audioId;\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"audioId\", \"callbackUrl\", \"maxWait\", \"pollInterval\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n body.async = options.async ?? true;\n const result = (await this.transport.request('POST', \"/suno/midi\", { json: body })) as Record<string, unknown>;\n const handle = new TaskHandle(taskId(result), \"/suno/tasks\", this.transport, result);\n if (options.wait) {\n await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });\n }\n return handle;\n }\n\n /** SUNO allows us to input prompts to generate enhanced song styles. */\n async style(options: SunoStyleOptions): Promise<Record<string, unknown>> {\n const body: Record<string, unknown> = {};\n body[\"prompt\"] = options.prompt;\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"callbackUrl\", \"maxWait\", \"pollInterval\", \"prompt\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n return (await this.transport.request('POST', \"/suno/style\", { json: body })) as Record<string, unknown>;\n }\n\n /** Suno lyrics generation API. Generates structured song lyrics from a prompt; supports the default and remi-v1 models. */\n async lyrics(options: SunoLyricsOptions): Promise<Record<string, unknown>> {\n const body: Record<string, unknown> = {};\n body[\"model\"] = options.model;\n body[\"prompt\"] = options.prompt;\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"callbackUrl\", \"maxWait\", \"model\", \"pollInterval\", \"prompt\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n return (await this.transport.request('POST', \"/suno/lyrics\", { json: body })) as Record<string, unknown>;\n }\n\n /** Suno mashup lyrics API, merge two lyrics into a blended version. */\n async mashup_lyrics(options: SunoMashupLyricsOptions): Promise<Record<string, unknown>> {\n const body: Record<string, unknown> = {};\n body[\"lyrics_a\"] = options.lyricsA;\n body[\"lyrics_b\"] = options.lyricsB;\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"callbackUrl\", \"lyricsA\", \"lyricsB\", \"maxWait\", \"pollInterval\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n return (await this.transport.request('POST', \"/suno/mashup-lyrics\", { json: body })) as Record<string, unknown>;\n }\n\n /** Suno reference audio upload API, upload audio to get an audio_id for extended generation. */\n async upload(options: SunoUploadOptions): Promise<Record<string, unknown>> {\n const body: Record<string, unknown> = {};\n body[\"audio_url\"] = options.audioUrl;\n for (const [key, value] of Object.entries(options)) {\n if (![\"async\", \"audioUrl\", \"callbackUrl\", \"maxWait\", \"pollInterval\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n return (await this.transport.request('POST', \"/suno/upload\", { json: body })) as Record<string, unknown>;\n }\n\n}\n","/**\n * Wan (wan) — generated from the platform OpenAPI spec.\n *\n * Do not edit by hand: run `python scripts/generate_providers.py`. Parameter\n * names, types, enums and required-ness all come from the live spec.\n */\n\nimport { Transport } from '../../runtime/transport';\nimport { TaskHandle } from '../../runtime/tasks';\n\n\nfunction taskId(result: Record<string, unknown>): string {\n if (typeof result?.task_id === 'string') return result.task_id;\n const data = result?.data as Record<string, unknown> | undefined;\n if (data && typeof data.task_id === 'string') return data.task_id;\n return typeof result?.id === 'string' ? result.id : '';\n}\n\nexport interface WanGenerateOptions {\n /** Models for generating videos include optional values such as `wan2.6-t2v` (text-to-video), `wan2.6-i2v` (image-to-video), `wan2.6-i2v-flash` (fast version of image-to-video), and `wan2.6-r2v` (reference video generation). */\n model: \"wan2.6-i2v\" | \"wan2.6-r2v\" | \"wan2.6-i2v-flash\" | \"wan2.6-t2v\";\n /** Operation types. `text2video` indicates text-to-video, and `image2video` indicates image-to-video. */\n action: \"text2video\" | \"image2video\";\n /** Prompts for generating videos. */\n prompt: string;\n /** Video size specifications. */\n size?: string;\n /** Specify whether the generated video contains sound. */\n audio?: boolean;\n /** Specify the duration of the video to be generated (in seconds), with optional values of `5`, `10`, or `15`. */\n duration?: number;\n /** The URL of the audio file, the model will generate the corresponding video based on that audio. */\n audioUrl?: string;\n /** The URL of the starting frame image, which will serve as the first frame of the generated video. */\n imageUrl?: string;\n /** Specify the type of shots for the video, that is, whether the video consists of a single continuous shot (`single`) or multiple switching shots (`multi`). */\n shotType?: \"single\" | \"multi\";\n /** Specify the resolution level for generating the video, used to adjust the video clarity (total pixel count). The model will automatically scale to a similar total pixel count based on the selected resolution level, and the aspect ratio of the generated video will strive to remain consistent with the aspect ratio of the input image `image_url`. */\n resolution?: \"480P\" | \"720P\" | \"1080P\";\n /** Whether to enable intelligent rewriting of prompts. Once enabled, a large model will be used to intelligently expand the input prompts, which can significantly improve the generation effect of shorter prompts, but will increase processing time. */\n promptExtend?: boolean;\n /** Reverse prompt words, used to describe content that is not desired to appear in the video footage, can be used to limit the video visuals. Supports both Chinese and English, with a length not exceeding 500 characters; any excess will be automatically truncated. */\n negativePrompt?: string;\n /** An array of URLs for reference video files, used to extract the character images (and vocal tones, if any) from the reference videos to generate videos that match the reference features. */\n referenceVideoUrls?: string[];\n /** Submit asynchronously and poll. Defaults to true. */\n async?: boolean;\n /** Wait for completion before returning the handle. */\n wait?: boolean;\n pollInterval?: number;\n maxWait?: number;\n callbackUrl?: string;\n /** Any parameter added upstream before the SDK is regenerated. */\n [key: string]: unknown;\n}\n\n/** wan client. */\nexport class Wan {\n constructor(private transport: Transport) {}\n\n /** Generate videos based on prompt and image frames */\n async generate(options: WanGenerateOptions): Promise<TaskHandle> {\n const body: Record<string, unknown> = {};\n body[\"model\"] = options.model;\n body[\"action\"] = options.action;\n body[\"prompt\"] = options.prompt;\n if (options.size !== undefined) body[\"size\"] = options.size;\n body[\"audio\"] = options.audio ?? false;\n if (options.duration !== undefined) body[\"duration\"] = options.duration;\n if (options.audioUrl !== undefined) body[\"audio_url\"] = options.audioUrl;\n body[\"image_url\"] = options.imageUrl ?? \"https://cdn.acedata.cloud/r9vsv9.png\";\n if (options.shotType !== undefined) body[\"shot_type\"] = options.shotType;\n if (options.resolution !== undefined) body[\"resolution\"] = options.resolution;\n body[\"prompt_extend\"] = options.promptExtend ?? false;\n body[\"negative_prompt\"] = options.negativePrompt ?? \"Astronauts shuttle from space to volcano\";\n if (options.referenceVideoUrls !== undefined) body[\"reference_video_urls\"] = options.referenceVideoUrls;\n for (const [key, value] of Object.entries(options)) {\n if (![\"action\", \"async\", \"audio\", \"audioUrl\", \"callbackUrl\", \"duration\", \"imageUrl\", \"maxWait\", \"model\", \"negativePrompt\", \"pollInterval\", \"prompt\", \"promptExtend\", \"referenceVideoUrls\", \"resolution\", \"shotType\", \"size\", \"wait\"].includes(key) && value !== undefined) {\n body[key] = value;\n }\n }\n if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;\n body.async = options.async ?? true;\n const result = (await this.transport.request('POST', \"/wan/videos\", { json: body })) as Record<string, unknown>;\n const handle = new TaskHandle(taskId(result), \"/wan/tasks\", this.transport, result);\n if (options.wait) {\n await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });\n }\n return handle;\n }\n\n}\n","/** Provider-axis clients, generated from the platform OpenAPI specs. */\n\nexport { Digitalhuman } from './digitalhuman';\nexport { Dreamina } from './dreamina';\nexport { Fish } from './fish';\nexport { Flux } from './flux';\nexport { Hailuo } from './hailuo';\nexport { Happyhorse } from './happyhorse';\nexport { Localization } from './localization';\nexport { Luma } from './luma';\nexport { Maestro } from './maestro';\nexport { NanoBanana } from './nano-banana';\nexport { Producer } from './producer';\nexport { Seedance } from './seedance';\nexport { Seedream } from './seedream';\nexport { Suno } from './suno';\nexport { Wan } from './wan';\n\nimport { Transport } from '../../runtime/transport';\nimport { Digitalhuman } from './digitalhuman';\nimport { Dreamina } from './dreamina';\nimport { Fish } from './fish';\nimport { Flux } from './flux';\nimport { Hailuo } from './hailuo';\nimport { Happyhorse } from './happyhorse';\nimport { Localization } from './localization';\nimport { Luma } from './luma';\nimport { Maestro } from './maestro';\nimport { NanoBanana } from './nano-banana';\nimport { Producer } from './producer';\nimport { Seedance } from './seedance';\nimport { Seedream } from './seedream';\nimport { Suno } from './suno';\nimport { Wan } from './wan';\n\n/** Bind every generated provider client onto `client`. */\nexport function attachProviders(client: Record<string, unknown>, transport: Transport): void {\n client.digitalhuman = new Digitalhuman(transport);\n client.dreamina = new Dreamina(transport);\n client.fish = new Fish(transport);\n client.flux = new Flux(transport);\n client.hailuo = new Hailuo(transport);\n client.happyhorse = new Happyhorse(transport);\n client.localization = new Localization(transport);\n client.luma = new Luma(transport);\n client.maestro = new Maestro(transport);\n client.nanobanana = new NanoBanana(transport);\n client.producer = new Producer(transport);\n client.seedance = new Seedance(transport);\n client.seedream = new Seedream(transport);\n client.suno = new Suno(transport);\n client.wan = new Wan(transport);\n}\n","/** Top-level AceDataCloud client for TypeScript. */\n\nimport { Transport, TransportOptions } from './runtime/transport';\nimport type { PaymentHandler } from './runtime/payment';\nimport { AiChat } from './resources/aichat';\nimport { Chat } from './resources/chat';\nimport { Images } from './resources/images';\nimport { Audio } from './resources/audio';\nimport { Video } from './resources/video';\nimport { Search } from './resources/search';\nimport { Tasks } from './resources/tasks';\nimport { Files } from './resources/files';\nimport { Platform } from './resources/platform';\nimport { OpenAI } from './resources/openai';\nimport { Glm } from './resources/glm';\nimport { Veo } from './resources/veo';\nimport { Kling } from './resources/kling';\nimport { WebExtrator } from './resources/webextrator';\nimport { Face } from './resources/face';\nimport { ShortUrl } from './resources/shorturl';\nimport { attachProviders } from './resources/providers';\n\nexport interface AceDataCloudOptions {\n apiToken?: string;\n baseURL?: string;\n platformBaseURL?: string;\n timeout?: number;\n maxRetries?: number;\n headers?: Record<string, string>;\n /**\n * Optional payment handler invoked when the API returns `402 Payment\n * Required`. Use `createX402PaymentHandler` from\n * `@acedatacloud/x402-client` to enable on-chain payments via X402.\n */\n paymentHandler?: PaymentHandler;\n}\n\nexport class AceDataCloud {\n readonly aichat: AiChat;\n readonly chat: Chat;\n readonly images: Images;\n readonly audio: Audio;\n readonly video: Video;\n readonly search: Search;\n readonly tasks: Tasks;\n readonly files: Files;\n readonly platform: Platform;\n readonly openai: OpenAI;\n readonly glm: Glm;\n readonly veo: Veo;\n readonly kling: Kling;\n readonly webextrator: WebExtrator;\n readonly face: Face;\n readonly shorturl: ShortUrl;\n\n private transport: Transport;\n\n constructor(opts: AceDataCloudOptions = {}) {\n this.transport = new Transport({\n apiToken: opts.apiToken,\n baseURL: opts.baseURL,\n platformBaseURL: opts.platformBaseURL,\n timeout: opts.timeout,\n maxRetries: opts.maxRetries,\n headers: opts.headers,\n paymentHandler: opts.paymentHandler,\n });\n\n this.aichat = new AiChat(this.transport);\n this.chat = new Chat(this.transport);\n this.images = new Images(this.transport);\n this.audio = new Audio(this.transport);\n this.video = new Video(this.transport);\n this.search = new Search(this.transport);\n this.tasks = new Tasks(this.transport);\n this.files = new Files(this.transport);\n this.platform = new Platform(this.transport);\n this.openai = new OpenAI(this.transport);\n this.glm = new Glm(this.transport);\n this.veo = new Veo(this.transport);\n this.kling = new Kling(this.transport);\n this.webextrator = new WebExtrator(this.transport);\n this.face = new Face(this.transport);\n this.shorturl = new ShortUrl(this.transport);\n // Provider axis: one namespace per service, generated from the specs.\n attachProviders(this as unknown as Record<string, unknown>, this.transport);\n }\n}\n"],"mappings":";AAEO,IAAM,oBAAN,cAAgC,MAAM;AAAA,EAC3C,YAAY,SAAiB;AAC3B,UAAM,OAAO;AACb,SAAK,OAAO;AAAA,EACd;AACF;AAEO,IAAM,iBAAN,cAA6B,kBAAkB;AAAA,EACpD,YAAY,SAAiB;AAC3B,UAAM,OAAO;AACb,SAAK,OAAO;AAAA,EACd;AACF;AAEO,IAAM,WAAN,cAAuB,kBAAkB;AAAA,EAC9C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA,YAAY,MAMT;AACD,UAAM,KAAK,OAAO;AAClB,SAAK,OAAO;AACZ,SAAK,aAAa,KAAK;AACvB,SAAK,OAAO,KAAK;AACjB,SAAK,UAAU,KAAK;AACpB,SAAK,OAAO,KAAK,QAAQ,CAAC;AAAA,EAC5B;AACF;AAEO,IAAM,sBAAN,cAAkC,SAAS;AAAA,EAChD,YAAY,MAAiD;AAC3D,UAAM,IAAI;AACV,SAAK,OAAO;AAAA,EACd;AACF;AAEO,IAAM,qBAAN,cAAiC,SAAS;AAAA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AAA,EAER,YAAY,OAA4B,CAAC,GAAG;AAC1C,SAAK,YAAY,IAAI,UAAU;AAAA,MAC7B,UAAU,KAAK;AAAA,MACf,SAAS,KAAK;AAAA,MACd,iBAAiB,KAAK;AAAA,MACtB,SAAS,KAAK;AAAA,MACd,YAAY,KAAK;AAAA,MACjB,SAAS,KAAK;AAAA,MACd,gBAAgB,KAAK;AAAA,IACvB,CAAC;AAED,SAAK,SAAS,IAAI,OAAO,KAAK,SAAS;AACvC,SAAK,OAAO,IAAI,KAAK,KAAK,SAAS;AACnC,SAAK,SAAS,IAAI,OAAO,KAAK,SAAS;AACvC,SAAK,QAAQ,IAAI,MAAM,KAAK,SAAS;AACrC,SAAK,QAAQ,IAAI,MAAM,KAAK,SAAS;AACrC,SAAK,SAAS,IAAI,OAAO,KAAK,SAAS;AACvC,SAAK,QAAQ,IAAI,MAAM,KAAK,SAAS;AACrC,SAAK,QAAQ,IAAI,MAAM,KAAK,SAAS;AACrC,SAAK,WAAW,IAAI,SAAS,KAAK,SAAS;AAC3C,SAAK,SAAS,IAAI,OAAO,KAAK,SAAS;AACvC,SAAK,MAAM,IAAI,IAAI,KAAK,SAAS;AACjC,SAAK,MAAM,IAAI,IAAI,KAAK,SAAS;AACjC,SAAK,QAAQ,IAAI,MAAM,KAAK,SAAS;AACrC,SAAK,cAAc,IAAI,YAAY,KAAK,SAAS;AACjD,SAAK,OAAO,IAAI,KAAK,KAAK,SAAS;AACnC,SAAK,WAAW,IAAI,SAAS,KAAK,SAAS;AAE3C,oBAAgB,MAA4C,KAAK,SAAS;AAAA,EAC5E;AACF;","names":["path","taskId","taskId","taskId","taskId","taskId","Images","Tasks","Completions","ChatNamespace","taskId","taskId","taskId","taskId","taskId","taskId","taskId","taskId","taskId","taskId","taskId","taskId"]}
|