📚 Documentation

API Documentation

Everything you need to integrate VachaAPI into your applications. Get started in minutes.

Getting Started

Welcome to VachaAPI! This guide will help you get up and running in just a few minutes.

Prerequisites

  • An API key (get one by registering)
  • Basic knowledge of HTTP requests
  • Your preferred programming language

Base URL

https://api.vacha.ai/v1

Quick Example

curl -X POST https://api.vacha.ai/v1/asr \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: multipart/form-data" \
  -F "audio=@audio.mp3" \
  -F "language=en"

Authentication

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

Header Authorization: Bearer YOUR_API_KEY

Getting Your API Key

  1. Sign up for a free account
  2. Navigate to your dashboard
  3. Generate an API key from the settings page
  4. Keep your API key secure and never share it publicly

ASR API

Convert speech to text with high accuracy. Supports 100+ languages.

POST /asr

Request Parameters

Parameter Type Required Description
audio File Yes Audio file (MP3, WAV, M4A, max 10MB)
language String No Language code (en, hi, es, etc.). Auto-detected if not provided.
enable_speaker_diarization Boolean No Enable speaker separation (default: false)

Example Request

curl -X POST https://api.vacha.ai/v1/asr \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: multipart/form-data" \
  -F "audio=@recording.mp3" \
  -F "language=en" \
  -F "enable_speaker_diarization=true"

Response

{
  "success": true,
  "data": {
    "text": "Hello, this is a transcription.",
    "confidence": 0.96,
    "duration": 15.3,
    "words": 32,
    "language": "en"
  }
}

TTS API

Convert text to natural-sounding speech in multiple languages and voices.

POST /tts

Request Parameters

Parameter Type Required Description
text String Yes Text to convert to speech (max 5000 characters)
language String Yes Language code (en, hi, es, etc.)
voice String No Voice ID (default: auto-selected)
speed Float No Speech speed (0.5 to 2.0, default: 1.0)

OCR API

Extract text from images and PDFs with high accuracy.

POST /ocr

Request Parameters

Parameter Type Required Description
image File Yes Image or PDF file (JPG, PNG, PDF, max 10MB)
language String No Language hint for better accuracy

Translation API

Translate text between 100+ languages with high accuracy.

POST /translation

Request Parameters

Parameter Type Required Description
text String Yes Text to translate (max 5000 characters)
source_language String No Source language code (auto-detected if not provided)
target_language String Yes Target language code

Transliteration API

Convert text between different scripts while preserving pronunciation.

POST /transliteration

Rate Limits

Rate limits vary by plan. Here are the default limits:

Plan Requests per Minute Requests per Day
Free 10 1,000
Professional 100 100,000
Enterprise Unlimited Unlimited

Error Handling

All errors follow a consistent format:

{
  "success": false,
  "error": {
    "code": "INVALID_API_KEY",
    "message": "The provided API key is invalid",
    "details": {}
  }
}

Common Error Codes

Code Description
INVALID_API_KEY API key is missing or invalid
RATE_LIMIT_EXCEEDED Too many requests
INVALID_REQUEST Request parameters are invalid
FILE_TOO_LARGE Uploaded file exceeds size limit

SDKs

We provide official SDKs for popular programming languages:

🐍

Python

pip install vacha-api

📦

Node.js

npm install vacha-api

Java

Maven/Gradle

🐘

PHP

composer require vacha/api

Ready to Get Started?

Start building with our APIs today. No credit card required.