VidMage

VidMage is an AI video and image creation platform for creators. Turn your ideas and images into videos and fresh visuals.

Open the creator tools
Explore APIs
AI Video APIsAI Image APIsAI Audio APIsAI 3D APIsAI Face Swap APIsAI Effects APIs
Build with VidMage
QuickstartAPI keysVidMage MCPError reference
Your account
Developer consoleAbout VidMagePlans and creditsAPI billingContact support
© 2026 VidMage. All rights reserved.
Privacy PolicyTerms of ServiceReport Abuse
Skip to content
VidMage/Developers
Overview
APIs
All APIsAI Video APIsAI Image APIsAI Audio APIsAI 3D APIsAI Face Swap APIsAI Effects APIs
DocumentationVidMage MCPOpen console
Developers/AI Voice Clone API for Reference-Based Speech

AI Voice Clone API for Reference-Based Speech

Build voice-based narration into your app using a reference recording and a new script. Submit both inputs and retrieve the generated speech as an audio URL for your workflow.

Get API keyView API docs
Abstract illustration for AI Voice Clone API for Reference-Based Speech
PlaygroundAPIPricingGuideFAQs

AI Voice Clone API Playground

Use your existing API key and subscription. Submitting a generation uses credits; uploading and preparing a request does not start a generation.

API access is available to subscribers only. Your subscription credits are shared across the website and the API.

View plans

Parameter

2 parameters

URL of the reference voice sample.

Text to synthesize (max 1000 chars).

Request code

#!/usr/bin/env bash
set -euo pipefail
# Set this once per intended task; preserve it and the body for transport retries.
: "${VIDMAGE_IDEMPOTENCY_KEY:?Set a unique key for this task}"

SUBMIT_RESPONSE="$(curl --fail-with-body --silent --show-error -X POST "https://vidmage.ai/api/v1/voice-clone/submit" \
  -H "Authorization: Bearer ${VIDMAGE_API_KEY}" \
  -H "Idempotency-Key: ${VIDMAGE_IDEMPOTENCY_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{
  "audioUrl": "https://vidmage.ai/templates/voices/alice.mp3",
  "textContent": "Welcome to VidMage."
}')"
TASK_ID="$(printf '%s' "$SUBMIT_RESPONSE" | jq -er '.["taskId"]')"

while true; do
  QUERY_RESPONSE="$(curl --fail-with-body --silent --show-error -X POST "https://vidmage.ai/api/v1/voice-clone/query" \
    -H "Authorization: Bearer ${VIDMAGE_API_KEY}" \
    -H "Content-Type: application/json" \
    --data-raw "{\"taskId\":\"${TASK_ID}\"}")"
  STATUS="$(printf '%s' "$QUERY_RESPONSE" | jq -r '(.status // .data.status // "") | ascii_downcase')"
  case "$STATUS" in
    success|succeeded|completed)
      RESULT="$(printf '%s' "$QUERY_RESPONSE" | jq -r '(.result // .["audioUrl"] // .data["audioUrl"] // empty)')"
      if [ -z "$RESULT" ]; then
        printf '%s' "Result missing; preserve task $TASK_ID and query the same task again. Do not resubmit." >&2
        exit 2
      fi
      printf '%s\n' "$RESULT"
      break
      ;;
    needs_input)
      printf '%s' "Face selection required; preserve task $TASK_ID" >&2
      exit 2
      ;;
    failed|error)
      printf '%s' "$QUERY_RESPONSE" | jq -r '(.message // .error // .data.error // "Task failed")' >&2
      exit 1
      ;;
  esac
  sleep 5
done

Response data

Submit the task to see the API response here.
PlaygroundCapabilities

API documentation

Submit a request, track the task, and retrieve your result.

Required inputs
audioUrl textContent
Output
Audio·audioUrl
Request setup & limitsHeaders, input options and media limits

Request headers

Authorization
Bearer YOUR_API_KEY

Keep your API key on your server.

Content-Type
application/json
Idempotency-Key
YOUR_UNIQUE_KEY

Use a new key per task. Reuse it only when retrying the same submission.

Input options & limits

Request controls follow each task's parameter rules; they do not guarantee output properties.

Voice Clone

RequiredaudioUrl textContent
Request controls
  • textContent: see parameter rules

Output dimensions and format are not specified in this reference.

Input retention and output-link lifetime depend on the API contract. Confirm API-specific retention terms before making promises to your users. Upload guide ↗

Voice Clone

POST /api/v1/voice-clone/submit

Full API documentation ↗

audioUrl is required and textContent is required.

Required inputs

audioUrlstring
URL of the reference voice sample.
textContentstring
Text to synthesize (max 1000 chars).

Edit the sample inputs for your own task before submitting.

Voice Clone request
# Set VIDMAGE_IDEMPOTENCY_KEY to a unique value for this task; preserve it for transport retries.
curl -X POST "https://vidmage.ai/api/v1/voice-clone/submit" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: ${VIDMAGE_IDEMPOTENCY_KEY}" \
  -H "Content-Type: application/json" \
  -d '{"audioUrl":"https://vidmage.ai/templates/voices/alice.mp3","textContent":"Welcome to VidMage."}'
# -> { "success": true, "taskId": "...", "creditsConsumed": ... }
Parameters and input rules2 fields
FieldTypeRequiredDefaultMeaning and limits
audioUrlstringYesNot specifiedURL of the reference voice sample. No additional field constraint listed.
textContentstringYesNot specifiedText to synthesize (max 1000 chars). Maximum length: 1000

