Arabic speech Turn exact Arabic campaign scripts into hosted MP3 assets with dialect, delivery, and voice controls.
Arabic and English output
The speech endpoint reads your exact approved transcript. Set output_language to ar or en (default ar). Arabic defaults to Saudi when dialect is omitted. English must omit dialect and returns dialect: null. Campaign speech follows brief.output_language.
POST /speech-generations
Gulf Arabic WhatsApp voice asset Send the final transcript to read. The text field is not a prompt for writing new copy.
curl --request POST \
--url https://www.lahjty.com/api/v1/speech-generations \
--header "Authorization: Bearer $LAHJTY_API_KEY" \
--header "Content-Type: application/json" \
--header "Idempotency-Key: speech-order-1848" \
--data '{
"text": "طلبك صار جاهز، ونوصله لك بكرة بإذن الله.",
"dialect": "gulf",
"tone": "warm",
"platform": "whatsapp",
"delivery": "natural",
"content_type": "marketing",
"voice_profile": "warm_storyteller",
"external_customer_id": "merchant-91"
}'
Example response
{
"id": "spc_01jexample",
"object": "speech_generation",
"request_id": "req_01jexample",
"status": "completed",
"audio": {
"url": "https://example.convex.cloud/api/storage/example",
"mime_type": "audio/mpeg",
"bytes": 184220,
"duration_seconds": null
},
"voice_profile": "warm_storyteller",
"delivery": "natural",
"dialect": "gulf",
"output_language": "ar",
"usage": {
"credits_used": 5,
"balance_after": 488
}
}Voice selection Prefer voice_profile for a stable Lahjty-managed persona. The advanced voice field is a provider override and must not be sent together with voice_profile.