{"_id":"@apipass-dev/apipass-sdk","_rev":"7-71f09dc5348bef9358e75b83de288744","name":"@apipass-dev/apipass-sdk","dist-tags":{"latest":"1.1.6"},"versions":{"1.1.0":{"name":"@apipass-dev/apipass-sdk","version":"1.1.0","keywords":["apipass","llm","ai","sdk","typescript"],"author":"","license":"MIT","_id":"@apipass-dev/apipass-sdk@1.1.0","maintainers":[{"name":"apipass_dev","email":"myemailliao@gmail.com"}],"dist":{"shasum":"b999715b1053f603c33a26aa414ef4f4a4e30aa7","tarball":"https://registry.npmjs.org/@apipass-dev/apipass-sdk/-/apipass-sdk-1.1.0.tgz","fileCount":9,"integrity":"sha512-0xupD7umYgR4igLbAkefidVQPnjp5+PjSeGdQ/frIyETF7Qhhkqmrk5UjxeehwHNvl/jWWIgpuDJ6Mbl9Cpqww==","signatures":[{"sig":"MEUCIQDt+CJ5UiyYpoOH684l3zJE0ogFRkh/qlSwj1kSl2EuSgIgDO9lbowZO0CLE2311r43an9zNbJnU4yqhjdxP64CgKA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":170850},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"1d29b6e237af8d9373e0978db97617a744ec11ca","scripts":{"test":"vitest run","build":"tsup src/index.ts --format esm,cjs --dts --sourcemap --clean","typecheck":"tsc --noEmit","prepublishOnly":"npm run typecheck && npm run test && npm run build"},"_npmUser":{"name":"apipass_dev","email":"myemailliao@gmail.com"},"_npmVersion":"11.4.2","description":"TypeScript SDK for calling Apipass large language model APIs.","directories":{},"sideEffects":false,"_nodeVersion":"24.4.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","vitest":"^3.1.0","typescript":"^5.8.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apipass-sdk_1.1.0_1779969384572_0.5084260980973876","host":"s3://npm-registry-packages-npm-production"}},"1.1.2":{"name":"@apipass-dev/apipass-sdk","version":"1.1.2","keywords":["apipass","llm","ai","sdk","typescript"],"author":"","license":"MIT","_id":"@apipass-dev/apipass-sdk@1.1.2","maintainers":[{"name":"apipass_dev","email":"myemailliao@gmail.com"}],"dist":{"shasum":"9cc9545db9619807e25b84ae429563a3cb4ddc42","tarball":"https://registry.npmjs.org/@apipass-dev/apipass-sdk/-/apipass-sdk-1.1.2.tgz","fileCount":9,"integrity":"sha512-9FW562X9zf3T2JHhLspCnW+aT3dtWV67yX+MaiWe/uY8pHiDMkUiThyxTYphab/7oy1m4CKs+SX28hL2y6RVuw==","signatures":[{"sig":"MEUCIQCwFzKwSNZ1DWh/GU+18TySCPmTf9y3rK/eZOUYQEjeWAIgIiLSeUqb2RwncSrbEhDyZlKTJFDJFBbG7LfVchkkzY0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1024314},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"f94eb9dd7ee1f3a012c965367763ada8494a2171","scripts":{"test":"vitest run","build":"tsup src/index.ts --format esm,cjs --dts --sourcemap --clean","typecheck":"tsc --noEmit","prepublishOnly":"npm run typecheck && npm run test && npm run build"},"_npmUser":{"name":"apipass_dev","email":"myemailliao@gmail.com"},"_npmVersion":"11.4.2","description":"TypeScript SDK for calling Apipass large language model APIs.","directories":{},"sideEffects":false,"_nodeVersion":"24.4.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","vitest":"^3.1.0","typescript":"^5.8.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apipass-sdk_1.1.2_1781070301646_0.8413115365877291","host":"s3://npm-registry-packages-npm-production"}},"1.1.3":{"name":"@apipass-dev/apipass-sdk","version":"1.1.3","keywords":["apipass","llm","ai","sdk","typescript"],"author":"","license":"MIT","_id":"@apipass-dev/apipass-sdk@1.1.3","maintainers":[{"name":"apipass_dev","email":"myemailliao@gmail.com"}],"dist":{"shasum":"e2bd71a97b90775e8d0e470e08dce91c815dcfed","tarball":"https://registry.npmjs.org/@apipass-dev/apipass-sdk/-/apipass-sdk-1.1.3.tgz","fileCount":9,"integrity":"sha512-p+1Nj6nXW0Fc2ndt080X+ZE+ZS1bRuiu8lYad/R/uMorY9qhxWRl3qL+kweCnJ8FpsyAWSnyFCWHM5Y074EADg==","signatures":[{"sig":"MEQCIELy6TfKLtOQBQ0phWGp2mh3eD2TZtKLe/qiWzzC5cOIAiAHOwcWnRftPx9t/2MOwPKLUfrl6C7TfjwIrGy/p0z/yg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1071813},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"aefb23aa2668a52e0b74e97565b4be5e09ed3b8b","scripts":{"test":"vitest run","build":"tsup src/index.ts --format esm,cjs --dts --sourcemap --clean","typecheck":"tsc --noEmit","prepublishOnly":"npm run typecheck && npm run test && npm run build"},"_npmUser":{"name":"apipass_dev","email":"myemailliao@gmail.com"},"_npmVersion":"11.4.2","description":"TypeScript SDK for calling Apipass large language model APIs.","directories":{},"sideEffects":false,"_nodeVersion":"24.4.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","vitest":"^3.1.0","typescript":"^5.8.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apipass-sdk_1.1.3_1781589299715_0.28792064420384067","host":"s3://npm-registry-packages-npm-production"}},"1.1.5":{"name":"@apipass-dev/apipass-sdk","version":"1.1.5","keywords":["apipass","llm","ai","sdk","typescript"],"author":"","license":"MIT","_id":"@apipass-dev/apipass-sdk@1.1.5","maintainers":[{"name":"apipass_dev","email":"myemailliao@gmail.com"}],"dist":{"shasum":"4dd8965db5a188a7ece8ccc1459aa14915b36187","tarball":"https://registry.npmjs.org/@apipass-dev/apipass-sdk/-/apipass-sdk-1.1.5.tgz","fileCount":7,"integrity":"sha512-A6DehTxGcp7hJUGBKnQtyECIxRNnwwrGgQnV3n39Xov46bt6/3bTJKn607P06/Ay9N3+Dy893M0qndXspJox7A==","signatures":[{"sig":"MEQCIByDOfqAm2gfiC8oY0G+OV6z4zWZCie11A7BlVrjyG62AiBjne/5XEIP6E3/5+/OxwLA9sqK5aJZLtyDqMAUxCsEOA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":676911},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"363f3ae3caef1411d253a1347cd171dada887b9e","scripts":{"test":"vitest run","build":"tsup src/index.ts --format esm,cjs --dts --clean","typecheck":"tsc --noEmit","prepublishOnly":"npm run typecheck && npm run test && npm run build"},"_npmUser":{"name":"apipass_dev","email":"myemailliao@gmail.com"},"_npmVersion":"11.4.2","description":"TypeScript SDK for calling Apipass large language model APIs.","directories":{},"sideEffects":false,"_nodeVersion":"24.4.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","vitest":"^3.1.0","typescript":"^5.8.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apipass-sdk_1.1.5_1782482388342_0.7324598912236344","host":"s3://npm-registry-packages-npm-production"}},"1.1.6":{"name":"@apipass-dev/apipass-sdk","version":"1.1.6","description":"TypeScript SDK for calling Apipass large language model APIs.","type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"sideEffects":false,"engines":{"node":">=18"},"publishConfig":{"access":"public"},"scripts":{"build":"tsup src/index.ts --format esm,cjs --dts --clean","typecheck":"tsc --noEmit","test":"vitest run","prepublishOnly":"npm run typecheck && npm run test && npm run build"},"keywords":["apipass","llm","ai","sdk","typescript"],"author":"","license":"MIT","devDependencies":{"@types/node":"^22.0.0","tsup":"^8.5.0","typescript":"^5.8.0","vitest":"^3.1.0"},"_id":"@apipass-dev/apipass-sdk@1.1.6","gitHead":"bb67c8c49a0be51915887a8e6417b487ceb38d2c","_nodeVersion":"24.4.1","_npmVersion":"11.4.2","dist":{"integrity":"sha512-Fu8u34mN0QUM3xG/fWV0cuMSDNBJfKmtwlAewmwLRvUPr8B4WgQnXDt06xWfT/YEG4WSfhxnY4yfOlU+UfCkJA==","shasum":"c1ddb065da098d7a28cf732cf9b0780de8cf6da9","tarball":"https://registry.npmjs.org/@apipass-dev/apipass-sdk/-/apipass-sdk-1.1.6.tgz","fileCount":7,"unpackedSize":706296,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCvFt2pivo5Sg2FKF2ZGh6t89So8Nfv8FbeMd4AdYcSTQIhAJ1U0KvOP0l2qFAxC9OryjYV23LH2r6sjB3WvI4hnue2"}]},"_npmUser":{"name":"apipass_dev","email":"myemailliao@gmail.com"},"directories":{},"maintainers":[{"name":"apipass_dev","email":"myemailliao@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/apipass-sdk_1.1.6_1782720990056_0.40344023018995623"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-28T11:56:24.358Z","modified":"2026-06-29T08:16:30.339Z","0.1.0":"2026-05-26T15:14:50.613Z","1.1.0":"2026-05-28T11:56:24.766Z","1.1.2":"2026-06-10T05:45:01.830Z","1.1.3":"2026-06-16T05:54:59.880Z","1.1.5":"2026-06-26T13:59:48.485Z","1.1.6":"2026-06-29T08:16:30.201Z"},"license":"MIT","keywords":["apipass","llm","ai","sdk","typescript"],"description":"TypeScript SDK for calling Apipass large language model APIs.","maintainers":[{"name":"apipass_dev","email":"myemailliao@gmail.com"}],"readme":"# Apipass SDK for JavaScript\n\nA small, type-friendly TypeScript SDK for calling Apipass large language model APIs.\n\nThe public API is intentionally close to popular model SDKs:\n\n```ts\nimport { Apipass } from \"@apipass-dev/apipass-sdk\";\n\nconst apiKey = process.env.APIPASS_API_KEY;\nif (!apiKey) {\n  throw new Error(\"Set APIPASS_API_KEY before creating the Apipass client.\");\n}\n\nconst client = new Apipass({\n  apiKey,\n});\n\nconst completion = await client.chat.completions.create({\n  model: \"apipass-chat\",\n  messages: [{ role: \"user\", content: \"Write a haiku about TypeScript.\" }],\n});\n\nconsole.log(completion.choices[0]?.message.content);\n```\n\n## Install\n\n```bash\nnpm install @apipass-dev/apipass-sdk\n```\n\n## Configuration\n\n```ts\nconst apiKey = process.env.APIPASS_API_KEY;\nif (!apiKey) {\n  throw new Error(\"Set APIPASS_API_KEY before creating the Apipass client.\");\n}\n\nconst client = new Apipass({\n  apiKey,\n  baseURL: \"https://api.apipass.dev/api/v1\",\n  timeout: 60_000,\n});\n```\n\n`apiKey` is required. If you store it in an environment variable, read it in your app and pass the resulting string explicitly.\n\n`baseURL` is optional and can only be overridden by passing it explicitly to the client constructor.\n\nChat completion and model catalog requests use Apipass' public `/v1` route. If you pass the default jobs base URL ending in `/api/v1`, the SDK automatically normalizes those public requests to `/v1`.\n\n## Resource Uploads\n\nUpload local resources to Apipass-managed Cloudflare storage before passing their public URLs to model inputs:\n\n```ts\nconst file = new Blob([\"hello\"], { type: \"text/plain\" });\n\nconst resource = await client.uploadResource({\n  file,\n  fileName: \"resources/hello.txt\",\n});\n\nconsole.log(resource.url);\n// https://cdn.apipass.dev/resources/hello.txt\n```\n\nThe same method is also available under the resource namespace:\n\n```ts\nconst image = await client.resources.upload({\n  file: imageBlob,\n  folder: \"images\",\n});\n```\n\nThe upload helper uses your Apipass API key to request a signed upload URL from Apipass, then uploads the resource to Cloudflare with that signed URL. If `fileName` is omitted, the SDK generates a unique object key under `folder` and infers the extension from the file name or content type.\n\n## Chat Completions\n\n```ts\nconst completion = await client.chat.completions.create({\n  model: \"apipass-chat\",\n  messages: [\n    { role: \"system\", content: \"You are concise.\" },\n    { role: \"user\", content: \"Explain embeddings in one sentence.\" },\n  ],\n  temperature: 0.3,\n});\n```\n\nGemini 3 Flash Preview is available as an SDK-known chat model:\n\n```ts\nimport { Models } from \"@apipass-dev/apipass-sdk\";\n\nconst completion = await client.chat.completions.create({\n  model: Models.Gemini3FlashPreview,\n  messages: [{ role: \"user\", content: \"Hello\" }],\n  temperature: 1,\n  max_tokens: 4096,\n  top_p: 1,\n  frequency_penalty: 0,\n  presence_penalty: 0,\n});\n\nconsole.log(completion.choices[0]?.message.content);\n```\n\nGemini 3 Pro Preview is also available as an SDK-known chat model, with the same chat completions API:\n\n```ts\nconst completion = await client.chat.completions.create({\n  model: Models.Gemini3ProPreview,\n  messages: [\n    {\n      role: \"user\",\n      content:\n        \"Design a high-frequency trading platform architecture for 1M TPS.\",\n    },\n  ],\n  stream: false,\n  temperature: 0.7,\n  max_tokens: 8192,\n  top_p: 0.95,\n  frequency_penalty: 0,\n  presence_penalty: 0,\n});\n\nconsole.log(completion.choices[0]?.message.content);\n```\n\nGPT-5.5 is available through the OpenAI-compatible chat completions endpoint as `Models.Gpt55`:\n\n```ts\nconst completion = await client.chat.completions.create({\n  model: Models.Gpt55,\n  messages: [\n    {\n      role: \"developer\",\n      content: \"Write concise product copy.\",\n    },\n    {\n      role: \"user\",\n      content:\n        \"Write a short product announcement for APIPASS GPT-5.5 support in ApiPass.\",\n    },\n  ],\n  stream: false,\n  temperature: 0.7,\n  max_tokens: 512,\n  top_p: 0.9,\n  frequency_penalty: 0,\n  presence_penalty: 0,\n  response_format: {\n    type: \"json_object\",\n  },\n  include_thoughts: false,\n  reasoning_effort: \"low\",\n});\n\nconsole.log(completion.choices[0]?.message.content);\n```\n\nThe `gpt-5.5` alias is also typed as a known chat model:\n\n```ts\nawait client.chat.completions.create({\n  model: \"gpt-5.5\",\n  messages: [\n    {\n      role: \"user\",\n      content: \"Summarize the following text in three concise bullets.\",\n    },\n  ],\n});\n```\n\nGemini 3 Flash Preview also accepts multimodal message content:\n\n```ts\nconst completion = await client.chat.completions.create({\n  model: Models.Gemini3FlashPreview,\n  messages: [\n    {\n      role: \"user\",\n      content: [\n        { type: \"text\", text: \"Describe this image\" },\n        {\n          type: \"image_url\",\n          image_url: {\n            url: \"https://example.com/image.jpg\",\n          },\n        },\n      ],\n    },\n  ],\n});\n```\n\n## Streaming\n\nWhen `stream: true` is passed, TypeScript narrows the return type to an async iterable stream.\n\n```ts\nconst stream = await client.chat.completions.create({\n  model: \"apipass-chat\",\n  messages: [{ role: \"user\", content: \"Count to five.\" }],\n  stream: true,\n});\n\nfor await (const chunk of stream) {\n  process.stdout.write(chunk.choices[0]?.delta.content ?? \"\");\n}\n```\n\n## Models\n\nSDK-known model IDs are exported as constants for autocomplete-friendly usage:\n\n```ts\nimport { Models } from \"@apipass-dev/apipass-sdk\";\n\nawait client.chat.completions.create({\n  model: Models.Gemini3FlashPreview,\n  messages: [{ role: \"user\", content: \"Hello\" }],\n});\n\nawait client.chat.completions.create({\n  model: Models.Gemini3ProPreview,\n  messages: [{ role: \"user\", content: \"Analyze this architecture.\" }],\n  temperature: 0.7,\n  max_tokens: 8192,\n});\n\nawait client.chat.completions.create({\n  model: Models.Gpt55,\n  messages: [\n    {\n      role: \"user\",\n      content:\n        \"Write a short product announcement for APIPASS GPT-5.5 support in ApiPass.\",\n    },\n  ],\n  temperature: 0.7,\n  max_tokens: 512,\n});\n\nawait client.jobs.createTask({\n  model: Models.NanoBanana2,\n  input: {\n    prompt: \"A serene alpine lake\",\n  },\n});\n\nawait client.jobs.createTask({\n  model: Models.NanoBananaPro,\n  input: {\n    prompt:\n      \"A high-quality editorial product image of a white ceramic coffee cup.\",\n    aspect_ratio: \"LANDSCAPE\",\n  },\n});\n\nawait client.jobs.createTask({\n  model: Models.FluxProImage2,\n  input: {\n    prompt:\n      \"Hyperrealistic supermarket blister pack on clean olive green surface with pink FLUX.2 letters under stretched plastic film.\",\n    aspect_ratio: \"1:1\",\n    resolution: \"1K\",\n  },\n});\n\nawait client.jobs.createTask({\n  model: Models.GptImage2,\n  input: {\n    prompt: \"A realistic product photo on a clean studio background\",\n    aspect_ratio: \"16:9\",\n    quality: \"medium\",\n    resolution: \"1k\",\n  },\n});\n\nawait client.jobs.createTask({\n  model: Models.GrokImagineTextToImage,\n  input: {\n    prompt:\n      \"Cinematic portrait of a woman sitting by a vinyl record player, retro living room background, soft ambient lighting, warm earthy tones, nostalgic 1970s wardrobe, gentle film grain texture.\",\n    aspect_ratio: \"3:2\",\n    enable_pro: false,\n  },\n});\n\nawait client.jobs.createTask({\n  model: Models.GrokImagineImageToImage,\n  input: {\n    image_urls: [\"https://example.com/reference.png\"],\n    prompt:\n      \"Recreate the Titanic movie poster with two adorable anthropomorphic cats in the same romantic pose at the bow of the ship.\",\n  },\n});\n\nawait client.jobs.createTask({\n  model: Models.QwenImage2,\n  input: {\n    prompt: \"A cinematic mountain lake at sunrise with mist and reflective water.\",\n    image_size: \"portrait_16_9\",\n    num_inference_steps: 40,\n    seed: 123456,\n    guidance_scale: 3.25,\n    output_format: \"jpeg\",\n    negative_prompt: \"blurry, low quality\",\n    acceleration: \"regular\",\n  },\n});\n\nawait client.jobs.createTask({\n  model: Models.Seedream5LiteImage,\n  input: {\n    prompt:\n      \"A premium cafe design SaaS hero image with architectural layout overlays and warm modern interiors.\",\n    aspect_ratio: \"16:9\",\n    quality: \"basic\",\n  },\n});\n\nawait client.jobs.createTask({\n  model: Models.Wan27Image,\n  input: {\n    prompt:\n      \"A cozy reading corner with warm wood shelves and soft afternoon sunlight.\",\n    input_urls: [\"https://example.com/source.jpg\"],\n    aspect_ratio: \"16:9\",\n    enable_sequential: false,\n    n: 4,\n    resolution: \"2K\",\n    thinking_mode: true,\n    color_palette: [{ hex: \"#D7C2A3\", ratio: \"32.00%\" }],\n    bbox_list: [[120, 80, 320, 260]],\n    watermark: false,\n    seed: 0,\n  },\n});\n\nawait client.jobs.createTask({\n  model: Models.Wan27ImagePro,\n  input: {\n    prompt:\n      \"A cozy reading corner with warm wood shelves and soft afternoon sunlight.\",\n    input_urls: [\"https://example.com/source.jpg\"],\n    aspect_ratio: \"16:9\",\n    enable_sequential: false,\n    n: 4,\n    resolution: \"2K\",\n    thinking_mode: true,\n    color_palette: [{ hex: \"#D7C2A3\", ratio: \"32.00%\" }],\n    bbox_list: [[120, 80, 320, 260]],\n    watermark: false,\n    seed: 0,\n  },\n});\n\nawait client.jobs.createTask({\n  model: Models.ImageFaceSwap,\n  input: {\n    face_image: \"https://static.wavespeed.ai/examples/face.jpeg\",\n    image: \"https://static.wavespeed.ai/examples/source.jpeg\",\n    target_index: 0,\n    output_format: \"jpeg\",\n    enable_base64_output: false,\n  },\n});\n\nawait client.jobs.createTask({\n  model: Models.ImageWatermakerRemove,\n  input: {\n    image: \"https://cdn.apipass.dev/20260506-114632.jpeg\",\n    output_format: \"jpeg\",\n    enable_base64_output: false,\n  },\n});\n\nawait client.jobs.createTask({\n  model: Models.GrokImagineImageToVideo,\n  input: {\n    image_urls: [\"https://example.com/reference.png\"],\n    prompt:\n      \"Make the scene come alive with a slow cinematic camera push-in and subtle atmospheric motion.\",\n    mode: \"normal\",\n    duration: 6,\n    resolution: \"480p\",\n    aspect_ratio: \"16:9\",\n  },\n});\n\nawait client.jobs.createTask({\n  model: Models.GrokImagineTextToVideo,\n  input: {\n    prompt:\n      \"A couple of doors open to the right one by one randomly and stay open, showing tiny rooms inside with little people living and working.\",\n    aspect_ratio: \"2:3\",\n    mode: \"normal\",\n    duration: 6,\n    resolution: \"480p\",\n  },\n});\n\nawait client.jobs.createTask({\n  model: Models.GrokImagineExtend,\n  input: {\n    task_id: \"task_grok_12345678\",\n    prompt:\n      \"The camera slowly pans forward, showing the protagonist walking deeper into the forest, with sunlight filtering through the leaves and casting dappled shadows.\",\n    extend_at: 0,\n    extend_times: 6,\n  },\n});\n\nawait client.jobs.createTask({\n  model: Models.GrokImagineUpscale,\n  input: {\n    task_id: \"task_grok_12345678\",\n  },\n});\n\nawait client.jobs.createTask({\n  model: Models.Hailuo23,\n  input: {\n    prompt:\n      \"A serene lake surrounded by mountains at sunset, with reflections on the water\",\n    duration: 6,\n    resolution: \"768p\",\n    prompt_optimizer: true,\n  },\n});\n\nawait client.jobs.createTask({\n  model: Models.OmniHuman15,\n  input: {\n    image_url: \"https://example.com/portrait.jpg\",\n    audio_url: \"https://example.com/audio.mp3\",\n    prompt: \"A woman plays the piano and sings.\",\n    fast_mode: true,\n  },\n});\n\nawait client.jobs.createTask({\n  model: Models.KlingAvatarV2,\n  input: {\n    image: \"https://example.com/avatar-image.jpg\",\n    audio: \"https://example.com/speech-audio.mp3\",\n    prompt:\n      \"A professional spokesperson delivering a speech with confident gestures\",\n    mode: \"std\",\n  },\n});\n\nawait client.jobs.createTask({\n  model: Models.Kling26,\n  input: {\n    prompt:\n      \"A majestic dragon flying over a medieval castle at sunset, cinematic lighting, epic fantasy, 4K quality\",\n    start_image: \"https://example.com/starting-frame.jpg\",\n    duration: 5,\n    aspect_ratio: \"16:9\",\n    generate_audio: true,\n    negative_prompt: \"blurry, low quality, distorted, watermark, text overlay\",\n  },\n});\n\nawait client.jobs.createTask({\n  model: Models.Kling26MotionControl,\n  input: {\n    image: [\n      \"https://static.aiquickdraw.com/tools/example/1767694885407_pObJoMcy.png\",\n    ],\n    video: [\n      \"https://static.aiquickdraw.com/tools/example/1767525918769_QyvTNib2.mp4\",\n    ],\n    prompt: \"The cartoon character is dancing energetically\",\n    character_orientation: \"video\",\n    mode: \"std\",\n    keep_original_sound: true,\n  },\n});\n\nawait client.jobs.createTask({\n  model: Models.KlingV3Video,\n  input: {\n    prompt:\n      \"A serene mountain landscape with a flowing river, golden hour lighting, cinematic quality.\",\n    negative_prompt: \"blurry, low quality, distorted\",\n    mode: \"pro\",\n    aspect_ratio: \"16:9\",\n    duration: 5,\n    generate_audio: false,\n  },\n});\n\nawait client.jobs.createTask({\n  model: Models.Seedance2,\n  input: {\n    prompt: \"A cinematic crystal hummingbird video.\",\n    resolution: \"720p\",\n    aspect_ratio: \"16:9\",\n    duration: 5,\n  },\n});\n\nawait client.jobs.createTask({\n  model: Models.Seedance2Fast,\n  input: {\n    prompt: \"A serene beach at sunset with waves gently crashing on the shore.\",\n    resolution: \"720p\",\n    aspect_ratio: \"16:9\",\n    duration: 5,\n    generate_audio: true,\n  },\n});\n\nawait client.jobs.createTask({\n  model: Models.Seedance2Mini,\n  input: {\n    prompt:\n      \"A quiet sunrise over a mountain lake, thin mist drifting across the water.\",\n    resolution: \"720p\",\n    aspect_ratio: \"16:9\",\n    duration: 5,\n    generate_audio: false,\n    web_search: false,\n  },\n});\n\nawait client.jobs.createTask({\n  model: Models.Veo31Fast,\n  input: {\n    prompt:\n      \"A cinematic handheld shot of a glass greenhouse in light rain, with slow camera movement.\",\n    aspect_ratio: \"LANDSCAPE\",\n    video_generate_type: \"text_to_video\",\n  },\n});\n\nawait client.jobs.createTask({\n  model: Models.Veo31Lite,\n  input: {\n    prompt: \"A simple white coffee cup on a wooden table, steam rising.\",\n    generationType: \"TEXT_2_VIDEO\",\n    aspect_ratio: \"16:9\",\n    enableTranslation: true,\n  },\n});\n\nawait client.jobs.createTask({\n  model: Models.Veo31Quality,\n  input: {\n    prompt:\n      \"A high-fidelity cinematic shot of a rain-soaked city street at night.\",\n    aspect_ratio: \"LANDSCAPE\",\n    video_generate_type: \"text_to_video\",\n  },\n});\n\nawait client.jobs.createTask({\n  model: Models.Wan26VideoToVideo,\n  input: {\n    prompt:\n      \"The video drinks milk tea while doing some improvised dance moves to the music.\",\n    video_urls: [\n      \"https://static.aiquickdraw.com/tools/example/1765957777782_cNJpvhRx.mp4\",\n    ],\n    duration: \"5\",\n    resolution: \"1080p\",\n  },\n});\n\nawait client.jobs.createTask({\n  model: Models.TextToDialogueV3,\n  input: {\n    dialogue: [\n      {\n        text: \"Hello and welcome.\",\n        voice: \"BIvP0GN1cAtSRTxNHnWS\",\n      },\n      {\n        text: \"Thanks, let's begin.\",\n        voice: \"aMSt68OGf4xUZAnLpTU8\",\n      },\n    ],\n    stability: 0.5,\n    language_code: \"eng\",\n  },\n});\n\nawait client.jobs.createTask({\n  model: Models.Music15,\n  input: {\n    lyrics:\n      \"[verse]\\nWalking down the street\\nFeeling the beat\\n[chorus]\\nThis is my song\\nCome sing along\",\n    prompt: \"Upbeat pop song with electronic beats and catchy melody\",\n    sample_rate: 44100,\n    bitrate: 256000,\n    audio_format: \"mp3\",\n  },\n});\n\nawait client.jobs.createTask({\n  model: Models.SunoGenerate,\n  input: {\n    model_version: \"V5_5\",\n    prompt: \"A catchy pop song about summer love with upbeat tempo\",\n  },\n});\n\nawait client.jobs.createTask({\n  model: Models.SunoExtend,\n  input: {\n    model_version: \"V5_5\",\n    audioId: \"abc123-def456-ghi789\",\n    continueAt: 120,\n    prompt: \"Build up to a powerful chorus with harmonies\",\n    style: \"Pop Rock, Uplifting\",\n    title: \"Rise Again (Extended)\",\n  },\n});\n\nawait client.jobs.createTask({\n  model: Models.SunoUploadExtend,\n  input: {\n    model_version: \"V5_5\",\n    audioUrl: \"https://your-storage.com/audio/my-song.mp3\",\n    continueAt: 60,\n    prompt: \"Build to an epic chorus with harmonies\",\n    style: \"Pop Rock, Uplifting\",\n    title: \"My Song (Extended)\",\n  },\n});\n\nawait client.jobs.createTask({\n  model: Models.SunoCover,\n  input: {\n    model_version: \"V5_5\",\n    audioUrl: \"https://your-storage.com/songs/original.mp3\",\n    prompt: \"Transform into smooth jazz with piano and saxophone\",\n  },\n});\n\nawait client.jobs.createTask({\n  model: Models.SunoLyrics,\n  input: {\n    prompt:\n      \"A love song about meeting someone at a coffee shop, romantic and upbeat mood\",\n  },\n});\n\nawait client.jobs.createTask({\n  model: Models.SunoVocalSeparation,\n  input: {\n    taskId: \"task_abc123xyz\",\n    audioId: \"audio_001\",\n  },\n});\n```\n\nTo fetch the complete currently available model list from the public catalog endpoint `GET /v1/models`, call `client.models()`:\n\n```ts\nconst onlineModels = await client.models();\n\n// Each item is a callable endpoint from the catalog's endpoints array.\n// Only id, name, input_schema, and example_request are returned.\nconsole.log(onlineModels.map((model) => model.name));\n```\n\nFetch the playground input fields for a specific model type from `GET /v1/models/types/{model}`:\n\n```ts\nconst fields = await client.info(Models.NanoBanana2);\n\nconsole.log(fields);\n```\n\n## Flux Pro Image 2\n\nFlux Pro Image 2 uses Apipass' asynchronous task API. The SDK exposes a typed wrapper that sends the public model name `flux/flux-pro-image-2` and maps camelCase helper fields to the API payload.\n\n```ts\nconst task = await client.images.fluxProImage2.create({\n  prompt:\n    \"Hyperrealistic supermarket blister pack on clean olive green surface with pink FLUX.2 letters under stretched plastic film.\",\n  aspectRatio: \"1:1\",\n  resolution: \"1K\",\n});\n\nconsole.log(task.data.taskId);\n```\n\nPoll for results with the task ID:\n\n```ts\nconst result = await client.images.fluxProImage2.retrieve(task.data.taskId);\n\nif (result.data.state === \"success\") {\n  console.log(result.data.result?.resultUrls);\n}\n```\n\nThe lower-level jobs API is typed for both the normalized snake_case fields and the adapter aliases:\n\n```ts\nawait client.jobs.createTask({\n  model: Models.FluxProImage2,\n  input: {\n    prompt: \"A polished studio product image with crisp reflections.\",\n    aspectRatio: \"16:9\",\n    resolution: \"2K\",\n  },\n});\n```\n\n## GPT Image 2\n\nGPT Image 2 uses Apipass' asynchronous task API. The SDK exposes a typed wrapper that sends the public model name `openai/gpt-image-2` and maps camelCase helper fields to the API payload.\n\n```ts\nconst task = await client.images.gptImage2.create({\n  prompt:\n    \"Generate an image: A realistic YouTube screenshot showing the official launch promotional video for GPT Image V2.\",\n  aspectRatio: \"16:9\",\n  quality: \"medium\",\n  resolution: \"1k\",\n});\n\nconsole.log(task.data.taskId);\n```\n\nPoll for results with the task ID:\n\n```ts\nconst result = await client.images.gptImage2.retrieve(task.data.taskId);\n\nif (result.data.state === \"success\") {\n  console.log(result.data.result?.resultUrls);\n}\n```\n\nEdit mode is enabled by passing one or more source image URLs:\n\n```ts\nawait client.images.gptImage2.create({\n  prompt: \"Turn this source image into a polished marketplace hero image.\",\n  images: [\"https://example.com/source.png\"],\n  aspectRatio: \"3:2\",\n  quality: \"high\",\n  resolution: \"2k\",\n  callBackUrl: \"https://your-domain.com/api/callback\",\n});\n```\n\n## Grok Imagine Image To Image\n\nGrok Imagine Image To Image uses Apipass' asynchronous task API to generate an image from one reference image plus an optional prompt. The SDK exposes a typed wrapper that sends the public model name `grok-imagine/image-to-image` and maps camelCase helper fields to the snake_case API payload.\n\n```ts\nconst task = await client.images.grokImagineImageToImage.create({\n  imageUrls: [\n    \"https://cdn.apipass.dev/apipass/results/task_78514b0d12c44ad4_0.png\",\n  ],\n  prompt:\n    \"Recreate the Titanic movie poster with two adorable anthropomorphic cats in the same romantic pose at the bow of the ship.\",\n});\n\nconsole.log(task.data.taskId);\n```\n\nPoll for image results with the task ID:\n\n```ts\nconst result = await client.images.grokImagineImageToImage.retrieve(\n  task.data.taskId,\n);\n\nif (result.data.state === \"success\") {\n  console.log(result.data.result?.resultUrls);\n}\n```\n\nThe model supports one reference image URL per request. For workflows that mention the image in the prompt, use the provider's `@image1` prompt convention:\n\n```ts\nawait client.images.grokImagineImageToImage.create({\n  imageUrls: [\"https://example.com/uploaded-reference.png\"],\n  prompt: \"@image1 restyle this image as a cinematic vintage poster.\",\n  callBackUrl: \"https://your-domain.com/api/callback\",\n});\n```\n\nThe helper validates exactly one non-empty `imageUrls` entry and, when provided, a string `prompt` up to 390000 characters before sending a request. Provider-side file constraints still apply for image format and size.\n\n## Grok Imagine Text To Image\n\nGrok Imagine Text To Image uses Apipass' asynchronous task API to generate images from a text prompt. The SDK exposes a typed wrapper that sends the public model name `grok-imagine/text-to-image` and maps camelCase helper fields to the snake_case API payload.\n\n```ts\nconst task = await client.images.grokImagineTextToImage.create({\n  prompt:\n    \"Cinematic portrait of a woman sitting by a vinyl record player, retro living room background, soft ambient lighting, warm earthy tones, nostalgic 1970s wardrobe, gentle film grain texture.\",\n  aspectRatio: \"3:2\",\n  enablePro: false,\n});\n\nconsole.log(task.data.taskId);\n```\n\nPoll for image results with the task ID:\n\n```ts\nconst result = await client.images.grokImagineTextToImage.retrieve(\n  task.data.taskId,\n);\n\nif (result.data.state === \"success\") {\n  console.log(result.data.result?.resultUrls);\n}\n```\n\nUse `enablePro: true` when you want the provider to prioritize quality mode over speed mode, and pass `callBackUrl` for completion notifications:\n\n```ts\nawait client.images.grokImagineTextToImage.create({\n  prompt:\n    \"A cinematic editorial portrait in a retro living room with warm ambient lighting and shallow depth of field.\",\n  aspectRatio: \"16:9\",\n  enablePro: true,\n  callBackUrl: \"https://your-domain.com/api/callback\",\n});\n```\n\nThe helper validates non-empty prompts, the 5000-character prompt limit, supported `aspectRatio` values, and boolean `enablePro` before sending a request. API defaults are used when `aspectRatio` and `enablePro` are omitted.\n\n## Qwen Image 2\n\nQwen Image 2 uses Apipass' asynchronous task API for image generation. The SDK exposes a typed wrapper that sends the public model name `qwen/qwen-image-2` and maps camelCase helper fields to the snake_case API payload.\n\n```ts\nconst task = await client.images.qwenImage2.create({\n  prompt: \"A cinematic mountain lake at sunrise with mist and reflective water.\",\n  imageSize: \"portrait_16_9\",\n  numInferenceSteps: 40,\n  seed: 123456,\n  guidanceScale: 3.25,\n  outputFormat: \"jpeg\",\n  negativePrompt: \"blurry, low quality\",\n  acceleration: \"regular\",\n});\n\nconsole.log(task.data.taskId);\n```\n\nPoll for generated images with the task ID:\n\n```ts\nconst result = await client.images.qwenImage2.retrieve(task.data.taskId);\n\nif (result.data.state === \"success\") {\n  console.log(result.data.result?.resultUrls);\n}\n```\n\nThe lower-level jobs API is typed for the normalized snake_case fields and the adapter aliases documented by Apipass:\n\n```ts\nawait client.jobs.createTask({\n  model: Models.QwenImage2,\n  input: {\n    prompt: \"A crisp editorial image of a glass pavilion beside a lake.\",\n    imageSize: \"landscape_16_9\",\n    numInferenceSteps: 32,\n    guidanceScale: 4,\n    output_format: \"png\",\n    negativePrompt: \"blur, watermark\",\n    acceleration: \"regular\",\n  },\n  callBackUrl: \"https://your-domain.com/api/callback\",\n});\n```\n\nThe helper validates non-empty prompts and numeric generation controls before sending a request. TypeScript suggests the documented image size presets, output format values, and acceleration modes, while the Apipass adapter still performs provider-specific normalization such as clamping step counts, converting `jpg` to `jpeg`, and falling back from unsupported string values.\n\n## Seedream 5 Lite Image\n\nSeedream 5 Lite Image uses Apipass' asynchronous task API for image generation. The SDK exposes a typed wrapper that sends the public model name `seedream/seedream-5-lite-image` and maps camelCase helper fields to the snake_case API payload.\n\n```ts\nconst task = await client.images.seedream5LiteImage.create({\n  prompt:\n    \"A premium cafe design SaaS hero image with architectural layout overlays and warm modern interiors.\",\n  aspectRatio: \"16:9\",\n  quality: \"basic\",\n});\n\nconsole.log(task.data.taskId);\n```\n\nPoll for generated images with the task ID:\n\n```ts\nconst result = await client.images.seedream5LiteImage.retrieve(\n  task.data.taskId,\n);\n\nif (result.data.state === \"success\") {\n  console.log(result.data.result?.resultUrls);\n}\n```\n\nThe lower-level jobs API is typed for the normalized snake_case fields and the adapter aliases documented by Apipass:\n\n```ts\nawait client.jobs.createTask({\n  model: Models.Seedream5LiteImage,\n  input: {\n    prompt: \"A modern interior design hero image with annotated floor plans.\",\n    aspectRatio: \"3:2\",\n    quality: \"high\",\n  },\n  callBackUrl: \"https://your-domain.com/api/callback\",\n});\n```\n\nThe helper validates non-empty prompts before sending a request. TypeScript suggests the documented aspect ratios and quality values, while the Apipass adapter still performs provider-specific normalization such as lowercasing quality and falling back from unsupported string values.\n\n## Wan 2.7 Image\n\nWan 2.7 Image uses Apipass' asynchronous task API for prompt-only image generation and image editing workflows. The SDK exposes a typed wrapper that sends the public model name `wan/wan-2-7-image` and maps camelCase helper fields to the snake_case API payload.\n\n```ts\nconst task = await client.images.wan27Image.create({\n  prompt:\n    \"A cozy reading corner with warm wood shelves and soft afternoon sunlight.\",\n  aspectRatio: \"16:9\",\n  n: 4,\n  resolution: \"2K\",\n  thinkingMode: true,\n  watermark: false,\n  seed: 0,\n});\n\nconsole.log(task.data.taskId);\n```\n\nPoll for generated images with the task ID:\n\n```ts\nconst result = await client.images.wan27Image.retrieve(task.data.taskId);\n\nif (result.data.state === \"success\") {\n  console.log(result.data.result?.resultUrls);\n}\n```\n\nImage editing workflows accept `inputUrls`; the helper also accepts `imageUrls`, `images`, or `imageInput` as aliases. If more than one source image alias is provided, the values must match.\n\n```ts\nawait client.images.wan27Image.create({\n  prompt: \"Restyle this room with warm wood, softer light, and refined decor.\",\n  inputUrls: [\"https://example.com/source.jpg\"],\n  enableSequential: false,\n  n: 2,\n  resolution: \"2K\",\n  colorPalette: [{ hex: \"#D7C2A3\", ratio: \"32.00%\" }],\n  bboxList: [[120, 80, 320, 260]],\n  watermark: false,\n  callBackUrl: \"https://your-domain.com/api/callback\",\n});\n```\n\nThe helper validates non-empty prompts, source image URL arrays, alias consistency, numeric `n` and `seed`, boolean switches, color palette entry shape, and bounding boxes before sending a request. TypeScript suggests the documented aspect ratios and resolutions, while the Apipass adapter still performs provider-specific behavior such as ignoring `aspect_ratio` for editing workflows, disabling `thinking_mode` for editing or sequential output, and clamping `n`.\n\n## Wan 2.7 Image Pro\n\nWan 2.7 Image Pro uses Apipass' asynchronous task API for prompt-only image generation and image editing workflows. The SDK exposes a typed wrapper that sends the public model name `wan/wan-2-7-image-pro` and maps camelCase helper fields to the snake_case API payload.\n\n```ts\nconst task = await client.images.wan27ImagePro.create({\n  prompt:\n    \"A cozy reading corner with warm wood shelves and soft afternoon sunlight.\",\n  aspectRatio: \"16:9\",\n  n: 4,\n  resolution: \"2K\",\n  thinkingMode: true,\n  watermark: false,\n  seed: 0,\n});\n\nconsole.log(task.data.taskId);\n```\n\nPoll for generated images with the task ID:\n\n```ts\nconst result = await client.images.wan27ImagePro.retrieve(task.data.taskId);\n\nif (result.data.state === \"success\") {\n  console.log(result.data.result?.resultUrls);\n}\n```\n\nImage editing workflows accept `inputUrls`; the helper also accepts `imageUrls`, `images`, or `imageInput` as aliases. If more than one source image alias is provided, the values must match.\n\n```ts\nawait client.images.wan27ImagePro.create({\n  prompt: \"Restyle this room with warm wood, softer light, and refined decor.\",\n  inputUrls: [\"https://example.com/source.jpg\"],\n  enableSequential: false,\n  n: 2,\n  resolution: \"2K\",\n  colorPalette: [{ hex: \"#D7C2A3\", ratio: \"32.00%\" }],\n  bboxList: [[120, 80, 320, 260]],\n  watermark: false,\n  callBackUrl: \"https://your-domain.com/api/callback\",\n});\n```\n\nThe helper validates non-empty prompts, source image URL arrays, alias consistency, numeric `n` and `seed`, boolean switches, color palette entry shape, and bounding boxes before sending a request. TypeScript suggests the documented aspect ratios and resolutions, while the Apipass adapter still performs provider-specific behavior such as ignoring `aspect_ratio` for editing workflows, disabling `thinking_mode` for editing or sequential output, and clamping `n`.\n\n## Image Face Swap\n\nImage Face Swap uses Apipass' asynchronous task API. The SDK exposes a typed wrapper that sends the public model name `apipass/image-face-swap`; the adapter also accepts `wavespeed-ai/image-face-swap` and `image-face-swap` aliases through the lower-level jobs API.\n\nUse face swap only with appropriate consent and rights for the images you submit.\n\n```ts\nconst task = await client.images.imageFaceSwap.create({\n  faceImage: \"https://static.wavespeed.ai/examples/face.jpeg\",\n  image: \"https://static.wavespeed.ai/examples/source.jpeg\",\n  targetIndex: 0,\n  outputFormat: \"jpeg\",\n  enableBase64Output: false,\n});\n\nconsole.log(task.data.taskId);\n```\n\nPoll for results with the task ID:\n\n```ts\nconst result = await client.images.imageFaceSwap.retrieve(task.data.taskId);\n\nif (result.data.state === \"success\") {\n  console.log(result.data.result?.resultUrls);\n}\n```\n\nThe Playground uploader's single-item image array shape is also accepted, and integer string target indices are supported:\n\n```ts\nawait client.images.imageFaceSwap.create({\n  faceImage: [\"https://static.wavespeed.ai/examples/face.jpeg\"],\n  image: [\"https://static.wavespeed.ai/examples/source.jpeg\"],\n  targetIndex: \"2\",\n  outputFormat: \"png\",\n  enableSyncMode: false,\n  callBackUrl: \"https://your-domain.com/api/callback\",\n});\n```\n\n## Image Watermaker Remove\n\nImage Watermaker Remove uses Apipass' asynchronous task API. The SDK exposes a typed wrapper that sends the public model name `apipass/image-watermaker-remove`; the public name intentionally follows the existing `watermaker` support-model spelling.\n\nUse watermark removal only for images you own, created, licensed, or otherwise have permission to modify.\n\n```ts\nconst task = await client.images.imageWatermakerRemove.create({\n  image: \"https://cdn.apipass.dev/20260506-114632.jpeg\",\n  outputFormat: \"jpeg\",\n  enableBase64Output: false,\n});\n\nconsole.log(task.data.taskId);\n```\n\nPoll for results with the task ID:\n\n```ts\nconst result = await client.images.imageWatermakerRemove.retrieve(\n  task.data.taskId,\n);\n\nif (result.data.state === \"success\") {\n  console.log(result.data.result?.resultUrls);\n}\n```\n\nThe Playground uploader's single-item image array shape is also accepted:\n\n```ts\nawait client.images.imageWatermakerRemove.create({\n  image: [\"https://cdn.apipass.dev/20260506-114632.jpeg\"],\n  outputFormat: \"png\",\n  enableSyncMode: false,\n  callBackUrl: \"https://your-domain.com/api/callback\",\n});\n```\n\n## Nano Banana Pro\n\nNano Banana Pro uses Apipass' asynchronous task API for image generation. The SDK exposes a typed wrapper that sends the public model name `google/nano-banana-pro` and maps the helper field `aspectRatio` to the API's `aspect_ratio` input field.\n\n```ts\nconst task = await client.images.nanoBananaPro.create({\n  prompt:\n    \"A high-quality editorial product image of a white ceramic coffee cup on a wooden table, steam rising.\",\n  aspectRatio: \"LANDSCAPE\",\n});\n\nconsole.log(task.data.taskId);\n```\n\nPoll for results with the task ID:\n\n```ts\nconst result = await client.images.nanoBananaPro.retrieve(task.data.taskId);\n\nif (result.data.state === \"success\") {\n  console.log(result.data.result?.resultUrls);\n}\n```\n\nReference images are supported:\n\n```ts\nawait client.images.nanoBananaPro.create({\n  prompt: \"Create a polished lifestyle product image from this reference.\",\n  aspectRatio: \"PORTRAIT\",\n  images: [\"https://example.com/reference.png\"],\n  callBackUrl: \"https://your-domain.com/api/callback\",\n});\n```\n\n## Nano Banana 2\n\nNano Banana 2 uses Apipass' asynchronous task API. The SDK exposes a typed wrapper so callers do not need to remember the raw endpoint, model name, or snake_case API fields.\n\n```ts\nconst task = await client.images.nanoBanana2.create({\n  prompt: \"A serene alpine lake reflecting snow-capped mountains at golden hour\",\n  imageInput: [\"https://example.com/reference.jpg\"],\n  aspectRatio: \"16:9\",\n  resolution: \"1K\",\n  outputFormat: \"jpg\",\n});\n\nconsole.log(task.data.taskId);\n```\n\nPoll for results with the task ID:\n\n```ts\nconst result = await client.images.nanoBanana2.retrieve(task.data.taskId);\n\nif (result.data.state === \"success\") {\n  console.log(result.data.result?.resultUrls);\n}\n```\n\nCallbacks are supported:\n\n```ts\nawait client.images.nanoBanana2.create({\n  prompt: \"A product photo on a clean studio background\",\n  resolution: \"2K\",\n  callBackUrl: \"https://your-domain.com/api/callback\",\n});\n```\n\n## Grok Imagine Text To Video\n\nGrok Imagine Text To Video uses Apipass' asynchronous task API to generate video from a text prompt. The SDK exposes a typed wrapper that sends the public model name `grok-imagine/text-to-video` and maps camelCase helper fields to the snake_case API payload.\n\n```ts\nconst task = await client.videos.grokImagineTextToVideo.create({\n  prompt:\n    \"A couple of doors open to the right one by one randomly and stay open, showing tiny rooms inside with little people living and working.\",\n  aspectRatio: \"2:3\",\n  mode: \"normal\",\n  duration: 6,\n  resolution: \"480p\",\n});\n\nconsole.log(task.data.taskId);\n```\n\nPoll for video results with the task ID:\n\n```ts\nconst result = await client.videos.grokImagineTextToVideo.retrieve(\n  task.data.taskId,\n);\n\nif (result.data.state === \"success\") {\n  console.log(result.data.result?.resultUrls);\n}\n```\n\nCallbacks are supported for production workflows:\n\n```ts\nawait client.videos.grokImagineTextToVideo.create({\n  prompt:\n    \"A cinematic tracking shot through a miniature apartment tower as doors open one by one.\",\n  aspectRatio: \"16:9\",\n  mode: \"normal\",\n  duration: 8,\n  resolution: \"720p\",\n  callBackUrl: \"https://your-domain.com/api/callback\",\n});\n```\n\nThe helper validates non-empty prompts, the 5000-character prompt limit, `duration` as an integer from 6 to 30 seconds, and supported `aspectRatio`, `mode`, and `resolution` values before sending a request. The API defaults are `aspectRatio: \"2:3\"`, `mode: \"normal\"`, `duration: 6`, and `resolution: \"480p\"` when those fields are omitted.\n\n## Grok Imagine Extend\n\nGrok Imagine Extend uses Apipass' asynchronous task API to extend a previously generated Grok Imagine video. The SDK exposes a typed wrapper that sends the public model name `grok-imagine/extend` and maps camelCase helper fields to the snake_case API payload.\n\n```ts\nconst task = await client.videos.grokImagineExtend.create({\n  taskId: \"task_grok_12345678\",\n  prompt:\n    \"The camera slowly pans forward, showing the protagonist walking deeper into the forest, with sunlight filtering through the leaves and casting dappled shadows.\",\n  extendAt: 0,\n  extendTimes: 6,\n});\n\nconsole.log(task.data.taskId);\n```\n\nPoll for extended video results with the task ID:\n\n```ts\nconst result = await client.videos.grokImagineExtend.retrieve(\n  task.data.taskId,\n);\n\nif (result.data.state === \"success\") {\n  console.log(result.data.result?.resultUrls);\n}\n```\n\nUse `extendTimes: 10` for a longer extension, and pass `callBackUrl` for completion notifications:\n\n```ts\nawait client.videos.grokImagineExtend.create({\n  taskId: \"task_grok_12345678\",\n  prompt:\n    \"Continue with a slow tracking shot as the subject walks into a brighter clearing.\",\n  extendAt: \"0\",\n  extendTimes: \"10\",\n  callBackUrl: \"https://your-domain.com/api/callback\",\n});\n```\n\nThe helper validates non-empty `taskId` and `prompt`, a present numeric `extendAt`, and `extendTimes` values of `6` or `10` before sending a request. Provider-side constraints still apply for whether the source `taskId` is a completed Apipass AI Grok Imagine video task.\n\n## Grok Imagine Upscale\n\nGrok Imagine Upscale uses Apipass' asynchronous task API to upscale a previously generated Grok Imagine video. The SDK exposes a typed wrapper that sends the public model name `grok-imagine/upscale` and maps `taskId` to the API's `task_id` input field.\n\n```ts\nconst task = await client.videos.grokImagineUpscale.create({\n  taskId: \"task_grok_12345678\",\n});\n\nconsole.log(task.data.taskId);\n```\n\nPoll for upscale results with the task ID:\n\n```ts\nconst result = await client.videos.grokImagineUpscale.retrieve(\n  task.data.taskId,\n);\n\nif (result.data.state === \"success\") {\n  console.log(result.data.result?.resultUrls);\n}\n```\n\nCallbacks are supported for production workflows:\n\n```ts\nawait client.videos.grokImagineUpscale.create({\n  taskId: \"task_grok_12345678\",\n  callBackUrl: \"https://your-domain.com/api/callback\",\n});\n```\n\nThe helper validates a non-empty `taskId` before sending a request. Provider-side constraints still apply for whether the source `taskId` is a completed Apipass AI Grok Imagine video task.\n\n## Grok Imagine Image To Video\n\nGrok Imagine Image To Video uses Apipass' asynchronous task API to animate either external reference images or one image from a previous `grok-imagine/text-to-image` task. The SDK exposes a typed wrapper that sends the public model name `grok-imagine/image-to-video` and maps camelCase helper fields to the snake_case API payload.\n\n```ts\nconst task = await client.videos.grokImagineImageToVideo.create({\n  imageUrls: [\n    \"https://cdn.apipass.dev/apipass/results/task_78514b0d12c44ad4_0.png\",\n  ],\n  prompt:\n    \"Make the scene come alive with a slow cinematic camera push-in and subtle atmospheric motion.\",\n  mode: \"normal\",\n  duration: 6,\n  resolution: \"480p\",\n  aspectRatio: \"16:9\",\n});\n\nconsole.log(task.data.taskId);\n```\n\nPoll for video results with the task ID:\n\n```ts\nconst result = await client.videos.grokImagineImageToVideo.retrieve(\n  task.data.taskId,\n);\n\nif (result.data.state === \"success\") {\n  console.log(result.data.result?.resultUrls);\n}\n```\n\nTo animate an image from a previous Grok text-to-image task, pass `taskId` and optionally `index` instead of `imageUrls`:\n\n```ts\nawait client.videos.grokImagineImageToVideo.create({\n  taskId: \"task_grok_12345678\",\n  index: 0,\n  prompt: \"Create a slow orbit camera move with subtle environmental motion.\",\n  mode: \"spicy\",\n  duration: 6,\n  resolution: \"720p\",\n  aspectRatio: \"16:9\",\n  callBackUrl: \"https://your-domain.com/api/callback\",\n});\n```\n\nThe helper validates that exactly one input source is provided, `imageUrls` contains 1 to 7 non-empty URLs, `taskId` is non-empty when used, `index` is an integer from 0 to 5, `duration` is an integer from 6 to 30 seconds, and `mode`, `resolution`, and `aspectRatio` use supported values before sending a request. Provider-side constraints still apply for image file size, image format, and source task compatibility.\n\n## Hailuo 2.3\n\nHailuo 2.3 uses Apipass' asynchronous task API for video generation. The SDK exposes a typed wrapper that sends the public model name `minimax/hailuo-2-3` and maps camelCase helper fields to the snake_case API payload.\n\n```ts\nconst task = await client.videos.hailuo23.create({\n  prompt:\n    \"A serene lake surrounded by mountains at sunset, with reflections on the water\",\n  duration: 6,\n  resolution: \"768p\",\n  promptOptimizer: true,\n});\n\nconsole.log(task.data.taskId);\n```\n\nPoll for video results with the task ID:\n\n```ts\nconst result = await client.videos.hailuo23.retrieve(task.data.taskId);\n\nif (result.data.state === \"success\") {\n  console.log(result.data.result?.resultUrls);\n}\n```\n\nImage-to-video generation is enabled by passing a first-frame image URL:\n\n```ts\nawait client.videos.hailuo23.create({\n  prompt: \"Animate this scene with a slow camera push and soft water motion.\",\n  firstFrameImage: \"https://example.com/image.jpg\",\n  duration: 6,\n  resolution: \"1080p\",\n  promptOptimizer: true,\n  callBackUrl: \"https://your-domain.com/api/callback\",\n});\n```\n\nThe helper validates non-empty prompts, the 2500-character prompt limit, and the documented `10s + 1080p` incompatibility before sending a request.\n\n## Omni Human 1.5\n\nOmni Human 1.5 uses Apipass' asynchronous task API for audio-driven human video generation. The SDK exposes a typed wrapper that sends the public model name `bytedance/omni-human-1-5` and maps camelCase helper fields to the snake_case API payload.\n\n```ts\nconst task = await client.videos.omniHuman15.create({\n  imageUrl: \"https://example.com/portrait.jpg\",\n  audioUrl: \"https://example.com/audio.mp3\",\n  prompt: \"A woman plays the piano and sings.\",\n  fastMode: true,\n});\n\nconsole.log(task.data.taskId);\n```\n\nPoll for generated video results with the task ID:\n\n```ts\nconst result = await client.videos.omniHuman15.retrieve(task.data.taskId);\n\nif (result.data.state === \"success\") {\n  console.log(result.data.result?.resultUrls);\n}\n```\n\nUse `fastMode: false` when you want to prioritize generation effects over speed. Audio files must be shorter than 35 seconds; longer audio will be rejected by the provider.\n\n```ts\nawait client.videos.omniHuman15.create({\n  imageUrl: \"https://example.com/portrait.jpg\",\n  audioUrl: \"https://example.com/audio.mp3\",\n  prompt: \"The character speaks directly to camera with subtle hand movement.\",\n  fastMode: false,\n  callBackUrl: \"https://your-domain.com/api/callback\",\n});\n```\n\nThe helper validates non-empty `imageUrl` and `audioUrl` values, the 2000-character prompt limit, and boolean `fastMode` before sending a request.\n\n## Kling Avatar V2\n\nKling Avatar V2 uses Apipass' asynchronous task API for avatar video generation. The SDK exposes a typed wrapper that sends the public model name `kling/avatar-v2`.\n\n```ts\nconst task = await client.videos.klingAvatarV2.create({\n  image: \"https://example.com/avatar-image.jpg\",\n  audio: \"https://example.com/speech-audio.mp3\",\n  prompt:\n    \"A professional spokesperson delivering a speech with confident gestures\",\n  mode: \"std\",\n});\n\nconsole.log(task.data.taskId);\n```\n\nPoll for avatar video results with the task ID:\n\n```ts\nconst result = await client.videos.klingAvatarV2.retrieve(task.data.taskId);\n\nif (result.data.state === \"success\") {\n  console.log(result.data.result?.resultUrls);\n}\n```\n\nUse `mode: \"pro\"` for the higher-quality generation mode, and pass `callBackUrl` if you want Apipass to notify your endpoint when the task finishes.\n\n```ts\nawait client.videos.klingAvatarV2.create({\n  image: \"https://example.com/avatar-image.jpg\",\n  audio: \"https://example.com/speech-audio.mp3\",\n  prompt: \"The avatar smiles, nods, and speaks directly to camera.\",\n  mode: \"pro\",\n  callBackUrl: \"https://your-domain.com/api/callback\",\n});\n```\n\nThe helper validates that `image` and `audio` are non-empty strings and that `prompt`, when provided, is at most 2500 characters before sending a request.\n\n## Kling 2.6\n\nKling 2.6 uses Apipass' asynchronous task API for video generation. The SDK exposes a typed wrapper that sends the public model name `kling/kling-2-6` and maps camelCase helper fields to the snake_case API payload.\n\n```ts\nconst task = await client.videos.kling26.create({\n  prompt:\n    \"A majestic dragon flying over a medieval castle at sunset, cinematic lighting, epic fantasy, 4K quality\",\n  startImage: \"https://example.com/starting-frame.jpg\",\n  duration: 5,\n  aspectRatio: \"16:9\",\n  generateAudio: true,\n  negativePrompt: \"blurry, low quality, distorted, watermark, text overlay\",\n});\n\nconsole.log(task.data.taskId);\n```\n\nPoll for video results with the task ID:\n\n```ts\nconst result = await client.videos.kling26.retrieve(task.data.taskId);\n\nif (result.data.state === \"success\") {\n  console.log(result.data.result?.resultUrls);\n}\n```\n\nThe helper also accepts `image` or `imageUrl` as aliases for `startImage`. If you pass more than one alias, the values must match.\n\n```ts\nawait client.videos.kling26.create({\n  prompt: \"A cinematic product reveal from the provided starting frame.\",\n  imageUrl: \"https://example.com/starting-frame.jpg\",\n  duration: 10,\n  aspectRatio: \"9:16\",\n  generateAudio: false,\n  callBackUrl: \"https://your-domain.com/api/callback\",\n});\n```\n\nThe helper validates non-empty prompts, the 2500-character prompt limits, duration values of `5` or `10`, aspect ratio values of `16:9`, `9:16`, or `1:1`, boolean `generateAudio`, and compatible start-image aliases before sending a request.\n\n## Kling 2.6 Motion Control\n\nKling 2.6 Motion Control uses Apipass' asynchronous task API to transfer motion from a reference video to a character reference image. The SDK exposes a typed wrapper that sends the public model name `kling/kling-2-6-motion-control` and maps camelCase helper fields to the snake_case API payload.\n\n```ts\nconst task = await client.videos.kling26MotionControl.create({\n  image: [\n    \"https://static.aiquickdraw.com/tools/example/1767694885407_pObJoMcy.png\",\n  ],\n  video: [\n    \"https://static.aiquickdraw.com/tools/example/1767525918769_QyvTNib2.mp4\",\n  ],\n  prompt: \"The cartoon character is dancing energetically\",\n  characterOrientation: \"video\",\n  mode: \"std\",\n  keepOriginalSound: true,\n});\n\nconsole.log(task.data.taskId);\n```\n\nPoll for motion-control video results with the task ID:\n\n```ts\nconst result = await client.videos.kling26MotionControl.retrieve(\n  task.data.taskId,\n);\n\nif (result.data.state === \"success\") {\n  console.log(result.data.result?.resultUrls);\n}\n```\n\nUse `characterOrientation: \"image\"` when the generated character should keep the facing direction from the character reference image, or `\"video\"` when it should follow the motion reference video. `mode: \"std\"` produces standard quality, while `mode: \"pro\"` requests professional quality.\n\n```ts\nawait client.videos.kling26MotionControl.create({\n  image: [\"https://example.com/character.png\"],\n  video: [\"https://example.com/motion.mp4\"],\n  prompt: \"The character walks forward and waves to the camera.\",\n  characterOrientation: \"image\",\n  mode: \"pro\",\n  keepOriginalSound: false,\n  callBackUrl: \"https://your-domain.com/api/callback\",\n});\n```\n\nThe helper validates non-empty `image` and `video` URL arrays, the 2500-character prompt limit, `characterOrientation` values of `image` or `video`, `mode` values of `std` or `pro`, and boolean `keepOriginalSound` before sending a request.\n\n## Kling V3 Video\n\nKling V3 Video uses Apipass' asynchronous task API for video generation. The SDK exposes a typed wrapper that sends the public model name `kling/kling-v3-video` and maps camelCase helper fields to the snake_case API payload.\n\n```ts\nconst task = await client.videos.klingV3Video.create({\n  prompt:\n    \"A serene mountain landscape with a flowing river, golden hour lighting, cinematic quality.\",\n  negativePrompt: \"blurry, low quality, distorted\",\n  mode: \"pro\",\n  aspectRatio: \"16:9\",\n  duration: 5,\n  generateAudio: false,\n});\n\nconsole.log(task.data.taskId);\n```\n\nPoll for video results with the task ID:\n\n```ts\nconst result = await client.videos.klingV3Video.retrieve(task.data.taskId);\n\nif (result.data.state === \"success\") {\n  console.log(result.data.result?.resultUrls);\n}\n```\n\nFirst-frame and last-frame image guidance is supported. `endImage` requires `startImage`; when `startImage` is provided, the API ignores `aspectRatio`.\n\n```ts\nawait client.videos.klingV3Video.create({\n  prompt: \"A polished product reveal with a slow dolly-in camera move.\",\n  startImage: \"https://example.com/my-image.jpg\",\n  endImage: \"https://example.com/my-end-image.jpg\",\n  mode: \"pro\",\n  duration: 5,\n  generateAudio: false,\n  callBackUrl: \"https://your-domain.com/api/callback\",\n});\n```\n\nMulti-shot mode accepts up to 6 shot prompts. Each shot must be at least 1 second, and the shot durations must sum to the top-level `duration` value.\n\n```ts\nawait client.videos.klingV3Video.create({\n  prompt: \"A two-shot cinematic travel video.\",\n  duration: 5,\n  multiPrompt: [\n    {\n      prompt: \"A wide sunrise shot over a quiet mountain valley.\",\n      duration: 3,\n    },\n    {\n      prompt: \"A close tracking shot along a clear flowing river.\",\n      duration: 2,\n    },\n  ],\n});\n```\n\nThe helper validates non-empty prompts, the 2500-character prompt limits, `endImage` requiring `startImage`, top-level duration from 3 to 15 seconds, and multi-shot duration compatibility before sending a request.\n\n## Seedance 2\n\nSeedance 2 uses Apipass' asynchronous task API for video generation. The SDK exposes a typed wrapper that sends the public model name `bytedance/seedance-2` and maps camelCase helper fields to the snake_case API payload.\n\n```ts\nconst task = await client.videos.seedance2.create({\n  prompt:\n    \"A cinematic macro shot of a crystal hummingbird hovering above a night-blooming flower.\",\n  resolution: \"720p\",\n  aspectRatio: \"16:9\",\n  duration: 5,\n  generateAudio: false,\n});\n\nconsole.log(task.data.taskId);\n```\n\nPoll for video results with the task ID:\n\n```ts\nconst result = await client.videos.seedance2.retrieve(task.data.taskId);\n\nif (result.data.state === \"success\") {\n  console.log(result.data.result?.resultUrls);\n}\n```\n\nImage-to-video first/last-frame inputs are supported:\n\n```ts\nawait client.videos.seedance2.create({\n  prompt: \"A product hero video with a slow camera push-in.\",\n  firstFrameUrl: \"https://example.com/first.png\",\n  lastFrameUrl: \"https://example.com/last.png\",\n  resolution: \"1080p\",\n  aspectRatio: \"9:16\",\n  duration: 8,\n});\n```\n\nMultimodal reference inputs are also supported. Do not combine `firstFrameUrl` or `lastFrameUrl` with `referenceImageUrls`, `referenceVideoUrls`, or `referenceAudioUrls`; the helper rejects that invalid combination before sending the request.\n\n```ts\nawait client.videos.seedance2.create({\n  prompt: \"A dynamic concept film for a futuristic wearable device.\",\n  referenceImageUrls: [\"https://example.com/ref.png\"],\n  referenceVideoUrls: [\"https://example.com/ref.mp4\"],\n  referenceAudioUrls: [\"https://example.com/ref.mp3\"],\n  generateAudio: true,\n  resolution: \"720p\",\n  aspectRatio: \"16:9\",\n  duration: 5,\n  callBackUrl: \"https://your-domain.com/api/callback\",\n});\n```\n\n## Seedance 2 Fast\n\nSeedance 2 Fast uses Apipass' asynchronous task API for text-to-video and reference-guided video generation. The SDK exposes a typed wrapper that sends the public model name `bytedance/seedance-2-fast` and maps camelCase helper fields to the snake_case API payload.\n\n```ts\nconst task = await client.videos.seedance2Fast.create({\n  prompt:\n    \"A serene beach at sunset with waves gently crashing on the shore, palm trees swaying in the breeze, and seagulls flying across the orange sky.\",\n  resolution: \"720p\",\n  aspectRatio: \"16:9\",\n  duration: 5,\n  generateAudio: true,\n  returnLastFrame: false,\n  webSearch: false,\n});\n\nconsole.log(task.data.taskId);\n```\n\nPoll for video results with the task ID:\n\n```ts\nconst result = await client.videos.seedance2Fast.retrieve(task.data.taskId);\n\nif (result.data.state === \"success\") {\n  console.log(result.data.result?.resultUrls);\n}\n```\n\nReference-guided inputs are also supported:\n\n```ts\nawait client.videos.seedance2Fast.create({\n  prompt: \"A product hero video with a slow camera push-in.\",\n  firstFrameUrl: \"https://example.com/first.png\",\n  lastFrameUrl: \"https://example.com/last.png\",\n  referenceImageUrls: [\"https://example.com/ref.png\"],\n  referenceVideoUrls: [\"https://example.com/ref.mp4\"],\n  referenceAudioUrls: [\"https://example.com/ref.mp3\"],\n  resolution: \"720p\",\n  aspectRatio: \"9:16\",\n  duration: 8,\n  callBackUrl: \"https://your-domain.com/api/callback\",\n});\n```\n\n## Seedance 2 Mini\n\nSeedance 2 Mini uses Apipass' asynchronous task API for text-to-video, image-to-video, and reference-guided video generation. The SDK exposes a typed wrapper that sends the public model name `bytedance/seedance-2-mini` and maps camelCase helper fields to the snake_case API payload.\n\nSupported `resolution` values are `\"480p\"` and `\"720p\"`, with `quality` accepted as a compatibility alias for `resolution`. If both are provided, they must match. `prompt` must be 3-20000 characters, `duration` accepts integer seconds from `4` to `15`, and the typed helper sends `generateAudio: false` when it is omitted. Reference-guided requests support up to 9 image URLs, 3 video URLs, and 3 audio URLs.\n\n```ts\nconst task = await client.videos.seedance2Mini.create({\n  prompt:\n    \"A quiet sunrise over a mountain lake, thin mist drifting across the water, soft cinematic light, realistic natural motion.\",\n  resolution: \"720p\",\n  aspectRatio: \"16:9\",\n  duration: 5,\n  generateAudio: false,\n  returnLastFrame: false,\n  webSearch: false,\n});\n\nconsole.log(task.data.taskId);\n```\n\nPoll for video results with the task ID:\n\n```ts\nconst result = await client.videos.seedance2Mini.retrieve(task.data.taskId);\n\nif (result.data.state === \"success\") {\n  console.log(result.data.result?.resultUrls);\n}\n```\n\nImage-to-video first/last-frame inputs are supported:\n\n```ts\nawait client.videos.seedance2Mini.create({\n  prompt: \"A product hero video with a slow camera push-in.\",\n  firstFrameUrl: \"https://example.com/first.png\",\n  lastFrameUrl: \"https://example.com/last.png\",\n  resolution: \"720p\",\n  aspectRatio: \"9:16\",\n  duration: 8,\n});\n```\n\nReference inputs are also supported. Do not combine `firstFrameUrl` or `lastFrameUrl` with `referenceImageUrls`, `referenceVideoUrls`, or `referenceAudioUrls`; the helper rejects that invalid combination before sending the request. `webSearch: true` is only valid for pure text-to-video requests.\n\n```ts\nawait client.videos.seedance2Mini.create({\n  prompt: \"A dynamic concept film for a futuristic wearable device.\",\n  referenceImageUrls: [\"https://example.com/ref.png\"],\n  referenceVideoUrls: [\"https://example.com/ref.mp4\"],\n  referenceAudioUrls: [\"https://example.com/ref.mp3\"],\n  generateAudio: true,\n  resolution: \"720p\",\n  aspectRatio: \"16:9\",\n  duration: 5,\n  callBackUrl: \"https://your-domain.com/api/callback\",\n});\n```\n\n## Veo 3.1 Fast\n\nVeo 3.1 Fast uses Apipass' asynchronous task API for video generation. The SDK exposes a typed wrapper that sends the public model name `google/veo-3-1-fast` and maps camelCase helper fields to the snake_case API payload.\n\n```ts\nconst task = await client.videos.veo31Fast.create({\n  prompt:\n    \"A cinematic handheld shot of a glass greenhouse in light rain, with slow camera movement and soft reflections.\",\n  aspectRatio: \"LANDSCAPE\",\n  videoGenerateType: \"text_to_video\",\n});\n\nconsole.log(task.data.taskId);\n```\n\nPoll for video results with the task ID:\n\n```ts\nconst result = await client.videos.veo31Fast.retrieve(task.data.taskId);\n\nif (result.data.state === \"success\") {\n  console.log(result.data.result?.resultUrls);\n}\n```\n\nFrames-to-video and ingredients-to-video modes accept image URLs through `images`:\n\n```ts\nawait client.videos.veo31Fast.create({\n  prompt: \"A smooth product reveal with a slow dolly-in camera move.\",\n  aspectRatio: \"PORTRAIT\",\n  videoGenerateType: \"frames_to_video\",\n  images: [\n    \"https://example.com/start-frame.png\",\n    \"https://example.com/end-frame.png\",\n  ],\n  callBackUrl: \"https://your-domain.com/api/callback\",\n});\n```\n\n## Veo 3.1 Lite\n\nVeo 3.1 Lite uses Apipass' asynchronous task API for video generation. The SDK exposes a typed wrapper that sends the public model name `google/veo-3-1-lite` and maps the helper field `aspectRatio` to the API's `aspect_ratio` input field.\n\n```ts\nconst task = await client.videos.veo31Lite.create({\n  prompt: \"A simple white coffee cup on a wooden table, steam rising.\",\n  generationType: \"TEXT_2_VIDEO\",\n  aspectRatio: \"16:9\",\n  enableTranslation: true,\n});\n\nconsole.log(task.data.taskId);\n```\n\nPoll for video results with the task ID:\n\n```ts\nconst result = await client.videos.veo31Lite.retrieve(task.data.taskId);\n\nif (result.data.state === \"success\") {\n  console.log(result.data.result?.resultUrls);\n}\n```\n\nFirst-and-last-frame generation accepts one or two image URLs:\n\n```ts\nawait client.videos.veo31Lite.create({\n  prompt: \"A calm product shot with steam rising and a gentle camera push.\",\n  generationType: \"FIRST_AND_LAST_FRAMES_2_VIDEO\",\n  aspectRatio: \"16:9\",\n  imageUrls: [\n    \"https://example.com/frame-1.png\",\n    \"https://example.com/frame-2.png\",\n  ],\n  seeds: 12345,\n  watermark: true,\n  callBackUrl: \"https://your-domain.com/api/callback\",\n});\n```\n\n## Veo 3.1 Quality\n\nVeo 3.1 Quality uses Apipass' asynchronous task API for high-fidelity video generation. The SDK exposes a typed wrapper that sends the public model name `google/veo-3-1-quality` and maps camelCase helper fields to the snake_case API payload.\n\n```ts\nconst task = await client.videos.veo31Quality.create({\n  prompt:\n    \"A high-fidelity cinematic shot of a rain-soaked city street at night, with neon reflections, slow camera movement, and soft volumetric lighting.\",\n  aspectRatio: \"LANDSCAPE\",\n  videoGenerateType: \"text_to_video\",\n});\n\nconsole.log(task.data.taskId);\n```\n\nPoll for video results with the task ID:\n\n```ts\nconst result = await client.videos.veo31Quality.retrieve(task.data.taskId);\n\nif (result.data.state === \"success\") {\n  console.log(result.data.result?.resultUrls);\n}\n```\n\nFrames-to-video mode accepts one or two high-quality keyframe image URLs:\n\n```ts\nawait client.videos.veo31Quality.create({\n  prompt: \"A polished product reveal with controlled studio lighting.\",\n  aspectRatio: \"PORTRAIT\",\n  videoGenerateType: \"frames_to_video\",\n  images: [\n    \"https://example.com/start-frame.png\",\n    \"https://example.com/end-frame.png\",\n  ],\n  callBackUrl: \"https://your-domain.com/api/callback\",\n});\n```\n\n## Wan 2.6 Video To Video\n\nWan 2.6 Video To Video uses Apipass' asynchronous task API to transform source videos. The SDK exposes a typed wrapper that sends the public model name `wan/wan-2-6-video-to-video` and maps camelCase helper fields to the snake_case API payload.\n\n```ts\nconst task = await client.videos.wan26VideoToVideo.create({\n  prompt:\n    \"The video drinks milk tea while doing some improvised dance moves to the music.\",\n  videoUrls: [\n    \"https://static.aiquickdraw.com/tools/example/1765957777782_cNJpvhRx.mp4\",\n  ],\n  duration: \"5\",\n  resolution: \"1080p\",\n});\n\nconsole.log(task.data.taskId);\n```\n\nPoll for generated video results with the task ID:\n\n```ts\nconst result = await client.videos.wan26VideoToVideo.retrieve(task.data.taskId);\n\nif (result.data.state === \"success\") {\n  console.log(result.data.result?.resultUrls);\n}\n```\n\nThe helper also accepts `video` or `videoUrl` as aliases for a single source video URL. If you pass more than one video source alias, the values must match.\n\n```ts\nawait client.videos.wan26VideoToVideo.create({\n  prompt: \"Restyle this source clip as a smooth cinematic dance video.\",\n  videoUrl: \"https://example.com/source.mp4\",\n  duration: \"10\",\n  resolution: \"720p\",\n  callBackUrl: \"https://your-domain.com/api/callback\",\n});\n```\n\nThe helper validates non-empty prompts, at least one source video URL, the documented maximum of 3 source URLs, and non-empty source URL strings before sending a request. TypeScript suggests duration values of `\"5\"` or `\"10\"` and resolution values of `\"720p\"` or `\"1080p\"`, while the Apipass adapter still performs provider-specific normalization for unsupported string values.\n\n## Music 1.5\n\nMusic 1.5 uses Apipass' asynchronous task API for lyrics-to-music generation. The SDK exposes a typed wrapper that sends the public model name `minimax/music-1-5` and maps camelCase helper fields to the snake_case API payload.\n\n```ts\nconst task = await client.audio.music15.create({\n  lyrics:\n    \"[verse]\\nWalking down the street\\nFeeling the beat\\n[chorus]\\nThis is my song\\nCome sing along\",\n  prompt: \"Upbeat pop song with electronic beats and catchy melody\",\n  sampleRate: 44100,\n  bitrate: 256000,\n  audioFormat: \"mp3\",\n});\n\nconsole.log(task.data.taskId);\n```\n\nPoll for generated music with the task ID:\n\n```ts\nconst result = await client.audio.music15.retrieve(task.data.taskId);\n\nif (result.data.state === \"success\") {\n  console.log(result.data.result?.resultUrls);\n}\n```\n\nUse structure tags such as `[intro]`, `[verse]`, `[chorus]`, `[bridge]`, and `[outro]` in `lyrics` to guide composition. `audioFormat: \"wav\"` produces uncompressed output, while `\"mp3\"` is usually smaller and broadly compatible.\n\n```ts\nawait client.audio.music15.create({\n  lyrics:\n    \"[intro]\\nCity lights are glowing\\n[verse]\\nFootsteps in the rain\\n[chorus]\\nWe keep moving\",\n  prompt: \"Cinematic synth pop with warm pads, steady drums, and hopeful vocals\",\n  sampleRate: 44100,\n  bitrate: 256000,\n  audioFormat: \"wav\",\n  callBackUrl: \"https://your-domain.com/api/callback\",\n});\n```\n\nThe helper validates lyrics length from 10 to 600 characters, prompt length from 10 to 300 characters, supported sample rates, supported bitrates, and audio format values of `mp3`, `wav`, or `pcm` before sending a request.\n\n## Text To Dialogue V3\n\nText To Dialogue V3 uses Apipass' asynchronous task API for ElevenLabs dialogue audio generation. The SDK exposes a typed wrapper that sends the public model name `elevenlabs/text-to-dialogue-v3` and maps the helper field `languageCode` to the API's `language_code` input field.\n\n```ts\nconst task = await client.audio.textToDialogueV3.create({\n  dialogue: [\n    {\n      text: \"Hello and welcome.\",\n      voice: \"BIvP0GN1cAtSRTxNHnWS\",\n    },\n    {\n      text: \"Thanks, let's begin.\",\n      voice: \"aMSt68OGf4xUZAnLpTU8\",\n    },\n  ],\n  stability: 0.5,\n  languageCode: \"eng\",\n});\n\nconsole.log(task.data.taskId);\n```\n\nPoll for generated dialogue audio with the task ID:\n\n```ts\nconst result = await client.audio.textToDialogueV3.retrieve(task.data.taskId);\n\nif (result.data.state === \"success\") {\n  console.log(result.data.result?.resultUrls);\n}\n```\n\nThe helper validates that `dialogue` is non-empty, each item has `text` and `voice`, combined dialogue text is at most 5000 characters, and `stability` is one of `0`, `0.5`, or `1`.\n\n```ts\nawait client.audio.textToDialogueV3.create({\n  dialogue: [\n    {\n      text:\n        \"Thanks for joining the launch review today. I want us to keep the tone warm and natural.\",\n      voice: \"BIvP0GN1cAtSRTxNHnWS\",\n    },\n    {\n      text:\n        \"Absolutely. I will keep the pacing calm and conversational so the exchange feels like a real discussion.\",\n      voice: \"aMSt68OGf4xUZAnLpTU8\",\n    },\n  ],\n  stability: 1,\n  languageCode: \"eng\",\n  callBackUrl: \"https://your-domain.com/api/callback\",\n});\n```\n\n## Suno Music Generation\n\nSuno music generation uses Apipass' asynchronous task API. The SDK exposes `client.audio.suno` for the `suno/generate` model and maps the helper field `modelVersion` to the API's `model_version` input field.\n\n```ts\nconst task = await client.audio.suno.create({\n  modelVersion: \"V5_5\",\n  prompt: \"A catchy pop song about summer love with upbeat tempo\",\n  customMode: true,\n  instrumental: false,\n  style: \"Pop, Upbeat, Summer Vibes\",\n  title: \"Summer Love\",\n  vocalGender: \"f\",\n  negativeTags: \"aggressive, heavy metal, screaming\",\n  styleWeight: 0.5,\n  weirdnessConstraint: 0.3,\n  audioWeight: 0.5,\n  personaId: \"persona_summer_pop\",\n});\n\nconsole.log(task.data.taskId);\n```\n\nPoll for generated tracks with the task ID:\n\n```ts\nconst result = await client.audio.suno.retrieve(task.data.taskId);\n\nif (result.data.state === \"success\") {\n  for (const track of result.data.result?.data ?? []) {\n    console.log(track.audio_url, track.image_url);\n  }\n}\n```\n\nCustom mode is supported. When `customMode` is true, provide `style` and `title`; provide `prompt` as well unless `instrumental` is true.\n\n```ts\nawait client.audio.suno.create({\n  customMode: true,\n  instrumental: true,\n  style: \"Cinematic synthwave, neon, atmospheric\",\n  title: \"Neon Skyline\",\n});\n```\n\nExtend an existing Suno-generated track by passing the source track `audioId` from a completed generation:\n\n```ts\nconst extension = await client.audio.suno.extend.create({\n  modelVersion: \"V5_5\",\n  audioId: \"abc123-def456-ghi789\",\n  instrumental: false,\n  continueAt: 120,\n  prompt: \"Build up to a powerful chorus with harmonies\",\n  style: \"Pop Rock, Uplifting\",\n  title: \"Rise Again (Extended)\",\n  vocalGender: \"f\",\n  negativeTags: \"lo-fi, distorted vocals\",\n  styleWeight: 0.6,\n  weirdnessConstraint: 0.2,\n  audioWeight: 0.4,\n  personaId: \"persona_power_pop\",\n});\n\nconsole.log(extension.data.taskId);\n```\n\nPoll for extended tracks with the extension task ID:\n\n```ts\nconst extended = await client.audio.suno.extend.retrieve(\n  extension.data.taskId,\n);\n\nif (extended.data.state === \"success\") {\n  console.log(extended.data.result?.data);\n}\n```\n\nExtend an uploaded or externally hosted audio file by passing a public `audioUrl`:\n\n```ts\nconst uploadExtension = await client.audio.suno.uploadExtend.create({\n  modelVersion: \"V5_5\",\n  audioUrl: \"https://your-storage.com/audio/my-song.mp3\",\n  instrumental: false,\n  continueAt: 60,\n  prompt: \"Build to an epic chorus with harmonies\",\n  style: \"Pop Rock, Uplifting\",\n  title: \"My Song (Extended)\",\n  vocalGender: \"f\",\n  negativeTags: \"flat drums, harsh vocals\",\n  styleWeight: 0.55,\n  weirdnessConstraint: 0.2","readmeFilename":"README.md"}