Authentication
Call the MixVoice API with an API key
Every endpoint is authenticated with an API key. Send it in the header:
Authorization: Bearer sk_your_api_keyGet an API key
Create one in the MixVoice console (the console calls the backend minting service; the secret is shown once):
- Sign in to the website
- Open Settings → API Keys (
/settings/v2-api-keys) - Click "Create key"
- Copy the
sk_-prefixed secret and store it safely
Example
curl -X POST https://api.aiclonevoicefree.com/api/v2/voice/clone \
-H "Authorization: Bearer sk_your_api_key" \
-H "Content-Type: application/json" \
-d '{ "text": "Hello", "reference_audio_url": "https://oss.aiclonevoicefree.com/trump.wav" }'Security
- Never put a key in front-end code or a public repo — it spends your account's credits.
- If it leaks, revoke and recreate it in the console.
- Use separate keys per app/environment so you can isolate and revoke them.
Auth failures
| HTTP | code | Meaning |
|---|---|---|
401 | missing_api_key | No Authorization header, or malformed |
401 | invalid_api_key | Key not recognized or revoked |
{ "error": { "code": "missing_api_key", "type": "auth_error",
"message": "Authorization header missing or malformed. Expected: Bearer sk_..." } }Next: Conventions · Tasks