Skip to content

kshitijdixit/zyka-sdk

v0.4.14MIT

Generate AI videos, images, voice, and use AI apps via the Zyka CLI. 40+ models including Sora, Veo, Kling, WAN, DALL-E, GPT Image, Flux, ElevenLabs, and more.

Zyka SDK

TypeScript and JavaScript SDK for AI image, video, and audio generation with Zyka.

Think of it like Remotion for AI generation: instead of React components rendering video frames, you write typed pipeline definitions (compositions + scenes) and the SDK orchestrates Zyka's API calls, polls for results, and delivers output URLs.

Zyka SDK gives developers a unified way to generate images, videos, speech, and media transformations using multiple AI models through one programmable API. It includes a low-level client for direct generation, a composition system for multi-step workflows, and a CLI for quick starts and automation.

Why Zyka SDK?

Build AI media pipelines without manually handling uploads, polling loops, or output downloads.

Highlights

  • πŸ–ΌοΈ Generate images with models like GPT Image, DALLΒ·E, Flux, Kling Image, Nano Banana, and more
  • 🎬 Generate videos with models like Sora, Veo, Kling, WAN, Bytedance, and Grok Imagine Video
  • πŸ”Š Generate TTS audio with providers like ElevenLabs, MiniMax, Qwen3, Chatterbox, and Fish Audio
  • ⚑ Use a simple Node.js API with sensible defaults
  • πŸ“€ Pass local file paths and let the SDK upload them automatically
  • ⏳ Wait for completion automatically or manage async jobs manually
  • πŸ’Ύ Download outputs directly to disk
  • 🧱 Compose multi-scene AI workflows with typed inputs and dependencies
  • πŸ› οΈ Use the included CLI for auth, scaffolding, rendering, and direct generation

Features

  • πŸ–ΌοΈ Image Generation
  • 🎬 Video Generation
  • πŸ”Š Audio / TTS Generation
  • ⚑ Fast Developer API
  • πŸ“‘ Async Progress Workflows
  • 🧠 Multiple AI Models

Core Features

FeatureWhat it doesWhy it matters
Unified clientOne ZykaClient for image, video, audio, and app endpointsFewer SDKs and wrappers to manage
Auto-uploadDetects local file paths and uploads them before API requestsEasier image-to-video, img2img, and voice cloning workflows
Auto-pollingcreateImage, createVideo, and createTTS wait for completion by defaultNo manual polling code for common use cases
Auto-downloadSave completed outputs with output: './path.ext'Faster local testing and scripting
Multi-model supportSupports multiple providers and model families behind one APIEasier experimentation and model switching
Composition engineDefine scenes, dependencies, and typed inputsGreat for repeatable creative pipelines
CLIzyka auth, zyka init, zyka render, zyka generateUseful for prototyping and CI scripts
Prompt refinementRefine prompts before generationBetter prompts with less manual iteration
Media appsIncludes utility endpoints like upscaling, captioning, dubbing, and face swapCovers more than just generation

Installation

npm

npm install zyka-sdk

yarn

yarn add zyka-sdk

pnpm

pnpm add zyka-sdk

If you want input validation for compositions, install zod as well:

npm install zod

Use with AI Agents

Zyka ships as an agent skill, which teaches your coding agent how to drive the zyka CLI. Once installed, you ask for media in plain language and the agent runs the right command for you.

Supported: Claude Code, Codex, ChatGPT, Dots, Cursor, Grok Bot and Muse Code. Every one of them reads the same skill from skills/zyka-ai/SKILL.md.

Step 1: Prerequisites

Both of these are required, whichever agent you use.

# 1. Install the CLI the skill drives
npm install -g zyka

# 2. Set your API key (get one at https://zyka.ai)
export ZYKA_API_KEY=zk_live_...

# 3. Confirm it works
zyka auth whoami

Add the export line to your ~/.zshrc or ~/.bashrc. Agents inherit the shell environment they were launched from, so a key set only in a temporary shell will not reach them.

Step 2: Install into your agent

Claude Code

/plugin marketplace add kshitijdixit/zyka-sdk
/plugin install zyka-sdk@zyka

Codex, ChatGPT and Dots

codex plugin marketplace add kshitijdixit/zyka-sdk
codex plugin add zyka-sdk@zyka

Once the directory listing is approved, install it from the Plugins directory in ChatGPT, Codex or Dots instead, which is shared across all three.

Cursor and Grok Bot

Both read .cursor-plugin/plugin.json. Until the marketplace listing is live, install it locally:

git clone https://github.com/kshitijdixit/zyka-sdk
mkdir -p ~/.cursor/plugins/local
cp -R zyka-sdk ~/.cursor/plugins/local/zyka-sdk

Then enable Include third-party Plugins, Skills, and other configs in Cursor settings and run Developer: Reload Window.

Muse Code

