REFERENCE

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.

Real-time

Speech to Text (ASR)

Convert speech to text in 23 Indian languages

POST
/v1/asr/recognize
Streaming

Text-to-Speech (TTS)

Generate natural speech from text

POST
/v1/tts/synthesize
AI Powered

Voice Agents

Deploy and manage conversational AI agents

POST
/v1/agents/create
3B Parameters

Language Models

Access specialized language models

POST
/v1/llm/chat

Special Features

Premium

Text-to-Speech (TTS)

Convert text to natural-sounding speech with multiple voice options and language support

POST
/v1/tts/synthesize

Key Features

Natural Voices
Multi-Language
Voice Cloning
SSML Support
AI Enhanced

Noise Cancellation

Advanced AI-powered noise reduction for crystal clear audio in any environment

POST
/v1/audio/denoise

Key Features

Real-time Processing
Background Noise Removal
Echo Cancellation
Voice Enhancement

Authentication

All API requests require authentication using your API key. Include it in the Authorization header.

Authentication Header
Authorization: Bearer your_api_key_here

Getting Your API Key

  1. Sign up for a Fonadalabs account
  2. Navigate to the API Keys section in your dashboard
  3. Click "Generate New Key" and copy the key
  4. Store it securely - you won't be able to see it again

Base URL & Headers

Base URL

https://api.fonadalabs.ai

Required Headers

HTTP Headers
Authorization: Bearer your_api_key Content-Type: application/json Accept: application/json

Speech to Text API

POST
/v1/asr/recognize

Convert audio to text in real-time with support for 23 Indian languages.

Request Parameters

ParameterTypeRequiredDescription
audiofile/base64
Required
Audio file or base64 encoded audio data
languagestring
Optional
Language code (e.g., 'hi-IN', 'ta-IN')
formatstring
Optional
Audio format: 'wav', 'mp3', 'ogg'

Example Request

cURL
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

JSON 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

POST
/v1/tts/synthesize

Generate natural-sounding speech from text with customizable voices.

Example Request

JavaScript
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

POST
/v1/agents/create

Create and deploy conversational AI agents for voice interactions.

Example Request

Python
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

CodeMessageDescription
400
Bad RequestInvalid request parameters
401
UnauthorizedInvalid or missing API key
403
ForbiddenAPI key doesn't have required permissions
429
Too Many RequestsRate limit exceeded
500
Internal Server ErrorTemporary server issue

Rate Limits

API requests are rate limited to ensure fair usage. Rate limits vary by endpoint and subscription plan.

Free Tier

ASR Requests100/hour
TTS Requests50/hour
Agent Calls10/day

Pro Tier

ASR Requests10,000/hour
TTS Requests5,000/hour
Agent Calls1,000/day