Integration guide

This guide helps developers integrate BHASHINI quickly, end to end.

Auth and tokens

Request an API key from the BHASHINI portal and pass it as a header on every request. Keep your key server-side — never ship it in client-side code.

Making your first translation

  1. Pipeline Search (optional) — discover which Pipeline ID supports your task/language combination.
  2. Pipeline Config (mandatory) — send your Pipeline ID and task details to get back model/endpoint configuration.
  3. Pipeline Compute (mandatory) — send the actual input (text/audio) using the config from step 2, and get your result.

See the API reference for full request/response examples, or jump straight to a Developer guide tutorial for a specific task.

Handling errors and retries

  • Check the HTTP status code and error payload before retrying — 4xx errors (bad request, invalid pipeline/model ID) won't succeed on retry without a fix.
  • Use exponential backoff for 5xx/timeout errors.
  • Log the Pipeline ID and Service ID on failures — they're the fastest way to diagnose which model/step failed.

CORS notes and running examples locally

  • BHASHINI APIs are meant to be called from a server, not directly from browser JavaScript — proxy requests through your backend to avoid CORS issues and to keep your API key secret.
  • The code samples in this documentation (see Try it out) run against the real API — use them to validate your integration before wiring up your own backend.

See also