Install the CLI first if you do not have it:

curl -fsSL https://dev.meta.ai/install.sh | sh    # macOS and Linux
muse --version

On Windows use irm https://dev.meta.ai/install.ps1 | iex in PowerShell.

Then install the plugin:

muse plugins marketplace add zyka https://github.com/kshitijdixit/zyka-sdk
muse plugins install zyka-sdk@zyka
muse plugins list

Plugins and marketplaces are on by default from Muse 1.4.3. On older builds run export MUSE_EXPERIMENTAL_PLUGINS=1 first. muse plugins approve applies only to plugins that ship hooks, and this one does not.

Muse can also pick the skill up with no plugin install at all, because .agents/skills/zyka-ai/SKILL.md is committed to this repo:

git clone https://github.com/kshitijdixit/zyka-sdk
cd zyka-sdk
muse skills list      # zyka-ai appears

Step 3: Confirm it loaded

AgentCommand
Claude Code/plugin list
Codexcodex plugin list
CursorSettings, then Plugins
Muse Codemuse plugins list or muse skills list

Step 4: Use it

Ask in plain language. The agent picks the model and runs the CLI for you.

Generate a video of a sunset over mountains using WAN
Create an image of a neon cyberpunk city with Nano Banana and save it to ./city.png
Make a talking head video from ./face.jpg and ./speech.mp3
Dub ./demo.mp4 into Hindi using HeyGen
Transcribe ./meeting.mp3 and write the transcript to ./notes.txt
Upscale ./photo.jpg to 4k
Read the script in ./script.txt out loud with ElevenLabs

Local file paths work directly. The SDK uploads them for you and downloads the result to wherever you asked.

Each of those maps to a CLI call you can also run yourself:

zyka generate image -m nano_banana -p "neon cyberpunk city" -o ./city.png
zyka generate video -m wan -p "sunset over mountains" -o ./video.mp4
zyka generate tts --script "Hello world" --voice-id abc123 -o ./speech.mp3
zyka generate transcription --audio ./meeting.mp3 -o ./transcript.txt

Troubleshooting

ProblemFix
Agent does not know about ZykaRestart the session. Most agents load skills at startup.
zyka: command not foundnpm install -g zyka
401 or invalid api keyThe key is not in the agent's environment. Export it in your shell profile, then relaunch the agent.
Skill looks out of dateReinstall the plugin. Skills are snapshotted at install time, not fetched live.
Validating a changemuse skills validate ./skills/zyka-ai

Manifest layout

PathRead by
plugin.jsonAgent Plugins 1.0.0 standard (Codex, ChatGPT, Dots, Cursor)
.codex-plugin/plugin.jsonolder Codex builds (compatibility fallback)
.cursor-plugin/plugin.jsonCursor, Grok Bot
.claude-plugin/plugin.jsonClaude Code
.muse-plugin/plugin.jsonMuse Code
.agents/skills/zyka-ai/SKILL.mdMuse Code project skills

Authentication

The SDK resolves credentials in this order:

  1. apiKey passed to new ZykaClient()
  2. ZYKA_API_KEY
  3. token passed to new ZykaClient()
  4. ZYKA_API_TOKEN
  5. ~/.zyka/config.json

Recommended

export ZYKA_API_KEY=zk_live_your_api_key_here

Constructor-based auth

import { ZykaClient } from "zyka-sdk";

const client = new ZykaClient({
  apiKey: "zk_live_your_api_key_here",
});

Environment Variables

VariableRequiredDescriptionDefault
ZYKA_API_KEYRecommendedPrimary API key for SDK requestsNone
ZYKA_API_TOKENOptionalLegacy bearer token fallbackNone
ZYKA_API_URLOptionalOverride the Zyka API base URLhttps://zyka.ai/api-v2

Quick Start

JavaScript

const { ZykaClient } = require("zyka-sdk");

const client = new ZykaClient({
  apiKey: process.env.ZYKA_API_KEY,
});

async function main() {
  const result = await client.createImage(
    {
      model: "gpt_image_1",
      prompt:
        "A cinematic product photo of a silver smartwatch on a black studio background",
      size: "1024x1024",
    },
    {
      output: "./outputs/watch.png",
    },
  );

  console.log(result.id);
  console.log(result.status);
  console.log(result.outputUrl);
}

main().catch(console.error);

TypeScript

import { ZykaClient } from "zyka-sdk";

const client = new ZykaClient({
  apiKey: process.env.ZYKA_API_KEY,
});

async function main() {
  const video = await client.createVideo({
    model: "wan",
    prompt: "A cinematic drone shot over snow-covered mountains at sunrise",
    duration: 5,
  });

  console.log(video.outputUrl);
}

main().catch(console.error);

Usage Examples

Generate Image

import { ZykaClient } from "zyka-sdk";

const client = new ZykaClient();

