Consent

How a speaker proves the voice is theirs before a clone is created

Cloning a voice on the Build API happens in two legs: a consent leg, where the speaker proves the voice is theirs, and a cloning leg, where the sample plus that proof become a voice. This page is the consent leg in full. The cloning leg is on the Voice Cloning API page, and the overview shows how the two fit together.

Consent is verified, not asserted. You never send a checkbox or a signed form: the speaker reads a phrase Speechify issues, and the recording of them doing so is checked and retained as the consent record for the voice. On the current API version there is no create path that skips it; the deprecated pre-verification flow, which asserted consent instead, is covered below.

Why cloning works this way - the election-season misuse it prevents, the law behind it, and the safeguards around it - is covered in SpeechifyAI and our elections.

A challenge is Speechify’s proof that a speaker was in front of a microphone just now. Create one with the speaker’s full name:

POST
/v1/voices/consent-challenges
1curl -X POST https://api.speechify.ai/v1/voices/consent-challenges \
2 -H "Authorization: Bearer <token>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "full_name": "Jane Doe"
6}'
Response
1{
2 "id": "9f8a1c04e7b24d1e8a3f",
3 "phrase": "I agree to have my voice cloned by Speechify. My verification code is four seven two nine.",
4 "expires_at": "2026-10-01T09:05:00Z"
5}

The response carries three fields, each with a rule attached:

FieldWhat it isThe rule
idIdentifies this challenge; sent back as consent_challenge_id on the create.Opaque. Single use: once a create consumes it, successful or not, it is spent.
phraseThe sentence the speaker must read aloud.Show it exactly as returned. The recording is transcribed and matched against this text, so re-wording, re-casing or re-punctuating it fails the check.
expires_atWhen the challenge stops being usable.The only authority on the window - do not hard-code a duration. Past it, create a new challenge and record the new phrase.

The full_name you send is bound to the challenge and stored with the consent record, so the create call that consumes the challenge does not carry it and cannot change it.

Because a challenge is short-lived and single use, create it when the speaker is ready to record, not at the start of your flow. A challenge minted at sign-up is expired by the time anyone reads it.

The recording is the speaker reading the phrase aloud. It is the consent record for the voice, not a second voice sample:

  • It must be the same person as in your voice sample. The consenting speaker is the cloned speaker; a different voice reading the phrase is refused with consent_speaker_mismatch.
  • 5-30 seconds, at most 25MB, in any common audio container.
  • It is retained as evidence for the voice. If a voice is ever disputed, this recording is what settles it.

Send it as consent_recording, with the challenge’s id as consent_challenge_id, on the create call - see the Voice Cloning API page for the full request.

What Speechify verifies

When the create call arrives, Speechify transcribes the recording, matches the transcript against the phrase it issued for that challenge, and matches the recording’s speaker against the voice sample. Pass, and the voice is created with the recording retained as its consent record. Fail, and the create is refused with a code that says exactly why.

When verification fails

Three refusals share 422 and need different fixes, so branch on the error code rather than the status:

CodeStatusWhat happenedWhat to do
consent_phrase_mismatch422The recording does not say what the challenge asked for.Show the phrase exactly as returned and record again.
consent_speaker_mismatch422The person in the recording is not the person in the sample.The speaker consenting has to be the speaker being cloned.
consent_recording_unusable422Silence, too little or too much speech, or an unreadable file. No verdict was reached.Record the phrase again, 5-30 seconds, somewhere quiet.
consent_challenge_expired409The challenge passed expires_at.Create a new challenge and record the new phrase. Your sample is still good.
consent_challenge_already_used409The challenge was already consumed.If a previous request may have succeeded, check GET /v1/voices before recording again.
consent_challenge_not_found404The id does not resolve for your workspace. Challenges are workspace-bound, so another workspace’s id answers identically.Create a challenge from the same workspace that will create the voice.
consent_verification_unavailable502Verification could not run. Nothing about the request is wrong.Retry the same recording shortly. Do not send the speaker back to the microphone.

A refused create still spends the challenge, so every retry starts with a new challenge and a new phrase. The one exception worth engineering for: send an Idempotency-Key header on the create, and a retry of a create that completed but whose response was lost replays the stored response instead of consuming anything - that is the clean answer to the consent_challenge_already_used ambiguity above. A create that failed with a 5xx is not stored, so its retry executes fresh, which is what you want.

Rate limits

Challenge creation is rate limited per workspace at a few dozen per hour, far more tightly than the rest of the voice surface, since each one precedes a person recording themselves. Mint a challenge when your speaker is ready to record, not speculatively. Read the live ceiling off the RateLimit-* headers rather than hard-coding it, and on a 429, back off for exactly the Retry-After the response carries: the wait is measured in minutes and can run to most of an hour.

Designing the flow in your product

The consent leg means a live speaker at a microphone is part of voice creation. What that looks like depends on whose voice you clone:

  • Your users clone their own voices. The speaker is already present and recording a sample; the consent recording is one more prompt in the same session.
  • You clone a voice you have a contract for. The voice’s owner has to complete the recording step themselves - the consent has to come from the person being cloned, and speaker matching enforces it. Put the challenge in front of the speaker, not the account holder.
  • Batch or unattended creation. There is no consent path without a speaker present. If your workflow creates voices with nobody at a microphone, contact support to talk through it.

The previous flow

Next steps