API
Authenticate and generate speech with SexyVoice API.
Base URL
Use https://sexyvoice.ai as the API host.
Authentication
All endpoints require a Bearer API key that you create in Dashboard -> API Keys.
In your profile, choose Delete account or content under Danger Zone, then choose Delete content. This revokes your API keys. Create new keys to use the API again. We keep usage records for billing and internal cost tracking.
curl -X GET 'https://sexyvoice.ai/api/v1/models' \
-H 'Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'Request ID
Every response includes a server-generated request-id header (format: req_sv_<hex>).
Use it when contacting support or debugging failures.
Quick Start
Speech requests can identify a voice by voice + model, or by voiceId from GET /api/v1/voices. Use voiceId when you want a stable ID or when a voice name exists for more than one model.
Optional generation parameters:
temperature(0–2) — sampling temperature for Gemini voices (gpro/gpro31/gpro38); higher is more expressive. Ignored by other models.speed(0.7–1.5) — speech speed multiplier for Grok (xai) voices, per the xAI TTS API. Ignored by other models.
curl
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,
"temperature": 1.2
}'curl with voiceId
curl -X POST 'https://sexyvoice.ai/api/v1/speech' \
-H 'Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
-H 'Content-Type: application/json' \
-d '{
"voiceId": "390f5864-111b-4795-81ea-7026a1e64cfc",
"input": "Hello from SexyVoice API",
"style": "calm"
}'Do not include voice or model when you pass voiceId; the API derives the model from the voice.
TypeScript (gpro)
const response = await fetch('https://sexyvoice.ai/api/v1/speech', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SEXYVOICE_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
model: 'gpro',
voice: 'achernar',
input: 'Hello from TypeScript',
style: 'happy',
seed: 42,
temperature: 1.2,
}),
});
const requestId = response.headers.get('request-id');
const json = await response.json();TypeScript (Grok)
const response = await fetch('https://sexyvoice.ai/api/v1/speech', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SEXYVOICE_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
model: 'xai',
voice: 'eve',
input: 'Hello from Grok! [laugh] This sounds great.',
response_format: 'wav',
speed: 1.2,
}),
});
const json = await response.json();
// json.url contains the generated audio URLCheck Billing Balance
curl -X GET 'https://sexyvoice.ai/api/v1/billing' \
-H 'Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'Python (gpro)
import requests
response = requests.post(
'https://sexyvoice.ai/api/v1/speech',
headers={
'Authorization': f'Bearer {API_KEY}',
'Content-Type': 'application/json',
},
json={
'model': 'gpro',
'voice': 'achernar',
'input': 'Hello from Python',
'style': 'warm',
'seed': 42,
'temperature': 1.2,
},
timeout=30,
)
request_id = response.headers.get('request-id')
print(request_id, response.status_code, response.json())Python (Grok)
import requests
response = requests.post(
'https://sexyvoice.ai/api/v1/speech',
headers={
'Authorization': f'Bearer {API_KEY}',
'Content-Type': 'application/json',
},
json={
'model': 'xai',
'voice': 'eve',
'input': 'Hello from Grok! <whisper>This is a secret.</whisper>',
'response_format': 'mp3',
'speed': 1.2,
},
timeout=30,
)
print(response.status_code, response.json())Next Steps
- Use the endpoint pages in this section for each request/response contract.
- See Grok Voices & Speech Tags for the full Grok tag reference.
- See Error Codes for the centralized error taxonomy.