API Playground
Reference for the pipeline request shape below — pick a capability, fill in the request, and send it for real from the popup playground.
Endpoint
POST https://dhruva-api.bhashini.gov.in/services/inference/pipelinePath parameters
This API doesn't use path parameters. Every request goes to the same fixed endpoint — the specific capability and inputs are sent in the JSON body instead.
Headers
Authorization — string, required — your inference API key, sent as a raw value. No Bearer prefix.
Content-Type — string, required — always application/json; the request body is JSON for every capability.
Query parameters
Not used by this API either — every request is a POST with a JSON body, described per capability in the Playground popup.
Response
A successful response returns the output nested under the requested task type. The exact shape varies slightly by capability — text-based tasks return a text field, audio-based tasks return a reference to the generated audio. Illustrative shape:
{
"pipelineResponse": [
{
"taskType": "translation",
"output": [
{
"source": "Hello, how are you?",
"target": "नमस्ते, आप कैसे हैं?"
}
]
}
]
}HTTP Status Codes
| Status Code | Meaning | Troubleshooting |
|---|---|---|
200 OK | Inference completed successfully. | Response contains pipelineResponse array. |
400 Bad Request | Malformed JSON or missing required fields. | Verify language codes, base64 encoding, or service IDs. |
401 Unauthorized | Missing or invalid Authorization header. | Check that your API key is provided without the Bearer prefix. |
403 Forbidden | API key lacks permission for the requested service. | Verify service entitlement or regenerate key in the portal. |
429 Too Many Requests | Concurrency or rate quota exceeded. | Implement exponential backoff and request throttling. |
500 Server Error | Underlying model inference timeout or GPU cluster error. | Retry with a small backoff; report persistent failures to support. |
Common Error Codes
| HTTP Status | Error Code | Resolution |
|---|---|---|
| 401 | ERR_INVALID_KEY | Confirm the inference API key is copied exactly from the console and sent as a raw value in Authorization — not prefixed with Bearer. |
| 400 | ERR_LANG_UNSUPPORTED | Check the model catalog to confirm the language/task combination is actually supported before retrying. |
| 429 | ERR_RATE_LIMIT | Back off with increasing delay between retries, and check current usage against your plan's rate limit. |
| 500 | ERR_PIPELINE_TIMEOUT | Retry once after a short delay. If it persists across multiple attempts, treat it as a service-side issue, not a request error. |
| 503 | — | The service is temporarily unavailable or at capacity. Retry with exponential backoff. |
| 504 | — | Gateway timeout: the model did not respond in time. Retry with exponential backoff; for long audio or large inputs, send shorter segments. |