POST
javascript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 const axios = require('axios'); const api_key = "YOUR API-KEY"; const url = "https://api.segmind.com/v1/kling-create-voice"; const data = {}; (async function() { try { const response = await axios.post(url, data, { headers: { 'x-api-key': api_key } }); console.log(response.data); } catch (error) { console.error('Error:', error.response.data); } })();
RESPONSE
image/jpeg
HTTP Response Codes
200 - OKImage Generated
401 - UnauthorizedUser authentication failed
404 - Not FoundThe requested URL does not exist
405 - Method Not AllowedThe requested HTTP method is not allowed
406 - Not AcceptableNot enough credits
500 - Server ErrorServer had some issue with processing

Attributes


voice_urlstr *

Audio URL with a single clear voice. Ideal length: 10 seconds.

To keep track of your credit usage, you can inspect the response headers of each API call. The x-remaining-credits property will indicate the number of remaining credits in your account. Ensure you monitor this value to avoid any disruptions in your API usage.

Kling AI: Voice Cloning Model

What is Kling AI?

Kling AI (Voice) is a generative voice cloning model that creates a new spoken audio output using a reference voice sample provided via URL. You supply a voice audio URL containing a clear single speaker, and the model uses that sample to reproduce the voice’s timbre and speaking characteristics for downstream voice experiences.

While Kling AI is often associated with NLP and conversational systems, this endpoint is specifically designed for voice-based generation workflows—helping teams build natural-sounding narration, character voices, and assistant experiences with consistent speaker identity. It’s a practical fit for developers looking for “AI voice cloning,” “voice generator,” or “text to speech with voice copy” capabilities in an API-friendly format.

Key Features

  • Reference-driven voice identity: Clones a voice from a provided audio URL (single speaker).
  • Fast integration: Simple input contract—one required parameter to start.
  • Consistent voice matching: Best results when the reference clip is clean and stable.
  • Product-ready applications: Designed for automation pipelines, assistants, and media tools.

Best Use Cases

  • Virtual assistants & chatbots: Give an agent a consistent, recognizable voice.
  • Content creation: Voiceovers for short videos, reels, and product demos.
  • Localization workflows: Maintain the same speaker identity across multilingual content (when paired with translation/TTS pipelines).
  • Games & interactive media: Rapid prototyping of character voices from a small sample.
  • Customer support automation: Branded voice experiences for IVR and help flows.

Prompt Tips and Output Quality

  • Start with a high-quality reference recording: minimal noise, no music, no reverb.
  • Use one speaker only (no interviews, podcasts, or overlapping dialogue).
  • Recommended reference: a short, crisp sentence (~10 seconds) for clean voice capture.
  • Ensure the URL is directly accessible (no expiring links, login walls, or redirects if possible).
  • If outputs sound unstable, re-record with a steady pace and consistent microphone distance.

FAQs

Is Kling AI open-source?
This integration describes a hosted Kling AI model; open-source status isn’t implied here.

What input do I need to provide?
voice_url (required): a URL to an audio clip with a clear single voice.

What kind of audio works best for voice cloning?
Clean, noise-free speech with one speaker; ~10 seconds is ideal for a demo.

How is this different from a general NLP/chat model?
This model focuses on voice identity cloning from audio, not text reasoning or chat.

What parameters should I tweak for best results?
This endpoint exposes a single control—use the best possible voice_url to improve quality.