TheaimartAIx DOCS
Home Get API key

Audio

Text-to-speech

POST /v1/audio/speech

Returns raw audio bytes (Content-Type: audio/mpeg), not JSON.

FieldTypeRequiredDescription
model string required TTS model id, e.g. hexgrad/Kokoro-82M.
input string required Text to synthesize.
voice string default: af_bella Voice id supported by the selected model.
response_format string default: mp3 mp3 or wav.
curl https://api.aix.theaimart.co/v1/audio/speech \
  -H "Authorization: Bearer $AIX_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "model": "hexgrad/Kokoro-82M", "input": "hello world", "voice": "af_bella" }' \
  --output speech.mp3

Billed by input tokens at the selected model’s published per-million-token rate.

Transcription

POST /v1/audio/transcriptions

Takes multipart form-data (not JSON).

FieldTypeRequiredDescription
file file required Audio file (multipart form-data).
model string default: openai/whisper-large-v3-turbo STT model id.
prompt string optional Optional text that guides spelling, terminology or continuation context.
response_format string default: json json, text or verbose_json. Non-verbose responses use the JSON text envelope.
curl https://api.aix.theaimart.co/v1/audio/transcriptions \
  -H "Authorization: Bearer $AIX_KEY" \
  -F file=@clip.mp3 \
  -F model=openai/whisper-large-v3-turbo
{ "text": "transcribed text here" }

Billed per minute using the measured transcript duration. AIx holds an estimate during the call and reconciles it to the returned duration. Maximum file size is 25 MB; accepted extensions are mp3, wav, m4a, flac, ogg and webm.

Last updated July 18, 2026

Was this page helpful?