NepVox API Documentation

Professional API reference for developers
Base URL: https://nepvox.com/api

Endpoints Summary

Method Endpoint Description
POST /api/login User login (get token)
POST /api/tts Convert text to speech (returns audio URL)Requires Auth
POST /api/stt Convert audio file to text (speech recognition)Requires Auth

Authentication

All API requests to Text to Speech and Speech to Text endpoints require authentication using a Bearer token. First, log in to obtain your token, then include it in the Authorization header for subsequent requests.

Login Endpoint
POST /api/login
  • email (required): string
  • password (required): string
Example Request (cURL)
curl -X POST https://nepvox.com/api/login -H "Content-Type: application/json" -d '{"email":"user@example.com","password":"yourpassword","login_type":"email or google"}'
Example Response
{ "status": true, "message": "Login successful", "data": { "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "token_type": "Bearer", "user": { "id": 1, "firstname": "John", "lastname": "Doe", "email": "john.doe@example.com", "subscription": "basic", "project_limit": "5", "text_limit": "20000" } } }

Error Response Example
{ "status": false, "message": "Invalid credentials.", "errors": { "email": ["The email field is required."], "password": ["The password field is required."] } }
How to Use the Token

Include the token in the Authorization header as a Bearer token for all protected endpoints:

Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

Voices

Voices supported by the API. You can get voice list from /api/voices endpoint.

curl -X GET https://nepvox.com/api/voices
Example Response
{ "status": true, "message": "Voices fetched successfully", "data": [ { "locale": "af-ZA", "locale_name": "Afrikaans (South Africa)", "voices": [ { "id": 1, "DisplayName": "Adri", "LocalName": "Adri", "ShortName": "af-ZA-AdriNeural", "isFree": 1, "Gender": "Female", "Locale": "af-ZA", "LocaleName": "Afrikaans (South Africa)", "StyleList": null, "SecondaryLocaleList": null, "SampleRateHertz": "48000", "VoiceType": "Neural", "Status": "GA", "WordsPerMinute": "147", "created_at": "2025-01-19T15:09:29.000000Z", "updated_at": "2025-01-19T15:09:29.000000Z", "sample_url": "https://nepvox.blob.core.windows.net/nepvox/uploads/voice-previews/af-ZA-AdriNeural.wav", "is_locked": true }, ] }, ] }

Languages

Languages supported by the API. You can get language list from /api/languages endpoint.

curl -X GET https://nepvox.com/api/languages
Example Response
{ "status": true, "message": "Languages fetched successfully", "data": [ { "name": "English", "code": "en-US" } ] }

Text to Speech (TTS)

POST /api/tts Requires Auth

Converts text to speech and returns a downloadable audio file URL.

multipart/form-data
Parameters
  • text (required): string, max 500 chars for free plan and 10000 chars for premium plan
  • voice (required): string, voice name (Note: You can get voice list from /api/voices endpoint) and use ShortName
  • userVoiceName (required): string, user voice name
Example Request (cURL)
curl -X POST https://nepvox.com/api/tts -H "Authorization: Bearer YOUR_TOKEN_HERE" -F "text=Hello world"
Example Response
{ "status": true, "message": "Conversion created successfully", "data": { "audio_url": "https://yourdomain.com/storage/tts/demo.mp3", "text": "Hello world" } }

Speech to Text (STT)

POST /api/stt Requires Auth

Converts an audio file (mp3, wav, ogg) to text.

multipart/form-data
Parameters
  • audio_file (required): file (mp3, wav, ogg)
  • language (optional): string, language code (Note: You can get language list from /api/languages endpoint)
Example Request (cURL)
curl -X POST https://nepvox.com/api/stt -H "Authorization: Bearer YOUR_TOKEN_HERE" -F "audio=@/path/to/audio.mp3"
Example Response
{ "status": true, "message": "Transcript created successfully", "data": { "text": "This is a demo transcription.", "language": "en-US" } }