Languages

How do you build Hindi AI apps with Plugsky?

Plugsky accepts Hindi through the OpenAI-compatible endpoint at https://api.plugsky.com/v1 with no special setup. Devanagari matras and conjuncts fragment in tokenisers, so measure tokens on real prompts, NFC-normalise before indexing, and treat Hinglish as its own eval set. Use plugsky-embed-multilingual when users query in Roman script against Hindi documents.

Key facts

Hindi scriptLeft-to-right Devanagari abugida; matras and conjuncts need NFC normalisation
TokenisationMatras and conjuncts can fragment into subwords — measure with the Plugsky token calculator
Code-mixingHinglish in Roman script needs its own prompt and eval set
API compatibilityOpenAI-compatible POST https://api.plugsky.com/v1/chat/completions — chat, streaming, JSON mode and function calling
Models30+ models behind one endpoint, from free tiers to frontier reasoning
Free tierFree plan with plugsky-micro and plugsky-lite, no card required
DeploymentPlugsky cloud, your VPC, on-prem and air-gapped options
Product statusChat, streaming, JSON mode, function calling, embeddings, RAG and agents live; audio, images, batch and fine-tuning coming soon

TL;DR

  • Hindi runs on the standard chat endpoint — only base_url changes.
  • NFC-normalise Devanagari so matras and conjuncts stay composed.
  • Measure tokens on real Hindi; word counts understate usage.
  • Evaluate Devanagari and Hinglish prompts separately.
  • plugsky-embed-multilingual bridges Roman queries and Hindi documents.

How it works, step by step

  1. Create a Plugsky API key on the free plan (no card) and set base_url to https://api.plugsky.com/v1.
  2. Send a small set of real Hindi prompts to /v1/chat/completions and compare output across two or three models.
  3. Count tokens for those prompts with the Plugsky token calculator and set chunk sizes that fit your model context.
  4. Normalise text before indexing or prompting: NFC-normalise Devanagari and standardise numerals.
  5. For RAG, embed with plugsky-embed-multilingual and test cross-language queries alongside Hindi-only queries.
  6. Score candidate models on a Hindi gold set with native-speaker review, then cut production traffic over.
1Create a PlugskyAPI key on the freeplan (no card) and2Send a small set ofreal Hindi promptsto3Count tokens forthose prompts withthe Plugsky token4Normalise textbefore indexing orprompting:5For RAG, embed withplugsky-embed-multilingualand test6Score candidatemodels on a Hindigold set with

Try it yourself

Open the RAG sandbox →

How Plugsky handles Hindi text

Hindi is written left-to-right in Devanagari, an abugida where vowel signs (matras) attach to consonants and common conjuncts combine letters.

Formal and colloquial Hindi differ sharply (आप versus तुम), and everyday digital writing mixes Hindi with English words or full Roman-script Hinglish.

Evaluate with a Hindi speaker on Devanagari and Hinglish samples; check matra accuracy and gender agreement, and whether technical terms stay consistently transliterated or translated.

Tokenisation and cost in Hindi

Devanagari matras and conjuncts are separate code points that tokenisers may split, so a short Hindi sentence can consume noticeably more tokens than its word count implies. Roman-script Hinglish tokenises differently again.

  • NFC-normalise Devanagari so matras stay attached to consonants.
  • Test Devanagari and Hinglish as separate prompt and eval sets.
  • Keep one numeral system across prompts and retrieval.
  • Chunk on danda (।) and sentence meaning, not character counts.

Hindi retrieval and RAG

Users often query in Hinglish while documents are in Devanagari, so index the Hindi text and add a transliterated query path, testing both scripts against the same collection.

  • Use plugsky-embed-multilingual for Hindi and English retrieval.
  • NFC-normalise Devanagari before embedding.
  • Add transliteration for Roman queries if users type Hinglish.
  • Evaluate Devanagari and Roman queries separately.

Code example: a Hindi request

Point your existing OpenAI client at https://api.plugsky.com/v1 and pass Hindi text in the content field — no language flag and no separate endpoint. Streaming, JSON mode and function calling keep the same request shapes.

client = OpenAI(base_url="https://api.plugsky.com/v1", api_key=os.environ["PLUGSKY_API_KEY"])

client.chat.completions.create(model="plugsky-pro", messages=[{"role": "user", "content": "इस अनुबंध का तीन बिंदुओं में हिंदी में सारांश लिखें।"}])

Start on the free plan with plugsky-micro and plugsky-lite, then compare paid models on a Hindi gold set before cutover. See the docs for request details.

For production, log the model name and your normalisation settings with each request, and re-run the Hindi gold set whenever either changes — language quality regressions usually come from prompt or preprocessing drift, not from the model alone.

Honest comparison

CapabilityPlugskyHindi workflow todayBuilding in-house
API compatibilityOpenAI-compatible — change base_url and model nameVaries by provider and SDKFull rewrite
Hindi text handlingDevanagari plus Hinglish handled as separate prompt pathsDepends on provider tokeniser and prompt hygieneYou build normalisation, segmentation and evals
Token budgetFixed tokeniser per model; measure with the Plugsky token calculator and chunk to fitVaries by provider and modelYou host and tune each tokeniser
Multilingual retrievalplugsky-embed-multilingual available for cross-language RAGOften needs a separate embedding vendorYou serve and maintain embeddings
SovereigntyCloud, VPC, on-prem and air-gapped with residency optionsUsually US/EU public endpointsYou own the full stack

Frequently asked questions

Can Plugsky handle Hindi text?

Yes. The API accepts UTF-8 Hindi input on the OpenAI-compatible chat endpoint; output quality depends on the model, so compare two or three on your own prompts before choosing.

How do I estimate token usage for Hindi?

Devanagari matras and conjuncts are separate code points that tokenisers may split, so a short Hindi sentence can consume noticeably more tokens than its word count implies. Use the token calculator at /tools/llm-token-calculator before sizing context windows or chunk lengths.

Can I send Hinglish?

Yes. Roman-script Hindi works, but treat it as its own prompt and eval set because tokenisation and register differ from Devanagari.

Do I need a Devanagari normaliser?

NFC normalisation is enough for most text. Keep numerals consistent and remove zero-width characters that do not change meaning.

Is there a multilingual embedding model?

Yes — plugsky-embed-multilingual is part of the 30+ model catalogue and is built for cross-language retrieval. Keep one embedding model per vector collection.

Can I keep data in my region?

Plugsky supports cloud, VPC, on-prem and air-gapped deployment with data-residency options; confirm your requirements with the docs and the enterprise team.

How do I migrate an existing app?

Change base_url to https://api.plugsky.com/v1 and map the model name. Streaming, JSON mode, function calling and embeddings keep the same request shapes.

Is there a free plan?

Yes — the free plan includes two free models, plugsky-micro and plugsky-lite, with no card. A 14-day full-access trial unlocks the paid catalogue.