Paxa Labs API
The Paxa API is one HTTP API for Thai, English, and Mandarin text to speech, multilingual speech to text, document OCR, and translation between 15 languages.
The Paxa API converts text into speech with Paxa TTS Flash v2, the flagship Thai, English, and Mandarin Chinese TTS model. Transcription turns recordings in Thai, English, Mandarin Chinese, and other languages into verbatim text with word timestamps. OCR reads PDFs and images into Markdown or structured blocks, and Document Extraction fills a schema of typed fields from them. Translation writes any of 15 languages from any other, with register control and glossaries. Requests are priced in credits. Audio arrives as a complete file or streamed, with word-level timing on request. A live WebSocket carries two-way conversations. An OpenAI-compatible endpoint accepts existing OpenAI SDK code after a change of base URL.
Send your first request#
- Create an API keyCreate a key in the dashboard. The full key is shown once, at creation. Store it as
PAXA_API_KEYin your environment. - Send the requestPOST your text and a
voiceto/v1/tts. The response body is the MP3 audio. - Play the audioThe example saves
speech.mp3. New accounts start with 100 free credits, which covers about 10,000 characters.
curl -X POST https://api.paxalabs.com/v1/tts \
-H "Authorization: Bearer $PAXA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "สวัสดีครับ ยินดีต้อนรับสู่ Paxa Labs",
"voice": "khanomkrok",
"model": "paxa-tts-flash-v2"
}' \
--output speech.mp3import { writeFile } from "node:fs/promises";
const response = await fetch("https://api.paxalabs.com/v1/tts", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PAXA_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
text: "สวัสดีครับ ยินดีต้อนรับสู่ Paxa Labs",
voice: "khanomkrok",
model: "paxa-tts-flash-v2",
}),
});
if (!response.ok) throw new Error(`TTS failed: ${response.status}`);
await writeFile("speech.mp3", Buffer.from(await response.arrayBuffer()));import os
import requests
response = requests.post(
"https://api.paxalabs.com/v1/tts",
headers={"Authorization": f"Bearer {os.environ['PAXA_API_KEY']}"},
json={"text": "สวัสดีครับ ยินดีต้อนรับสู่ Paxa Labs", "voice": "khanomkrok", "model": "paxa-tts-flash-v2"},
)
response.raise_for_status()
with open("speech.mp3", "wb") as f:
f.write(response.content)Coding agents start at /llms.txt. See coding agents for the skill and the full corpus, or connect the MCP server to give an agent the API as tools.
Base URL#
Every endpoint sits under https://api.paxalabs.com. The API is served over HTTPS only. Every failure returns an RFC 9457 problem+json body carrying a stable machine-readable code. See Errors for the full catalog.
Note
The API is in beta. When synthesis capacity is unavailable, requests answer provider_unavailable and nothing is charged.
All pages#
Get started
Guides
- Text to speech4 min read
- Multi-speaker dialogue2 min read
- Streaming2 min read
- Timestamps2 min read
- Direction tags8 min read
- Pauses2 min read
- Temperature2 min read
- Emotion tags (v1)4 min read
- Designed voices3 min read
- Live streaming5 min read
- Optimize latency3 min read
- Speech to text11 min read
- OCR4 min read
- Document Extraction12 min read
- Translation9 min read
- Credits and billing3 min read
- Rate limits3 min read
- Idempotency2 min read
- Errors2 min read
- OpenAI compatibility5 min read
- Migrate from OpenAI5 min read
Integrations
API reference
- Synthesize speechPOST/v1/tts
- Synthesize a dialoguePOST/v1/tts/dialogue
- Speech (OpenAI-compatible)POST/v1/audio/speech
- Live speechWS/v1/tts/live
- Design a voicePOST/v1/voices/design
- List designed voicesGET/v1/voices/designed
- Save a designed voicePOST/v1/voices/designed
- Rename a designed voicePATCH/v1/voices/designed/{id}
- Delete a designed voiceDELETE/v1/voices/designed/{id}
- Transcribe recordingsPOST/v1/stt
- Realtime transcriptionWS/v1/stt/live
- Transcription (OpenAI-compatible)POST/v1/audio/transcriptions
- Read documentsPOST/v1/ocr
- Extract fieldsPOST/v1/extract
- Translate textPOST/v1/translate
- List modelsGET/v1/models
- List voicesGET/v1/voices
- List voices (OpenAI-compatible)GET/v1/audio/voices
- List speech models (OpenAI-compatible)GET/v1/audio/models
- AccountGET/v1/me
- Send feedbackPOST/v1/feedback
- List feedbackGET/v1/feedback
- HealthGET/health
Updates