API Reference
Complete API documentation for Fonadalabs AI platform. Build intelligent conversational experiences with our Gen AI trained bots that help grow your business and streamline customer support. Deploy multiple agent types including chat bots, voice bots, and WhatsApp bots, enhanced with advanced features like text-to-speech, noise cancellation, and more through our comprehensive REST APIs endpoints.
Speech to Text (ASR)
Convert speech to text in 23 Indian languages
/v1/asr/recognizeText-to-Speech (TTS)
Generate natural speech from text
/v1/tts/synthesizeVoice Agents
Deploy and manage conversational AI agents
/v1/agents/createLanguage Models
Access specialized language models
/v1/llm/chatSpecial Features
Text-to-Speech (TTS)
Convert text to natural-sounding speech with multiple voice options and language support
/v1/tts/synthesizeKey Features
Noise Cancellation
Advanced AI-powered noise reduction for crystal clear audio in any environment
/v1/audio/denoiseKey Features
Authentication
All API requests require authentication using your API key. Include it in the Authorization header.
Authorization: Bearer your_api_key_hereGetting Your API Key
- Sign up for a Fonadalabs account
- Navigate to the API Keys section in your dashboard
- Click "Generate New Key" and copy the key
- Store it securely - you won't be able to see it again
Base URL & Headers
Base URL
https://api.fonadalabs.aiRequired Headers
Authorization: Bearer your_api_key
Content-Type: application/json
Accept: application/jsonSpeech to Text API
/v1/asr/recognizeConvert audio to text in real-time with support for 23 Indian languages.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| audio | file/base64 | Required | Audio file or base64 encoded audio data |
| language | string | Optional | Language code (e.g., 'hi-IN', 'ta-IN') |
| format | string | Optional | Audio format: 'wav', 'mp3', 'ogg' |
Example Request
curl -X POST https://api.fonadalabs.ai/v1/asr/recognize \
-H "Authorization: Bearer your_api_key" \
-H "Content-Type: multipart/form-data" \
-F "audio=@audio.wav" \
-F "language=hi-IN"Example Response
{
"success": true,
"data": {
"transcript": "नमस्ते, मैं आपकी कैसे सहायता कर सकता हूं?",
"confidence": 0.96,
"language": "hi-IN",
"duration": 2.34,
"words": [
{
"word": "नमस्ते",
"start": 0.0,
"end": 0.8,
"confidence": 0.98
}
]
}
}Text-to-Speech API
/v1/tts/synthesizeGenerate natural-sounding speech from text with customizable voices.
Example Request
const response = await fetch('https://api.fonadalabs.ai/v1/tts/synthesize', {
method: 'POST',
headers: {
'Authorization': 'Bearer your_api_key',
'Content-Type': 'application/json',
},
body: JSON.stringify({
text: 'नमस्ते, आपका स्वागत है।',
voice: 'natural-female-hindi',
format: 'wav',
speed: 1.0
})
});Voice Agents API
/v1/agents/createCreate and deploy conversational AI agents for voice interactions.
Example Request
import requests
response = requests.post('https://api.fonadalabs.ai/v1/agents/create',
headers={
'Authorization': 'Bearer your_api_key',
'Content-Type': 'application/json'
},
json={
'name': 'Customer Support Agent',
'language': 'hi-IN',
'voice': 'natural-female',
'personality': 'helpful and professional',
'system_prompt': 'You are a helpful customer support agent...'
}
)Error Codes
| Code | Message | Description |
|---|---|---|
400 | Bad Request | Invalid request parameters |
401 | Unauthorized | Invalid or missing API key |
403 | Forbidden | API key doesn't have required permissions |
429 | Too Many Requests | Rate limit exceeded |
500 | Internal Server Error | Temporary server issue |
Rate Limits
API requests are rate limited to ensure fair usage. Rate limits vary by endpoint and subscription plan.