TheaimartAIx DOCS
Home Get API key

Speech & transcription

Text-to-speech and speech-to-text, using the OpenAI audio schema.

Text-to-speech

POST /v1/audio/speech returns raw audio bytes (just like OpenAI).

curl https://api.aix.theaimart.co/v1/audio/speech \
  -H "Authorization: Bearer $AIX_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "hexgrad/Kokoro-82M",
    "voice": "af_bella",
    "input": "Hello from theaimart AIx",
    "response_format": "mp3"
  }' --output speech.mp3
audio = client.audio.speech.create(
    model="hexgrad/Kokoro-82M",
    voice="af_bella",
    input="Hello from theaimart AIx",
)
audio.stream_to_file("speech.mp3")
FieldNotes
modele.g. hexgrad/Kokoro-82M
inputText to synthesize
voiceVoice id supported by the selected model (e.g. af_bella)
response_formatmp3 or wav

TTS is metered by input tokens at the model’s published per-million-token rate.

Transcription

POST /v1/audio/transcriptions — multipart upload. file is required; model defaults to openai/whisper-large-v3-turbo. Add an optional prompt form field to guide terminology.

curl https://api.aix.theaimart.co/v1/audio/transcriptions \
  -H "Authorization: Bearer $AIX_KEY" \
  -F file=@meeting.mp3 \
  -F model=openai/whisper-large-v3-turbo
t = client.audio.transcriptions.create(
    model="openai/whisper-large-v3-turbo",
    file=open("meeting.mp3", "rb"),
)
print(t.text)

Returns { "text": "…" }. Set response_format=verbose_json to request the full transcription object. Billing is on the real transcript duration (not file size): AIx holds an estimate, then reconciles to the actual minutes.

Max upload 25 MB. Allowed types: mp3, wav, m4a, flac, ogg, webm.

Last updated July 18, 2026

Was this page helpful?