AksharKosh API

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) or to_hinglish (Hindi → Hinglish). Default to_hindi.
  • grammar: true makes a typed h, hai, hain, hu or hoon agree with मैं, तुम, हम, आप, वे or लोग (हूँ / हो / हैं), and turns a sentence-ending full stop after Hindi into ।. Default false.
  • unsure: guess (best guess) or leave (unknown words stay as typed). Default guess.
  • adult: true allows adult words in the output. Default false.
  • keep_caps: true keeps words typed in CAPITALS as typed. Default false.
  • keep_english: true keeps the words in your My English words list as typed. Default false.

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

UseLimit
No sign-up500 words per conversion; 3,000 words per day
Account awaiting email verification500 words per conversion; 3,000 words per day
Free verified account2,000 words per conversion; 20,000 words per day
Paid plan or word pack20,000 words per conversion; 20,000 free words per day first, then plan and pack balance
Per-IP ceiling30,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 textJPG, PNG or WebP; 5 MB; one image at a time. Recognised words use the conversion allowance.
API2,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 .docxFree in your browser up to 10,000 words and 10 MB

Errors

  • 400 rest_invalid_param: A bad option value, for example a direction that is not to_hindi or to_hinglish.
  • 400 rest_missing_callback_param: No text in 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 the Retry-After header.
  • 503 aksharkosh_converter_down: The converter isn’t answering; no words were used. Try again in a minute.