🚀 BTC API Documentation

Complete guide to use image processing, PDF handling, chat features, and voice generation

Organization: Blind Tech Community

Developer: Milan Thapa

Base URL: https://api.blindtechcommunity.in/api/v1

Getting Started

Main URL: https://api.blindtechcommunity.in/api/v1
Format: application/json or multipart/form-data
Requests per minute: 100
File size limit: 10MB
Response time: 30 seconds max

What You Can Do

Voice Generation Audio

Features: More than 12 languages available | Any length text | No files kept on server | Instant delivery | Automatic cleanup

POST Generate Voice

/tts/generate

Convert your text to voice and get the audio as encoded data

What you need to send:
text text required

Your text - you can send as much as you want

language text optional

Language code: en (English), hi (Hindi), es (Spanish), fr (French), de (German), it (Italian), pt (Portuguese), ru (Russian), ja (Japanese), zh (Chinese), ko (Korean), ar (Arabic)

voice text optional

Voice type: Kore, Phoebe, Charon, Fenrir, Aoede

Example request:
curl -X POST https://api.blindtechcommunity.in/api/v1/tts/generate \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Hello world, this is text to voice conversion",
    "language": "en",
    "voice": "Kore"
  }'
What you get back:
{
  "success": true,
  "data": {
    "message": "Speech generated successfully",
    "text": "Hello world, this is text to voice conversion",
    "language": "English",
    "voice": "Kore",
    "audioFormat": "WAV",
    "audioSize": 245600,
    "audioBase64": "UklGRi4AwAAA..."
  }
}

POST Stream Voice

/tts/stream

Get voice as downloadable audio file

curl -X POST https://api.blindtechcommunity.in/api/v1/tts/stream \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Hello world",
    "language": "en",
    "voice": "Kore"
  }' --output audio.wav

GET Check Available Voices

/tts/voices

See all voice options you can use

curl https://api.blindtechcommunity.in/api/v1/tts/voices

GET Check Supported Languages

/tts/languages

See all languages available

curl https://api.blindtechcommunity.in/api/v1/tts/languages
Response example:
{
  "success": true,
  "data": {
    "languages": [
      { "code": "en", "name": "English" },
      { "code": "hi", "name": "Hindi" },
      { "code": "es", "name": "Spanish" },
      { "code": "fr", "name": "French" },
      { "code": "de", "name": "German" },
      { "code": "it", "name": "Italian" },
      { "code": "pt", "name": "Portuguese" },
      { "code": "ru", "name": "Russian" },
      { "code": "ja", "name": "Japanese" },
      { "code": "zh", "name": "Chinese" },
      { "code": "ko", "name": "Korean" },
      { "code": "ar", "name": "Arabic" }
    ],
    "total": 12
  }
}

GET Get Voice Details

/tts/info

Learn more about the voice service

curl https://api.blindtechcommunity.in/api/v1/tts/info

How This Works

Step by step:
1. You send text to the service
2. The system creates the voice
3. Voice is converted to a format you can use
4. Converted to encoded data (Base64)
5. Sent to you as a response
6. You convert it back and play
7. Nothing stays on the server
8. File is gone after use

Voice Types

Voice Type Best For
Kore Standard Normal everyday use
Phoebe Light Soft and pleasant
Charon Deep Serious and professional
Fenrir Strong Bold and powerful
Aoede Calm Relaxing and gentle

Languages Supported

Code Language Sample Text
en English Hello world
hi Hindi नमस्ते दुनिया
es Spanish Hola mundo
fr French Bonjour le monde
de German Hallo Welt
it Italian Ciao mondo
pt Portuguese Olá mundo
ru Russian Привет мир
ja Japanese こんにちは世界
zh Chinese 你好世界
ko Korean 안녕하세요 세계
ar Arabic مرحبا العالم

Image Tools Smart

POST Check Image Content

/image/analyze

Upload a picture and get detailed information about it

curl -X POST https://api.blindtechcommunity.in/api/v1/image/analyze \
  -F "image=@photo.jpg"

POST Read Text from Image

/image/extract-text

Get all written text from a picture

curl -X POST https://api.blindtechcommunity.in/api/v1/image/extract-text \
  -F "image=@document.jpg"

POST Find Things in Image

/image/detect-objects

Identify items that appear in your picture

curl -X POST https://api.blindtechcommunity.in/api/v1/image/detect-objects \
  -F "image=@photo.jpg"

POST Ask About Image

/image/chat

Ask questions about a picture you uploaded

curl -X POST https://api.blindtechcommunity.in/api/v1/image/chat \
  -H "Content-Type: application/json" \
  -d '{"message": "What colors do you see?"}'

PDF Tools Smart

POST Get Text from PDF

/pdf/extract-text

Pull all text from a PDF document

curl -X POST https://api.blindtechcommunity.in/api/v1/pdf/extract-text \
  -F "pdf=@document.pdf"

POST Make PDF Summary

/pdf/summarize

Get a short version of what's in the PDF

curl -X POST https://api.blindtechcommunity.in/api/v1/pdf/summarize \
  -F "pdf=@document.pdf"

POST Ask PDF Questions

/pdf/chat

Ask questions about a PDF document

curl -X POST https://api.blindtechcommunity.in/api/v1/pdf/chat \
  -H "Content-Type: application/json" \
  -d '{"message": "What is this about?"}'

Chat Talk

POST Chat Without Search

/chat

Have a conversation

curl -X POST https://api.blindtechcommunity.in/api/v1/chat \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Hello!",
    "mode": "general",
    "useSearch": false
  }'

POST Chat With Search

/chat

Ask questions and get current information from the web

curl -X POST https://api.blindtechcommunity.in/api/v1/chat \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Who is the PM of India right now?",
    "mode": "general",
    "useSearch": true
  }'

Code Examples

JavaScript - Create Voice

async function makeVoice(text) {
  const response = await fetch('https://api.blindtechcommunity.in/api/v1/tts/generate', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ text, language: 'en', voice: 'Kore' })
  });
  
  const data = await response.json();
  
  // Turn encoded data back to audio
  const binaryString = atob(data.data.audioBase64);
  const bytes = new Uint8Array(binaryString.length);
  for (let i = 0; i < binaryString.length; i++) {
    bytes[i] = binaryString.charCodeAt(i);
  }
  
  // Create and play
  const blob = new Blob([bytes], { type: 'audio/wav' });
  const url = URL.createObjectURL(blob);
  
  const audio = new Audio(url);
  audio.play();
}

// Use it
makeVoice('Hello world in English');

Python - Create Voice

import requests
import base64

def make_voice(text, language='en', voice='Kore'):
    url = 'https://api.blindtechcommunity.in/api/v1/tts/generate'
    
    payload = {
        'text': text,
        'language': language,
        'voice': voice
    }
    
    response = requests.post(url, json=payload)
    data = response.json()
    
    if data['success']:
        # Turn encoded data back to audio
        audio_data = base64.b64decode(data['data']['audioBase64'])
        
        # Save to file
        with open('output.wav', 'wb') as f:
            f.write(audio_data)
        
        return 'Voice saved as output.wav'
    else:
        return f"Problem: {data['error']}"

# Use it
make_voice('Hello world in Hindi', language='hi')

Error Information

Code Meaning What to do
200 Good - it worked Your request is done
400 Bad request Check what you sent
429 Too many requests Wait a bit and try again
500 Server problem Try later

Contact & Help

Organization: Blind Tech Community
Developer: Milan Thapa
What we do: Make technology easier for everyone to use