Guides
API Quickstart
How to authenticate, generate speech, and check billing with SexyVoice API
Use the API when you want to generate speech from your own backend or app.
Prerequisites
- A SexyVoice account
- API key from Dashboard -> API Keys
- Paid account
1. Authenticate
Send your API key as a Bearer token:
-H 'Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'2. Generate Speech
Using gpro model
curl -X POST 'https://sexyvoice.ai/api/v1/speech' \
-H 'Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
-H 'Content-Type: application/json' \
-d '{
"model": "gpro",
"voice": "achernar",
"input": "Hello from SexyVoice API",
"style": "calm",
"seed": 1234
}'Using Grok (xAI)
Grok voices support both MP3 (default) and WAV output via response_format.
curl -X POST 'https://sexyvoice.ai/api/v1/speech' \
-H 'Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
-H 'Content-Type: application/json' \
-d '{
"model": "xai",
"voice": "eve",
"input": "Hello from Grok! [laugh] This is exciting.",
"response_format": "mp3"
}'Successful response includes:
url: generated audio URLcredits_usedcredits_remainingusage
3. Check Balance
curl -X GET 'https://sexyvoice.ai/api/v1/billing' \
-H 'Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'Response includes:
creditsLeftlastUpdateduserIdlastBillingTransaction
4. Handle Errors + Debugging
- Every response includes a
request-idheader. Log it in your app. - On failures, inspect
error.codeanderror.type. - See Error Codes for the full list.
Useful Endpoints
POST /api/v1/speechGET /api/v1/billingGET /api/v1/voicesGET /api/v1/modelsGET /api/v1/openapi
Next Steps
- Read full API Reference
- Browse Grok Voices & Speech Tags for the full tag reference
- Retry transient
503 provider_unavailableresponses with backoff, and treat429 provider_quota_exceededas temporary provider quota exhaustion - Store
request-idwith your logs for support and tracing