Retrieve the result

Save taskId from the accepted submission and send it to this endpoint:

POST /api/v1/voice-clone/query

Use the same Bearer API key. On completion, read the audioUrl result field.

Task states and recovery ↗
Voice Clone query
curl -X POST "https://vidmage.ai/api/v1/voice-clone/query" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "taskId": "TASK_ID_FROM_SUBMIT" }'
# -> { "success": true, "data": { "status": "...", "audioUrl": "https://..." } }

Pricing

See what one image, video, or generation costs in credits. Your API and website activity share the same credit balance.

API credit rates and calculated example request costs
API / workflowExample requestPrice (credits)
Voice Cloneaudio API19 characters: 5 credits
How this is calculated
  • Script length: 0.1 credits / character · 5 credits minimum

Character count × rate is rounded up to whole credits; the minimum charge applies.

Estimate your own request ↗
0.1 credits / character5 credits minimum
Billed in credits. Shared with the website.Active subscription required. Unit rates and examples follow current API credit rules.Billing details⌄

Examples show the charge for the inputs listed above. Resolution, duration, audio, output count and reference media can change the total. Minimum charges and rounding follow the selected API.

Use the Playground to estimate your request before submitting it. Estimates do not start a generation. Subscription and credit-pack prices are listed on the plans page.

Your task’s recorded usage is the source of truth for the final charge.

View plans ↗Billing guide ↗

About AI Voice Clone API

VidMage's AI Voice Clone API is a speech generation interface that uses a reference recording to guide a generated voice. It accepts the recording and a written script as separate inputs. The resulting audio can be reviewed for narration, character dialogue, or other spoken content. To explore a voice you have permission to clone, open VidMage's Voice Clone.

AI Voice Clone API capabilities

Reference-based voice generation
Provide a recording to guide the voice used for the new speech generated from your script.
New script input
Supply the words to speak through textContent, with a published limit of 1,000 characters per request.
Generated speech output
Retrieve the audio result and listen to it alongside the reference recording and submitted narration text.

What you can build

Dialogue revisions for short dramas

A rewritten line may need a new recording late in the edit. Use an authorized actor voice reference with the revised script to generate a candidate take, checking pronunciation and delivery before it replaces the line in the scene.

Tutorial narration updates

When a feature changes, the explanation in a tutorial may need changing too. The instructor's own reference recording and rewritten passage can produce replacement narration for the relevant section, while the audio editor handles the splice.

Episode-specific podcast intros

Keep each podcast opening tied to its episode: the guest, the topic, and the question being explored. Pair that script with the host's approved voice sample to prepare an introduction for review alongside the show music and main recording.

How to use AI Voice Clone API

  1. Get an API key

    Create a key in the Developer Console and store it on your server. Use it in the Authorization: Bearer header.

  2. Prepare and submit your inputs

    Set up your inputs in the Playground, then copy the matching API request. Send it from your server with a unique Idempotency-Key.

  3. Track the task

    Save the returned taskId and query the same operation until it completes. Keep that identifier if your app stops waiting.

  4. Retrieve the result

    Read audioUrl from the completed task. Preview the result in your app and save a copy to your own storage for later use.

Input tips
Choose a clear reference
Use a recording you are authorized to use, with a speaker you can hear clearly. Keep it separate from the new words supplied in textContent.
Keep scripts within the limit
Validate the 1,000-character script limit before submission. This reference-based interface returns speech without a saved voice ID, enrollment step, or pronunciation dictionary field.

Input requirementsUpload local files

Task fields and results

Keep the task identifier with its original request and Idempotency-Key. Query the same capability until it completes, then read the documented result field.

Task identifier
taskId
Query route
POST /api/v1/voice-clone/query
Completed result
audioUrl
Task states and response structure ↗
Errors, retries and limits

Retry transport failures with the same idempotency key only when the original submission may not have reached the server. For a confirmed task, keep querying the original task instead of submitting a duplicate.

Read error recovery guidance ↗

FAQs

Should I use voice cloning or voice design?

Choose Voice Design when the voice should start from a written description instead of a recording. Its script limit is 500 characters.

What length should the reference recording be?

The public schema gives no reference-audio duration requirement. Confirm accepted recording lengths before enforcing a limit in your app.

Are failed or timed-out requests charged?

A client timeout is not a confirmed task failure. Confirmed failures are automatically refunded only when the refund outcome is certain. Unknown charges or refunds remain pending reconciliation.

Failure and refund handling ↗
How long should my app wait for a result?

The checked contract does not establish a fixed completion time. Choose a local wait budget for your app; it is not an API completion deadline.

Polling and wait budgets ↗
What are the rate and concurrency limits?

Request-rate limits control how often you can call the API; concurrency limits control simultaneous work. The documentation ties both to the stable API key but does not publish numeric limits for this operation. Confirm account limits before planning parallel jobs.

Rate-limit recovery ↗
Can I receive results through a webhook?

The checked request contract documents status queries and does not list a webhook or callback field for these routes. Check the current authenticated OpenAPI contract before making a callback part of your integration.

Query task results ↗Check the current contract ↗

Explore more APIs on VidMage

  • AI Voice Design API for Described Speech↗
  • AI Text to Music API for Musical Briefs↗
  • AI Video Extender API for Clip Continuations↗
  • AI Lip Sync API for Photos and Videos↗
  • AI Video Generation API for Text and Images↗
  • Seedance API↗
  • Seedance 2.5 API↗
  • AI Subtitle Generator API for Video Captions↗