const image = await client.createImage(
  {
    model: "nano_banana",
    prompt: "A neon cyberpunk street market in heavy rain",
    size: "1024x1024",
  },
  {
    output: "./outputs/cyberpunk.png",
  },
);

console.log(image.outputUrl);

Generate Video

import { ZykaClient } from "zyka-sdk";

const client = new ZykaClient();

const video = await client.createVideo(
  {
    model: "kling",
    sub_model: "kling-v2-master",
    prompt:
      "A luxury perfume bottle rotating on a reflective surface with soft studio lighting",
    duration: "5",
    aspect_ratio: "16:9",
  },
  {
    output: "./outputs/perfume.mp4",
  },
);

console.log(video.status);
console.log(video.outputUrl);

Reference-to-video (MiniMax H3 Max / WAN 3.0)

// Local paths in reference_*_urls are auto-uploaded
const clip = await client.createVideo(
  {
    model: "minimax",
    sub_model: "minimax-h3-max",
    prompt: "The character from the reference walks through a busy Tokyo crossing at night",
    reference_image_urls: ["./char-front.png", "./char-side.png"],
    reference_video_urls: ["./walk-cycle.mp4"],
    duration: 10,
    resolution: "768P",
    aspect_ratio: "adaptive",
  },
  { output: "./outputs/tokyo.mp4" },
);

// WAN 3.0 image-to-video with native audio (2–30s, up to 1080p)
await client.createVideo({
  model: "wan",
  sub_model: "wan-3-0",
  prompt: "Camera orbits the sports car as it idles, engine rumble",
  start_image_url: "./car.jpg",
  duration: 12,
  resolution: "1080p",
  audio: true,
});

Edit-mode image models (image_list)

// grok_imagine v2, qwen_image_3, seedream_v5_pro, mai_image_2_5_pro (and gpt_image_2)
// switch to edit mode when image_list is present. A single `image` is auto-promoted.
await client.createImage(
  {
    model: "seedream_v5_pro",
    prompt: "Put the subject in a red trench coat, keep the pose",
    image_list: ["./ref1.jpg", "./ref2.jpg"],
    size: "auto_2K",
  },
  { output: "./outputs/coat.png" },
);

Generate Audio

import { ZykaClient } from "zyka-sdk";

const client = new ZykaClient();

const audio = await client.createTTS(
  {
    provider: "elevenlabs",
    voice_id: "your_voice_id",
    script: "Welcome to Zyka SDK. Let us build AI media workflows faster.",
  },
  {
    output: "./outputs/voiceover.mp3",
  },
);

console.log(audio.outputUrl);

Upload Input Media

Local paths are automatically uploaded before the request is sent.

import { ZykaClient, asset } from "zyka-sdk";

const client = new ZykaClient();

const edited = await client.createImage({
  model: "nano_banana",
  image: "./assets/source-photo.jpg",
  prompt: "Turn this portrait into a high-fashion editorial photo",
});

const animated = await client.createVideo({
  model: "wan",
  sub_model: "wan-2-6-i2v",
  image_url: asset("hero.jpg"),
  prompt: "Subtle camera push-in with cinematic motion",
  duration: 5,
});

Handle Streaming Responses

The SDK does not currently expose chunked/token streaming. For long-running jobs, use async polling or progress callbacks.

import { ZykaClient } from "zyka-sdk";

const client = new ZykaClient();

const pending = await client.createVideo(
  {
    model: "wan",
    prompt: "A futuristic city skyline during golden hour",
    duration: 5,
  },
  {
    waitForCompletion: false,
  },
);

console.log(`Queued job: ${pending.id}`);

const completed = await client.pollUntilComplete(pending.id, "video", {
  timeoutMs: 10 * 60 * 1000,
  pollIntervalMs: 3000,
});

console.log(completed.outputUrl);

Composition progress callbacks are also available:

import { composition, scene, render, renderImage, renderTTS } from "zyka-sdk";

const SocialClip = composition({
  id: "social-clip",
  scenes: [
    scene("image", ({ config }) =>
      renderImage(
        {
          model: "gpt_image_1",
          prompt: "A bold campaign poster for a sneaker brand",
        },
        config,
      ),
    ),
    scene("voice", ({ config }) =>
      renderTTS(
        {
          provider: "elevenlabs",
          voice_id: "voice_id",
          script: "New drop. Limited release. Available now.",
        },
        config,
      ),
    ),
  ],
});

await render(SocialClip, {}, undefined, {
  onSceneProgress(sceneId, result) {
    console.log(sceneId, result.status);
  },
  onSceneComplete(sceneId, result) {
    console.log(sceneId, result.outputUrl);
  },
});

Error Handling

import { ZykaClient } from "zyka-sdk";

const client = new ZykaClient();

