Skip to Content

Create Voice Cloning Task

Start a voice cloning task. You can upload audio files directly or provide URLs to existing audio files.

Request Information

  • Method: POST
  • Endpoint: /api/instant/create-task
  • Content Type: multipart/form-data

Request Parameters

ParameterTypeRequiredDescription
audioFile (binary)Yes*Audio file for voice cloning. Supported formats include WAV, MP3, and M4A. You must provide either audio or audio_url.
audio_urlstringYes*Publicly accessible audio file URL (WAV, MP3, M4A). You must provide either audio or audio_url.
textstringYesThe text you want to synthesize with the cloned voice.
api_keystringYesYour unique API key for authentication and access. This key is used to verify your request and link it to your user account.
voice_idstringNoOptional voice ID parameter

*Note: Either audio or audio_url parameter is required, at least one must be provided.

Response

Success Response

{ "task_id": "1406bf34-735c-4b21-98ac-a135b2afb1c8", "status": "pending" }

Error Response

  • 400 Bad Request: Missing required parameters (e.g., api_key, or neither audio nor audio_url provided)

Example Requests

Using Audio File

curl -X POST https://aivoiceclonefree.com/api/instant/create-task \ -F "[email protected]" \ -F "text=This is a long text suitable for async interface processing..." \ -F "api_key=your_api_key_here"

Using Audio URL

curl -X POST https://aivoiceclonefree.com/api/instant/create-task \ -F "audio_url=https://example.com/sample.mp3" \ -F "text=This is a long text suitable for async interface processing..." \ -F "api_key=your_api_key_here"

Task Status Description

After creating a task, you will receive a task_id and initial status pending. Possible status values:

StatusDescription
pendingTask submitted, waiting for processing
processingTask is being processed
completedTask completed
failedTask processing failed

Next Steps

After successful task creation:

  1. Save the returned task_id
  2. Use Task Status Query to monitor progress
  3. Download audio via Get Task Result after completion

Best Practices

  • Text Length: Recommended single task text length should not exceed 10,000 characters
  • Audio Quality: Use high-quality audio samples for better cloning results
  • API Limits: Be aware of API call frequency limits, avoid overly frequent requests
Last updated on