Convert Hinglish to Hindi (or Hindi to Hinglish) from your own code. The API comes with the monthly plan or a word pack, and uses the same words as the converter page: every word you send is counted. A verified free account gets 100,000 trial words for 60 days from its first key. After the trial, API calls use only your plan and pack words. The free daily words are for the converter page, never for the API.
1. Make a key
Go to My Account › API keys and press Create key. Copy the key straight away: we only keep a fingerprint of it, so it can’t be shown again. You can have up to 5 keys and delete any of them.
Keep the key on your server. Don’t put it in a web page or an app that others can download.
2. Send text
curl https://aksharkosh.com/wp-json/aksharkosh/v1/api/convert \
-H "X-API-Key: ak_your_key_here" \
-H "Content-Type: application/json" \
-d '{"text": "mai ghar ja raha hu"}'
Fields (all optional except text):
text: Your text, up to 20,000 words (required).direction:to_hindi(Hinglish → Hindi) orto_hinglish(Hindi → Hinglish). Defaultto_hindi.grammar:truemakes a typed h, hai, hain, hu or hoon agree with मैं, तुम, हम, आप, वे or लोग (हूँ / हो / हैं), and turns a sentence-ending full stop after Hindi into ।. Defaultfalse.unsure:guess(best guess) orleave(unknown words stay as typed). Defaultguess.adult:trueallows adult words in the output. Defaultfalse.keep_caps:truekeeps words typed in CAPITALS as typed. Defaultfalse.keep_english:truekeeps the words in your My English words list as typed. Defaultfalse.
Your personal dictionary (My Account › My dictionary) is always used.
3. The answer
{
"text": "मैं घर जा रहा हूँ",
"word_count": 5,
"charged": 5,
"direction": "to_hindi",
"words": [ { "latin": "mai", "output": "मैं", "candidates": ["मैं", "मै"], "unsure": false } ],
"usage": { "monthly_left": 499995, "pack_left": 0 }
}
words lists each word with the other choices we know (candidates) and whether we are unsure of it. The word as you sent it is in latin for to_hindi and in hindi for to_hinglish; output is our answer for it.
Current limits
| Use | Limit |
|---|---|
| No sign-up | 500 words per conversion; 3,000 words per day |
| Account awaiting email verification | 500 words per conversion; 3,000 words per day |
| Free verified account | 2,000 words per conversion; 20,000 words per day |
| Paid plan or word pack | 20,000 words per conversion; 20,000 free words per day first, then plan and pack balance |
| Per-IP ceiling | 30,000 free words per day across visitors without an account and unverified accounts on one IP |
| File jobs (plan or pack) | .txt, .docx, .srt and text PDFs; 10 MB; PDFs up to 200 pages; 50,000 words per file |
| Image to Hindi text | JPG, PNG or WebP; 5 MB; one image at a time. Recognised words use the conversion allowance. |
| API | 2,000 words per call on a free trial; 20,000 with a plan or pack. A verified free account gets 100,000 trial words for 60 days from its first key. |
| Kruti Dev .docx | Free in your browser up to 10,000 words and 10 MB |
Errors
- 400
rest_invalid_param: A bad option value, for example adirectionthat is notto_hindiorto_hinglish. - 400
rest_missing_callback_param: Notextin the request. - 401
aksharkosh_api_key: No key, or a key that doesn’t exist. - 402
aksharkosh_api_words: Your plan and pack words are fewer than the words in this call. Buy a word pack, or wait for your plan to renew. - 403
aksharkosh_api_paid: Your plan has ended and you have no pack words. - 413
aksharkosh_too_long: Too many words for one call. - 429
aksharkosh_rate_limit: More than 60 calls in a minute (shared with your own use of the converter page); wait the seconds in theRetry-Afterheader. - 503
aksharkosh_converter_down: The converter isn’t answering; no words were used. Try again in a minute.