try {
  const result = await client.createImage({
    model: "gpt_image_1",
    prompt: "Minimal product photography for a ceramic mug",
  });

  console.log(result.outputUrl);
} catch (error) {
  if (error instanceof Error) {
    console.error("Zyka request failed:", error.message);
  } else {
    console.error("Unknown error:", error);
  }
}

Composition Workflows

For multi-step AI pipelines, use composition() and scene().

import { composition, scene, render, renderImage, renderTTS } from "zyka-sdk";
import { z } from "zod";

const Promo = composition({
  id: "promo",
  inputSchema: z.object({
    prompt: z.string(),
    script: z.string(),
    voiceId: z.string(),
  }),
  scenes: [
    scene("hero-image", ({ inputs, config }) =>
      renderImage(
        {
          model: "gpt_image_1",
          prompt: inputs.prompt,
        },
        config,
      ),
    ),
    scene("voiceover", ({ inputs, config }) =>
      renderTTS(
        {
          provider: "elevenlabs",
          voice_id: inputs.voiceId,
          script: inputs.script,
        },
        config,
      ),
    ),
  ],
});

const result = await render(Promo, {
  prompt: "A premium travel campaign poster for Iceland",
  script: "Adventure starts where the road ends.",
  voiceId: "voice_id",
});

console.log(result.scenes["hero-image"].outputUrl);

Configuration

Client Configuration

OptionTypeRequiredDescriptionDefault
apiKeystringNoPreferred Zyka API keyprocess.env.ZYKA_API_KEY
tokenstringNoLegacy bearer tokenprocess.env.ZYKA_API_TOKEN
apiUrlstringNoBase URL for Zyka APIhttps://zyka.ai/api-v2
timeoutMsnumberNoMax time to wait for generation completion300000
pollIntervalMsnumberNoPolling interval for async jobs3000
onWarning(message: string) => voidNoCustom handler for SDK validation warnings (routes away from console.warn)console.warn
disableWarningsbooleanNoSuppress SDK validation warnings entirelyfalse

Common Generation Options

OptionTypeApplies ToDescriptionExample
apiKeystringClientAPI key used for authzk_live_...
modelstringImage, video, audioModel or provider family to use'gpt_image_1', 'wan', 'elevenlabs'
resolutionstringImage, video, appsModel-specific output resolution'4K', '1080p', '2k'
durationnumber | stringVideoOutput clip length in seconds5, '10'
voicestringAudioReference audio path or voice identifier depending on workflow'./voice.mp3'
formatstringImage, audioOutput format where supported'png', 'jpeg', 'mp3'
streamingbooleanWorkflowNot a direct SDK option today; use waitForCompletion: false plus pollingfalse

Wait Options

OptionTypeDescriptionDefault
waitForCompletionbooleanIf false, returns immediately with a pending jobtrue
outputstringDownload completed output to a local pathundefined
timeoutMsnumberOverride wait timeout per request300000
pollIntervalMsnumberOverride polling interval per request3000

Validation & Limits (Soft Warnings)

The SDK ships per-model configs (mirroring the Zyka frontend) that describe each video model's supported durations, resolutions, aspect ratios, prompt limits, file-size caps, and audio-duration windows. createVideo() validates your params against these configs before uploading any local files and surfaces issues as soft warnings β€” the request still goes to the server. The server is the source of truth.

What it catches:

  • Unknown sub_model (with the list of known sub_models for that provider)
  • duration / seconds not in the supported list
  • resolution / size / aspect_ratio / mode / video_quality / input_type / person_count / shot_type not supported
  • prompt / negative_prompt longer than the model's max
  • cfg_scale outside the supported range, or set on a model that ignores it
  • turbo_mode set on a model that doesn't support it
  • Local image / audio / video files larger than the model's size cap
  • Local files with MIME types not in the supported list (by extension)
  • Audio duration limits as heads-up notes (e.g. OmniHuman v1.5: 60s @ 720p / 30s @ 1080p; WAN: 2–30s window)

Default behavior (warnings go to console.warn):

const client = new ZykaClient({ apiKey: 'zk_live_...' });
await client.createVideo({
  model: 'wan',
  sub_model: 'wan-2-7',
  prompt: 'a sunset',
  duration: 99,  // not supported
});
// console.warn: [zyka-sdk] duration=99s is not in the supported list for 'wan-2-7'. Supported: '5', '10', '15'.

Custom warning handler:

const client = new ZykaClient({
  apiKey: 'zk_live_...',
  onWarning: (msg) => myLogger.warn(msg),
});

Disable warnings entirely:

const client = new ZykaClient({ apiKey: 'zk_live_...', disableWarnings: true });

Introspect a model's limits:

const cfg = client.getModelConfig('bytedance', 'OmniHuman v1.5');
console.log(cfg?.audio_duration_limit_1080p);  // 30
console.log(cfg?.resolutions);                  // ['720p', '1080p']

Or import the config maps and validator directly:

