Pipeline Compute Call
The Pipeline Compute Call executes inference for your requested task or task sequence (e.g., ASR, Translation, TTS, or chained combinations) across 22+ Indian languages.
Inference Compute Endpoint (obtained via Pipeline Config callbackUrl):
POST https://dhruva-api.bhashini.gov.in/services/inference/pipelineRequest Schema→
Request Payload Specification
Detailed breakdown of inputData text/audio, task configurations, and single/chained task parameters.
Response Schema→
Response Payload Specification
Examine structured inference output, translated text spans, audio encodings, and error structures.
1-Minute Quick Call
Execute an inference request with your pipeline configuration and inference API key:
JavaScript (fetch)
const url = "https://dhruva-api.bhashini.gov.in/services/inference/pipeline";
const headers = {
"Content-Type": "application/json",
"Accept": "*/*",
"Authorization": "<YOUR_INFERENCE_API_KEY>"
};
const payload = {
pipelineTasks: [
{
taskType: "translation",
config: {
language: {
sourceLanguage: "en",
targetLanguage: "hi"
},
serviceId: "ai4bharat/indictrans-v2-all-gpu--t4"
}
}
],
inputData: {
input: [
{
source: "Hello, welcome to Bhashini!"
}
]
}
};
const response = await fetch(url, {
method: "POST",
headers,
body: JSON.stringify(payload)
});
const data = await response.json();
console.log(data);Request Headers
These authentication and content headers identify your application and authorize inference requests to the Bhashini pipeline service.
| Header | Type | Required | Description |
|---|---|---|---|
Content-Type | string | Required | Must be set to application/json. |
Accept | string | Required | Must be set to */* or application/json. |
Authorization | string | Required | Your raw inference API key from the developer profile (do not include Bearer prefix). |