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/pipeline

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.

HeaderTypeRequiredDescription
Content-TypestringRequiredMust be set to application/json.
AcceptstringRequiredMust be set to */* or application/json.
AuthorizationstringRequiredYour raw inference API key from the developer profile (do not include Bearer prefix).
Postman headers for Pipeline Compute Call