import { BYTEDANCE_VIDEO_CONFIG, getVideoModelConfig, validateVideoParams } from 'zyka-sdk';

const { warnings } = validateVideoParams({ model: 'wan', sub_model: 'wan-2-7', duration: 99 });

Validation currently covers video models only (matches the available frontend configs). Image and TTS validation will be added when those configs land.

API Methods

Primary Client Methods

MethodDescriptionParametersExample
createImage()Generate or edit an imageImageGenerationParams, WaitOptions?client.createImage({ model: 'gpt_image_1', prompt: '...' })
createVideo()Generate a videoVideoGenerationParams, WaitOptions?client.createVideo({ model: 'wan', prompt: '...' })
createTTS()Generate speech audioTTSParams, WaitOptions?client.createTTS({ provider: 'elevenlabs', script: '...' })
pollUntilComplete()Poll a queued image, video, or TTS jobid, type, polling optionsclient.pollUntilComplete(id, 'video')
getImage()Fetch image job detailsidclient.getImage(id)
getImageStatus()Fetch image job statusidclient.getImageStatus(id)
getVideo()Fetch video job detailsidclient.getVideo(id)
getVideoStatus()Fetch video job statusidclient.getVideoStatus(id)
getTTSStatus()Fetch TTS job statusidclient.getTTSStatus(id)
checkStatus()Generic status checker for image, video, or ttstype, idclient.checkStatus('image', id)
refinePrompt()Refine a prompt for image or video generationPromptRefinementParamsclient.refinePrompt({ user_input: '...', generate_type: 'image' })
calculateImageCredits()Estimate image generation creditsparams objectclient.calculateImageCredits({...})
calculateVideoCredits()Estimate video generation creditsparams objectclient.calculateVideoCredits({...})

Media App Methods

MethodDescriptionParametersExample
createUpscale()Upscale an imageUpscaleParamsclient.createUpscale({ image: url, resolution: '4k' })
createFaceSwap()Swap faces in an image or videoFaceSwapParamsclient.createFaceSwap({ type: 'image', url, face_image })
createVirtualTryOn()Apply clothing to a person imageVirtualTryOnParamsclient.createVirtualTryOn({ human_image, cloth_image })
createOutfitSwap()Transfer outfit from a character imageOutfitSwapParamsclient.createOutfitSwap({ user_image, character_image })
createSkinEnhancer()Enhance portrait skin renderingSkinEnhancerParamsclient.createSkinEnhancer({ image, type: 'realistic_skin' })
createBehindTheScene()Create behind-the-scenes style outputBehindTheSceneParamsclient.createBehindTheScene({ image, type: 'video' })
createAngles()Generate alternate camera anglesAnglesParamsclient.createAngles({ image, angle: 'left' })
createNineShorts()Generate 9 shot variationsNineShortsParamsclient.createNineShorts({ image })
createZooms()Generate zoom variationsZoomsParamsclient.createZooms({ image })
createStoryGenerator()Generate a cinematic story gridStoryGeneratorParamsclient.createStoryGenerator({ image })
createCaptionGenerator()Caption a video or audio file (MP4, SRT, or both)CaptionGeneratorParams, WaitOptions?client.createCaptionGenerator({ url, output_mode: 'both' })
createVideoToScript()Convert video to text/scriptVideoToScriptParams, WaitOptions?client.createVideoToScript({ url })
createVideoCleaner()Remove fillers or clean a videoVideoCleanerParams, WaitOptions?client.createVideoCleaner({ url })
createVideoUpscaler()Upscale a videoVideoUpscalerParams, WaitOptions?client.createVideoUpscaler({ video_url })
createVideoDubbing()Dub a video to another language (models: heygen, elevenlabs, sarvam)VideoDubbingParams, WaitOptions?client.createVideoDubbing({ video_url, model: 'heygen', output_language: 'Hindi (India)' })
getVideoDubbingLanguages()Fetch supported languages for a dubbing modelVideoDubbingModelclient.getVideoDubbingLanguages('elevenlabs')
createShortVideoCreator()Extract short clips from a videoShortVideoCreatorParams, WaitOptions?client.createShortVideoCreator({ url })
createBroll()Add B-roll to a videoBrollParams, WaitOptions?client.createBroll({ url })
createYouTubeDownloader()Download a YouTube video through ZykaYouTubeDownloaderParams, WaitOptions?client.createYouTubeDownloader({ url })
createHoliSpecial()Apply Holi color effect to an imageHoliSpecialParamsclient.createHoliSpecial({ image })
createSimpleApp()Run a simple app on an imageSimpleAppParamsclient.createSimpleApp({ image, app_id: '...' })
createVoiceChanger()ElevenLabs Speech-to-Speech voice transformVoiceChangerParams, WaitOptions?client.createVoiceChanger({ source_audio_url, target_voice_id: '...' })
createVoiceIsolation()Isolate vocals (remove background noise/music)VoiceIsolationParams, WaitOptions?client.createVoiceIsolation({ source_audio_url: './noisy.mp3' })
createImageToSvg()Convert an image to an SVG vectorImageToSvgParamsclient.createImageToSvg({ image: './photo.png' })

