SDKs & Snippets
Phonetico's API is plain HTTP. Any HTTP client works. We don't ship official SDKs yet; the snippets below cover the core POST /v1/asr/upload (ASR) and POST /v1/tts (TTS) calls in the languages developers ask about most.
Replace pk_live_your_key_here with a key from /keys and amh with any supported locale.
Transcribe a file
curl -X POST https://api.phonetico.ai/v1/asr/upload \
-H "Authorization: Bearer pk_live_your_key_here" \
-F "[email protected]" \
-F "localeCode=amh"Word timestamps (JSON endpoint)
Use the JSON endpoint when you need wordTimestamps. The audio is base64-encoded in the body.
curl -X POST https://api.phonetico.ai/v1/asr \
-H "Authorization: Bearer pk_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"audio": "'$(base64 -i speech.wav)'",
"localeCode": "amh",
"wordTimestamps": true
}'Synthesizing text with a preset voice
The simplest TTS path: pass a voice.preset from GET /v1/tts/voices and the text to speak. No reference audio, no rights attestation. Consent travelled with the voice when it was registered. Tigrinya only today; voice tir_phonetico_01 is seeded.
curl -X POST https://api.phonetico.ai/v1/tts \
-H "Authorization: Bearer pk_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"text": "ምስ መኪና ስለዘላተሙኒ ውነይ ስሒተ።",
"language": "tir",
"voice": { "preset": "tir_phonetico_01" },
"options": { "qualityTier": "balanced" }
}' | jq -r '.audio' | base64 -d > out.wavSynthesizing text in a custom voice
Same key, same auth, JSON body that carries a reference clip plus its transcript. Tigrinya only today; other locales return 503 until their finetune lands.
REF_AUDIO=$(base64 -i voice-sample.wav)
curl -X POST https://api.phonetico.ai/v1/tts \
-H "Authorization: Bearer pk_live_your_key_here" \
-H "Content-Type: application/json" \
-d @- <<JSON | jq -r '.audio' | base64 -d > out.wav
{
"text": "ምስ መኪና ስለዘላተሙኒ ውነይ ስሒተ።",
"language": "tir",
"voice": {
"reference": {
"audio": "$REF_AUDIO",
"transcript": "exact transcript of voice-sample.wav",
"rightsAttestation": true
}
},
"options": { "qualityTier": "balanced" }
}
JSONCommunity SDKs
Building one? We're happy to link community libraries here. Send us a link and we'll add it.