Language Server¶
What is the Language Server?¶
A unified API platform for accessing AI models and services at one place
Key Features
- 🎤 Transcription - Convert audio to text with Google and Azure transcription services
- 🤖 Completion - Generate chat completions from LLMS
- 🌐 Translation - Translate text across 11 languages with Google, Azure, Sarvam, and NLLB
- 🔊 Text-to-Speech - Convert text to audio with Azure, Google, Sarvam, and open-source models
- 🎚️ Audio Engine - Run ordered preprocessing / analysis pipelines on audio in one request (guide)
Available Services¶
🎤 Transcription¶
Convert audio files to text using state-of-the-art speech recognition models
🤖 Completion¶
Generate text completions using advanced language models
🌐 Translation¶
Translate text between 11 Indian and global languages
🔊 Text-to-Speech¶
Convert text to natural-sounding audio in 13+ Indian languages
🎚️ Audio Engine¶
Run configurable pipelines (denoise, duration checks, speech-duration via VAD, and more) with signed output URLs
API Endpoints Overview¶
| Method | Path | Purpose |
|---|---|---|
| POST | /v1/task/batch/transcription |
Create a new batch transcription task |
| POST | /v1/task/transcription |
Create a new single transcription task |
| POST | /v1/task/batch/completion |
Create a new batch completion task |
| POST | /v1/task/completion |
Create a new single completion task |
| POST | /v1/task/translation |
Create a single (sync) translation task |
| POST | /v1/task/text-to-speech |
Create a single (sync) text-to-speech task |
| GET | /v1/status/{task_id} |
Get status and result of a specific task |
| GET | /v1/tasks/{user_email} |
List all tasks created by a user |
| GET | /v1/response/{output_dataset_id} |
Retrieve the output file of a completed batch task |
| GET | /v1/input_datasets/{user_email} |
List all input datasets uploaded by a user |
| GET | /v1/services |
List all services provided by the server |
| POST | /v1/audio_engine/pipeline |
Run an ordered audio component pipeline (multipart; returns task_id and signed URLs) |
Getting Started with Projects and API Keys¶
Note
These are prerequisites for using the Language Server API
Tip
Heads Up: Remember to replace the current Server-URL in your requests with the new one from the Language Server Team.
What is a Project?¶
A Project represents a logical grouping of tasks and resources. Each project:
- ✅ Has a unique
project_name - ✅ Is associated with specific tags and metadata
- ✅ Owns a dedicated API key for services
Tip
If you're using the platform for personal or individual use, set project_name to "Individual".
What is an API Key?¶
An API key is a secure token used to authenticate requests made to the platform:
- 🔐 Project-specific: Each project has its own API key
- 🔒 Secure: API keys should be kept secret and not shared between projects
- ✅ Required: Any API request must include a valid key for the associated project
How to Use¶
- Create a Project (currently not accessible through platform, please contact us for project creation)
- Obtain the API Key assigned to the project
Include the following in your request:
Info
The platform will validate that the project_name matches the API key.
Endpoint Details¶
1. Create Task¶
Batch Task Creation¶
- Endpoint:
POST /v1/task/batch/{task_name} - Description: Creates a new task, preprocesses the payload, and publishes it to the job queue
- Task Types:
transcriptionorcompletion
Parameters:
- task_name (path): Name of the task (e.g., transcription, completion)
- payload_data (form, required): JSON string with task details
Responses:
- 200: Successful Response
- 422: Validation Error
Single Task Creation¶
- Endpoint:
POST /v1/task/{task_name} - Description: Creates a new task, preprocesses the payload, and publishes it to the job queue
- Task Types:
transcription,completion,translation, ortext-to-speech
Parameters:
- task_name (path): Name of the task (e.g., transcription, completion, translation, text-to-speech)
- payload_data (form, required): JSON string with task details
- files (form, conditional): Array of files — required for transcription (audio files). Translation and text-to-speech do not require file uploads.
Warning
The total size of all files in a single task upload must not exceed 25 MB.
Responses:
- 200: Successful Response
- 422: Validation Error
2. Get Task Status and Response¶
- Endpoint:
GET /v1/status/{task_id} - Description: Checks the status of a task. If the task is completed, returns the result; otherwise, returns the current status.
Parameters:
- task_id (path, required): ID of the task to check
Responses:
- 200: Successful Response
- 422: Validation Error
3. List Tasks by User¶
- Endpoint:
GET /v1/tasks/{user_email} - Description: Lists all the tasks created by a user.
Parameters:
- user_email (path, required): Email of the user
Responses:
- 200: Successful Response
- 422: Validation Error
4. List Services¶
- Endpoint:
GET /v1/services - Description: Lists all the services provided by the language server.
Parameters: None
Responses:
- 200: Successful Response
Example Usage¶
Create Task¶
Basic Request Format:
POST /v1/task/batch/{task_name}
Accept: application/json
X-API-Key: YOUR_API_KEY
Content-Type: multipart/form-data
payload_data={"user_email":"user@example.com","task_type":"BATCH","project_name":"Individual",...additional_fields}
files=@your_file_here
Transcription Example¶
POST /v1/task/batch/transcription
Accept: application/json
X-API-Key: YOUR_API_KEY
Content-Type: multipart/form-data
payload_data={"user_email":"user@example.com", "project_name":"Individual","task_type":"BATCH","provider":"AZURE","locale":"en-US"}
files=@audio_file.wav
Completion Example¶
POST /v1/task/batch/completion
Accept: application/json
X-API-Key: YOUR_API_KEY
Content-Type: multipart/form-data
payload_data={"user_email":"user@example.com","project_name":"Individual","task_type":"BATCH","models":["gemini-2.5-flash"]}
files=@requests.jsonl
Translation Example¶
POST /v1/task/translation
Accept: application/json
X-API-Key: YOUR_API_KEY
Content-Type: multipart/form-data
payload_data={"user_email":"user@example.com","project_name":"Individual","source_language":"en","target_language":"hi","provider":"GOOGLE","text":["Hello, how are you?"]}
Text-to-Speech Example¶
POST /v1/task/text-to-speech
Accept: application/json
X-API-Key: YOUR_API_KEY
Content-Type: multipart/form-data
payload_data={"user_email":"user@example.com","project_name":"Individual","provider":"AZURE","models":["NEURAL"],"datapoints":{"dp1":{"text":"Hello, this is a test.","speed":"1.0x","lang":"en-IN"}}}
Get Task Status¶
List Tasks by User¶
List Services¶
Task Status and Polling¶
Status Values¶
All tasks go through the following states:
| Status | Description |
|---|---|
PENDING |
Task is queued and waiting to be processed |
COMPLETED |
Task finished successfully |
FAILED |
Task encountered an unrecoverable error |
PARTIAL_COMPLETE |
Task completed but some items within it failed |
Polling Pattern (Batch Tasks)¶
Batch tasks (transcription and completion) are processed asynchronously via a queue. After submitting a batch task, poll the status endpoint until the status is terminal:
import time, requests
task_id = "your-task-id"
headers = {"X-API-Key": "YOUR_API_KEY"}
while True:
r = requests.get(f"https://languageserver.karya.in/v1/status/{task_id}", headers=headers)
data = r.json()
if data["status"] in ("COMPLETED", "FAILED", "PARTIAL_COMPLETE"):
print(data)
break
time.sleep(10) # wait 10 seconds before polling again
Info
Single tasks (translation, text-to-speech, and single transcription/completion) return results directly in the POST response — no polling needed.
Available Models¶
Transcription Models¶
| Provider | Available Models | Default Model |
|---|---|---|
| Azure | base |
base |
long, short, telephony, telephony_short |
long |
|
| Sarvam | saarika:v2.5 |
saarika:v2.5 |
| AWS | base |
base |
Completion Models¶
| Model | Provider | Status |
|---|---|---|
gemini-3-flash-preview |
Vertex AI — Google | Default |
gemini-2.5-flash |
Vertex AI — Google | Available |
gemini-2.5-pro |
Vertex AI — Google | Available |
gemini-3.1-pro-preview |
Vertex AI — Google | Available |
gemini-3.1-flash-lite-preview |
Vertex AI — Google | Available |
gpt-4o |
Azure OpenAI | Available |
gpt-4o-mini |
Azure OpenAI | Available |
gpt-5 |
Azure OpenAI | Available (single only) |
gpt-5-chat |
Azure OpenAI | Available (single only) |
gpt-5-mini |
Azure OpenAI | Available (single only) |
gpt-5-nano |
Azure OpenAI | Available (single only) |
claude-sonnet-4 |
Vertex AI — Anthropic | Available |
claude-haiku-4-5 |
Vertex AI — Anthropic | Available |
claude-sonnet-4-6 |
Vertex AI — Anthropic | Available |
claude-opus-4-6 |
Vertex AI — Anthropic | Available |
How to Use Single Task Endpoint¶
Info
Single task endpoint format: /task/{task_name} where task_name can be 'completion', 'transcription', 'translation', or 'text-to-speech'
Transcription Workflow¶
- Prepare your audio files and a JSON payload with required fields
- Make a POST request to the transcription endpoint with the payload and files
- Receive a response and status of the task
Completion Workflow¶
- Prepare a
.jsonlfile with each line as a request - Make a POST request to the completion endpoint with the payload and the
.jsonlfile - Receive a response and task status
Translation Workflow¶
- Prepare your text as a list of strings and a JSON payload with
source_language,target_language, andprovider - Make a POST request to the translation endpoint with
payload_dataas a form field - Receive the translated text directly in the response
Text-to-Speech Workflow¶
- Prepare your
datapointsdict (each entry hastext,speed, andlang) and a JSON payload withproviderandmodels - Make a POST request to the text-to-speech endpoint with
payload_dataas a form field - Receive audio download URLs (
saas_url) in the response — valid for 24 hours