Composition Helpers

MethodDescriptionParametersExample
composition()Define a multi-scene workflowCompositionConfigcomposition({ id: 'promo', scenes: [...] })
scene()Define a scene and dependenciesid, fn, dependsOn?scene('voice', async () => ...)
render()Execute a compositioncomposition, inputs, config?, options?render(Promo, inputs)
renderImage()Scene helper for image generationimage paramsrenderImage({ model: 'gpt_image_1', prompt: '...' }, config)
renderVideo()Scene helper for video generationvideo paramsrenderVideo({ model: 'wan', prompt: '...' }, config)
renderTTS()Scene helper for TTStts paramsrenderTTS({ provider: 'elevenlabs', script: '...' }, config)
asset()Resolve files from public/filenameasset('hero.jpg')

Supported Model Categories

CategoryExamples
Videosora, veo, kling, bytedance, wan, infinite_talk, grok, ltx, aurora, minimax
Imagenano_banana, flux_1_schnell, flux_2_dev, flux_2_klein_9b, dall_e_3, gpt_image_1, gpt_image_2, kling, grok_imagine, qwen_image_3, seedream_v5_pro, mai_image_2_5_pro, zyka_helion
Audio / TTSelevenlabs, qwen3, chatterbox, minimax, voxcpm, voxcpm2, moss-tts, fish-audio, sarvam, gemini-tts

Model Lists

Use these tables when you need the exact SDK string, the provider behind it, and the main feature it supports.

Video Models

Copy StringParent ModelProviderSupported Feature
sora-2soraOpenAIText-to-video
sora-2-prosoraOpenAIHigher-end text-to-video
veo-2.0-generate-001veoGoogleText-to-video
veo-3.0-generate-001veoGoogleText-to-video
veo-3.0-fast-generate-001veoGoogleFast text-to-video
veo-3.1-generate-001veoGoogleText-to-video
veo-3.1-fast-generate-001veoGoogleFast text-to-video
kling-v1klingKling AIText-to-video, image-to-video
kling-v1-5klingKling AIText-to-video, image-to-video
kling-v1-6klingKling AIText-to-video, image-to-video
kling-v2-masterklingKling AIText-to-video, image-to-video
kling-v2-1klingKling AIText-to-video, image-to-video
kling-v2-5-turboklingKling AIFast text-to-video
kling-v2-6klingKling AIText-to-video, image-to-video
kling-v3klingKling AIAdvanced video generation
kling-v3-proklingKling AIHigher-quality advanced video generation
kling-v3-pro-motion-controlklingKling AIMotion-controlled video generation
kling-o3klingKling AIAdvanced video generation
kling-o3-proklingKling AIHigher-quality advanced video generation
kling-o3-pro-v2v-editklingKling AIVideo-to-video editing
motion-controlklingKling AIMotion-controlled video generation
multi-image-to-videoklingKling AIMulti-image-to-video
kling-video-o1klingKling AIAdvanced video generation
Seedance V1.5 ProbytedanceByteDanceText-to-video
Seedance 2.0bytedanceByteDanceText-to-video
Seedance 2.0 FastbytedanceByteDanceFast text-to-video
OmniHumanbytedanceByteDanceCharacter / human animation
OmniHuman v1.5bytedanceByteDanceCharacter / human animation
wan-2-6-t2vwanAlibabaText-to-video
wan-2-6-i2vwanAlibabaImage-to-video
wan-2-5-i2vwanAlibabaImage-to-video
wan-v2-2-animate-replacewanAlibabaVideo animate replace
wan-v2-2-animate-movewanAlibabaVideo animate move
wan-2-7wanAlibabaText-to-video
wan-3-0wanAlibabaText / image / reference-to-video, native audio, 2–30s, up to 1080p
grok-imagine-videogrokxAIText-to-video, image-to-video
ltx-2.3-text-to-videoltxLTXText-to-video
ltx-2.3-image-to-videoltxLTXImage-to-video
auroraauroraSync LabsLip sync (video/image + audio)
minimax-h3minimaxMiniMaxText / image-to-video (first + last frame), 5–15s, up to 4K
minimax-h3-maxminimaxMiniMaxText / image / reference-to-video (≀9 images, ≀3 videos, ≀3 audio), 480P / 768P

Image Models

