Convert names into the script your agent speaks
Rewrites values into another script while preserving pronunciation ('Rishabh' → 'ऋषभ'), so a voice agent says a name correctly instead of mangling it.
Rewrites values into another script while preserving pronunciation ('Rishabh' → 'ऋषभ'), so a voice agent says a name correctly instead of mangling it.
This endpoint is fast and partial, by design. Cached values return instantly. Values needing the vendor are converted only as far as the shared per-account budget allows right now; the rest come back in pending, unchanged, and are converted in the background. Ask again and they will be there. Never block your dialling on this call — send the original value if a conversion has not arrived yet.
Every conversion is cached for 30 days across the whole platform, so a repeat list costs nothing.
Rate limit: 1000 requests per minute per organization (bucket default). Exceeding it returns 429 with Retry-After; the X-RateLimit-* response headers report your remaining allowance on every call.
v2/transliterateAuthorization
AuthorizationRequiredBearer <token>
Your Graine API key. Create one in the dashboard under Developers, or via POST /v2/api-keys. Send it as Authorization: Bearer <key>.
In: header
Request Body
application/jsonRequiredvaluesRequiredValues
The values to convert. Duplicates cost nothing — they are collapsed before any work is done.
target_language_codeRequiredTarget Language Code
The script to convert INTO. One of en-IN, hi-IN, bn-IN, gu-IN, kn-IN, ml-IN, mr-IN, od-IN, pa-IN, ta-IN, te-IN.
source_language_codeSource Language Code
The language the values are WRITTEN in. Names are two or three words — too little text for reliable auto-detection — so send the real code whenever you know it.
"auto"Response Body
200
Successful Response
convertedRequiredConverted
Original value → converted value. Only values that actually changed appear here.
unchangedRequiredUnchanged
Values deliberately left alone: already in the target script, or carrying no letters to pronounce (a phone number, an order id). These are never sent to the vendor.
pendingRequiredPending
Values not converted THIS call because the shared vendor budget was spent. They are being converted in the background — ask again shortly and they will be in converted, served from cache. Send the original value in the meantime; never hold a call waiting for one.
target_language_codeRequiredTarget Language Code
The script the values were converted into.
cachedRequiredCached
How many values were answered from cache — these cost nothing and are the reason a repeat list is instant.
400
1000 — malformed or contradictory input. 1002 — a required parameter is missing.
errorRequiredError
Stable integer code from the /v2 error table. Branch on this.
messageRequiredMessage
One human-readable sentence. Wording may change; the code will not.
401
1100 — missing, unknown or inactive API key. 1101 — a browser session token was presented instead of an API key.
errorRequiredError
Stable integer code from the /v2 error table. Branch on this.
messageRequiredMessage
One human-readable sentence. Wording may change; the code will not.
403
1102 — the key is valid but lacks the scope this endpoint requires, or names another organization. GET /v2/scopes reports what a key holds.
errorRequiredError
Stable integer code from the /v2 error table. Branch on this.
messageRequiredMessage
One human-readable sentence. Wording may change; the code will not.
422
1001 — the body or query failed validation; the message names the first offending field.
errorRequiredinteger
Stable integer code from the error table. Branch on this, not on the message.
messageRequiredstring
One human-readable sentence. Wording may change; the code will not.
429
1300 — the per-organization request rate or concurrent-call limit was reached. Carries Retry-After.
errorRequiredError
Stable integer code from the /v2 error table. Branch on this.
messageRequiredMessage
One human-readable sentence. Wording may change; the code will not.
503
1501 — a service this endpoint depends on is unreachable or returned a 5xx.
errorRequiredError
Stable integer code from the /v2 error table. Branch on this.
messageRequiredMessage
One human-readable sentence. Wording may change; the code will not.
Successful Response

