FOR DEVELOPERS
Voicepy API
Create text-to-speech voiceovers from your application.
Authentication
Create your personal key in Your profile. Send it in the x-api-key header or as a Bearer token over HTTPS. Keys in query strings are not accepted. Revoking or regenerating a key immediately disables the previous key.
Base endpoint: https://voicepy.com/api/developer.php. API requests use the same account, valid credits, generation limits and recording history as your studio.
Endpoints
| Method | Action | Response |
|---|---|---|
| GET | ?action=user | Your credit balance, account details and character limit. |
| GET | ?action=voices | Voice catalog. Optional q, language, gender, accent filters. The configured voice service provides generation. Voicepy Core is preview only. |
| POST | ?action=tts | Submit a voiceover. Returns job_id, job_status and remaining credits. |
| GET | ?action=status&job_id=… | Job status and download URLs when ready. |
| GET | ?action=audio&job_id=… | Download your completed MP3. |
| GET | ?action=subtitles&job_id=… | Download SRT when available. |
Create a voiceover
Choose a voice_id from the catalog. Each request needs a unique client_request_id of 12–79 letters, numbers, hyphens or underscores. Retrying the same script, voice and settings with that ID reuses the saved job and reserves credits only once.
curl -X POST 'https://voicepy.com/api/developer.php?action=tts' \
-H 'x-api-key: YOUR_VOICEPY_KEY' \
-H 'Content-Type: application/json' \
--data '{
"text": "Welcome to Voicepy.",
"voice_id": "EXAVITQu4vr4xnSDxMaL",
"client_request_id": "my-voiceover-0001",
"title": "Welcome",
"voice_settings": {"speed": 1, "language": "English", "srt_max_block_seconds": 8}
}'Optional voice settings follow the studio: speed 0.7–1.2, subtitle duration 3–15 seconds (default 8), language, expressive delivery and system normalization. TTS uses your configured voice service. Check ?action=user for the current maximum script length.
curl 'https://voicepy.com/api/developer.php?action=status&job_id=YOUR_JOB_ID' \
-H 'x-api-key: YOUR_VOICEPY_KEY'Poll about once every 3 seconds. When status is completed, download download_url with the same API key header. Subtitles are supplied only when available. Statuses failed and cancelled are also final.
Credits & errors
Credits are reserved when a new job is submitted. Duplicate request IDs reuse the original job; a conflicting script returns HTTP 409. Confirmed generation failures return reserved credits according to their original validity. Deleted jobs are unavailable through this API.
Responses use JSON for errors: {"status":"error","error":"…"}. HTTP 400: invalid input; 401: invalid key or disabled account; 403: insufficient credits or concurrency limit; 404: unavailable job/file; 409: conflicting request; 429: rate limit. Use a fresh request ID only for a new generation.