Copy StringParent ModelProviderSupported Feature
nano-banana-1nano_bananaGoogle / Gemini-basedText-to-image, image-to-image
nano-banana-pronano_bananaGoogle / Gemini-basedHigher-quality image generation
nano-banana-2nano_bananaGoogle / Gemini-basedNewer image generation variant
flux-1-schnellflux_1_schnellBlack Forest LabsFast text-to-image
flux-2-devflux_2_devBlack Forest LabsText-to-image
flux-2-klein-9bflux_2_klein_9bBlack Forest LabsText-to-image
dall-e-2dall_e_2OpenAIText-to-image
dall-e-3dall_e_3OpenAIText-to-image
gpt-image-1gpt_image_1OpenAIText-to-image
gpt-image-1-minigpt_image_1_miniOpenAIText-to-image
gpt-image-1.5gpt_image_1_5OpenAIText-to-image
gpt-image-2gpt_image_2OpenAIText-to-image + edit via image_list (up to 16 refs); sizes up to 3840x2160
kling-v1klingKling AIText-to-image
kling-v1-5klingKling AIText-to-image
kling-v2klingKling AIText-to-image
kling-v2-newklingKling AIText-to-image
kling-v2-1klingKling AIText-to-image
omni-imageklingKling AIMulti-reference image generation
kling-image-o1klingKling AIAdvanced image generation
multi-image-to-imageklingKling AIMulti-image generation
kling-image-v3klingKling AIAdvanced image generation
kling-image-v3-text-to-imageklingKling AIAdvanced text-to-image
lucid-originlucid_originLeonardoText-to-image
phoenix-1.0phoenix_1_0LeonardoText-to-image
stable-diffusion-xl-base-1.0stable_diffusion_xl_base_1_0Stability AIText-to-image
stable-diffusion-v1-5-img2imgstable_diffusion_v1_5_img2imgStability AIImage-to-image
z-image-turboz_image_turboZykaFast text-to-image
zyka-helionzyka_helionZykaFast text-to-image
grok-imagine-imagegrok_imaginexAIText-to-image
grok-imagine-image-v2grok_imaginexAIGrok Imagine 2.0 β€” text-to-image (1k/2k, 1–4 images) + edit via image_list (1–3)
qwen-image-2-proqwen_image_2_proQwenText-to-image
qwen-image-3qwen_image_3QwenText-to-image (up to 2048Β², 1–6 images) + edit via image_list (1–3)
seedream-5-proseedream_v5_proByteDanceText-to-image (up to 2048Β²) + edit via image_list (1–10)
mai-image-2-5-promai_image_2_5_proMicrosoftText-to-image (aspect-ratio based) + edit via image_list (1–10)

Audio / TTS Providers

SDK StringProviderSupported FeatureNotes
elevenlabsElevenLabsText-to-speechDefault. voice_id required. model: eleven_multilingual_v2 / eleven_v3 (inline [bracket] tags)
qwen3QwenVoice design, voice clone, custom voiceFlexible speech workflows
chatterboxChatterboxVoice cloning, expressive speechSupports emotion and speed control
voxcpmVoxCPMVoice cloningReference-audio-based workflow
voxcpm2VoxCPM230 languages, Basic/Design/Cloneoutput_format, cfg_value, inference_timesteps
minimaxMiniMaxText-to-speech, preset voices, voice cloningSDK supports clone-to-TTS flow
moss-ttsRunPod / MOSS-TTSText-to-speechHosted TTS workflow
fish-audioFish AudioInstant voice cloningGood for reference voice generation
sarvamSarvamIndian-language TTS (Bulbul v2/v3)target_language_code, speaker, model (bulbul:v2/v3), pace, pitch (v2), loudness (v2)
gemini-ttsGoogle GeminiSingle + multi-speaker TTS (30 voices)voice_name, speakers (max 2), model

Video Dubbing Providers

Model (model field)ProviderLanguage FormatKey Options
heygenHeyGenFull name β€” 'Hindi (India)'mode: 'speed'|'precision', enable_caption, enable_speech_enhancement, translate_audio_only
elevenlabsElevenLabsISO code β€” 'hi'source_lang, num_speakers, highest_resolution, drop_background_audio, use_profanity_filter
sarvamSarvamLanguage name β€” 'Hindi'; comma-separated for multi-target: 'Hindi,Tamil,Telugu'source_lang, num_speakers, genre: 'general'|'news'|'entertainment'|'education'|'sports'|'religious'
// HeyGen β€” lip-sync dubbing
await client.createVideoDubbing({ video_url: './video.mp4', model: 'heygen', output_language: 'Hindi (India)', mode: 'precision' });

// ElevenLabs β€” high-quality voice dubbing
await client.createVideoDubbing({ video_url: './video.mp4', model: 'elevenlabs', output_language: 'hi', highest_resolution: true });

// Sarvam β€” multi-language Indian dubbing
await client.createVideoDubbing({ video_url: './video.mp4', model: 'sarvam', output_language: 'Hindi,Tamil', genre: 'education' });

// Fetch supported languages
const langs = await client.getVideoDubbingLanguages('heygen');

CLI

