OpenAPI · Bac à sable live

Parcourir l’API complète dans Scalar

Integrations use X-API-Key (Dashboard → API keys) on every request. Raw schema: /api/openapi.

Bac à sable

Essayez dans le navigateur

Connectez-vous pour de vraies requêtes en production (crédits). Guide pas à pas ci‑dessous.

Text-to-speech API with real voice cloning

Send text, attach a reference speaker or a saved custom voice, and receive studio-grade audio through the same job system our customers use in production.

Text flows into synthesized speech

Why teams start with cloning TTS

Generic robotic voices erode trust. VoiceChangerAPI lets you keep a consistent speaker—your host, your brand mascot, or a user-uploaded reference—without shipping raw recordings.

The endpoint is intentionally boring engineering: multipart form data, explicit async_mode, and either audio_ref or custom_voice_id so your integration stays easy to audit.

Credits are reserved when the job is accepted, and results always land behind presigned URLs so you can hand them straight to a CDN or a mobile client.

How the request actually works

Follow the same sequence the dashboard uses. Numbers map to what you will see in browser devtools when you try the Text-to-speech panel.

  1. 1

    Authenticate like production

    Create an API key under Dashboard → API keys and send it as X-API-Key on every call. It resolves to the same user record and credit balance as your account.

  2. 2

    Build the multipart body

    Required: text. Optional: language (default auto), speed (0.25–4.0), duration (target length in seconds, max 600), format (wav default, or mp3). Set async_mode to the string true or false. Provide exactly one of audio_ref (WAV upload) or custom_voice_id (UUID from /v1/custom-voices). Never both.

  3. 3

    Interpret the immediate response

    Async mode returns mode, job_id, and queued. Sync mode either returns a completed payload with download_url or timeout_waiting with the same job_id so you can poll.

  4. 4

    Poll and download

    Call GET /v1/jobs/{job_id} for status, then GET /v1/jobs/{job_id}/result once completed to retrieve a fresh presigned URL and MIME type.

Minimal curl (API key)

Replace $API with your VoiceChangerAPI base URL and $KEY with an API key from the dashboard.

curl -X POST "$API/v1/voice-cloning/tts" \
  -H "X-API-Key: $KEY" \
  -F text="Thanks for building with Voicechanger.co" \
  -F language=auto \
  -F async_mode=true \
  -F custom_voice_id="$VOICE_UUID"

# Optional tuning (omit for automatic timing):
#   -F speed=1.15 \
#   -F duration=12 \
#   -F format=mp3   # wav (default) or mp3

# Then poll:
# curl -H "X-API-Key: $KEY" "$API/v1/jobs/$JOB_ID"
Try cloning TTS without writing HTTP
The Text-to-speech workspace uploads references, lists your custom voices, toggles async mode, and plays back results—every click hits the live API while you stay signed in on voicechanger.co.

Need the raw schema? Use Raw OpenAPI JSON or Scalar from the purple banner above.