The monorepo also includes a CLI package published as zyka.

npx zyka auth login
npx zyka auth whoami
npx zyka auth logout
npx zyka init my-zyka-project
npx zyka render ./dist/promo.js --inputs '{"prompt":"A cinematic launch video"}'
npx zyka generate image -m gpt_image_1 -p "A luxury watch ad" -o ./watch.png
npx zyka generate video -m wan -p "A drone shot over mountains" -d 5 -o ./mountains.mp4
npx zyka generate video -m minimax -s minimax-h3 -p "Slow dolly-in on the lighthouse" --image ./start.jpg --end-image ./end.jpg -d 8 --resolution 2K -o ./lighthouse.mp4
npx zyka generate video -m wan -s wan-3-0 -p "Recreate the dance with this person" --reference-images ./person.png --reference-videos ./dance.mp4 -d 6 -o ./dance.mp4
npx zyka generate image -m seedream_v5_pro -p "Red trench coat, keep the pose" --image-list ./ref1.jpg ./ref2.jpg --size auto_2K -o ./coat.png
npx zyka generate tts --provider elevenlabs --voice-id VOICE_ID --script "Welcome to Zyka" -o ./voice.mp3

Rate Limits

Rate limits are enforced by the Zyka API account and plan behind your credentials. The SDK itself does not hard-code request throttling.

Recommended practices:

  • Queue large workloads instead of firing many long-running jobs at once
  • Use waitForCompletion: false for batch orchestration
  • Retry transient failures with backoff in your application layer
  • Monitor credits and provider-specific limits before large renders

Error Handling

The SDK throws regular JavaScript Error objects when requests fail, authentication is missing, responses cannot be parsed, or jobs time out.

Common error categories:

Error TypeExample Cause
Authentication errorMissing ZYKA_API_KEY, invalid token, expired credentials
API errorInvalid params, unsupported model settings, backend rejection
Timeout errorLong-running job exceeded timeoutMs
Upload errorLocal file path does not exist or upload failed
Download errorOutput file URL returned 403 or 5xx beyond retry window

Project Structure

zyka-sdk/
β”œβ”€β”€ examples/
β”‚   β”œβ”€β”€ product-ad/
β”‚   └── social-video/
β”œβ”€β”€ packages/
β”‚   β”œβ”€β”€ cli/
β”‚   β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”‚   └── commands/
β”‚   β”‚   └── skills/
β”‚   └── core/
β”‚       β”œβ”€β”€ src/
β”‚       └── skills/
β”œβ”€β”€ skills/
β”œβ”€β”€ package.json
β”œβ”€β”€ pnpm-workspace.yaml
└── tsconfig.json

Folder Guide

PathPurpose
packages/core/srcMain SDK client, types, helpers, composition engine, file utilities
packages/cli/srcCLI entrypoint and commands for auth, render, and direct generation
examples/Real composition examples for ads and social content
skills/Internal skill/docs files used by the project
pnpm-workspace.yamlWorkspace configuration for the monorepo

Best Practices

  • Use environment variables for credentials instead of hardcoding keys
  • Start with waitForCompletion: true during development for simpler debugging
  • Switch to waitForCompletion: false when orchestrating many jobs
  • Save outputs with the output option during local testing and CI verification
  • Pass local file paths when convenient; the SDK will upload them automatically
  • Use zod input schemas for compositions to catch bad inputs early
  • Prefer model-specific parameters only when needed; keep first examples minimal
  • Set custom timeoutMs for slow video workflows or large batch jobs

Troubleshooting

Zyka API key not found

Set ZYKA_API_KEY or pass apiKey to new ZykaClient().

export ZYKA_API_KEY=zk_live_your_api_key_here

Local file upload fails

Check that the file path exists and is readable from your current working directory.

Job times out

Increase timeoutMs for slower generations.

const client = new ZykaClient({ timeoutMs: 10 * 60 * 1000 });

Rendered file is not downloaded

Make sure you passed output in the request options and that the process has permission to write to the destination directory.

Composition file fails in CLI

Compile TypeScript before calling zyka render if you are pointing the CLI at built output.

npx tsc
npx zyka render dist/my-composition.js --inputs '{}'

Contributing

Contributions are welcome.

Local development

pnpm install
pnpm build
pnpm test

Useful scripts

CommandDescription
pnpm buildBuild all workspace packages
pnpm devRun package build watchers in parallel
pnpm testRun workspace tests
pnpm lintRun workspace lint scripts
pnpm cleanRemove package build artifacts

Before opening a PR:

  • Keep README and examples aligned with the public API
  • Prefer typed examples in TypeScript when adding new docs
  • Document new models or methods in the API tables
  • Avoid breaking existing method names and defaults without updating examples

License

MIT


Built for developers who want a practical, programmable way to generate AI media with images, videos, audio, and workflow orchestration in one SDK.